qemu-e2k/linux-user
Peter Maydell acebed948c linux-user/arm: Deliver SIGTRAP for UDF patterns used as breakpoints
The Linux kernel doesn't use the official bkpt insn for breakpoints;
instead it uses three instructions in the guaranteed-to-UNDEF space,
and generates SIGTRAP for these rather than the SIGILL that most
UNDEF insns generate:

https://elixir.bootlin.com/linux/v5.9.8/source/arch/arm/kernel/ptrace.c#L197

Make QEMU treat these insns specially too.  The main benefit of this
is that if you're running a debugger on a guest program that runs
into a GCC __builtin_trap() or LLVM "trap because execution should
never reach here" then you'll get the expected signal rather than a
SIGILL.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20201117155634.6924-1-peter.maydell@linaro.org
2020-11-23 11:04:51 +00:00
..
aarch64 linux user: Fix Lesser GPL version number 2020-11-15 16:41:26 +01:00
alpha linux user: Fix Lesser GPL version number 2020-11-15 16:41:26 +01:00
arm linux-user/arm: Deliver SIGTRAP for UDF patterns used as breakpoints 2020-11-23 11:04:51 +00:00
cris linux user: Fix Lesser GPL version number 2020-11-15 16:41:26 +01:00
generic
host
hppa linux user: Fix Lesser GPL version number 2020-11-15 16:41:26 +01:00
i386 linux user: Fix Lesser GPL version number 2020-11-15 16:41:26 +01:00
m68k
microblaze linux user: Fix Lesser GPL version number 2020-11-15 16:41:26 +01:00
mips linux user: Fix Lesser GPL version number 2020-11-15 16:41:26 +01:00
mips64 linux user: Fix Lesser GPL version number 2020-11-15 16:41:26 +01:00
nios2 linux user: Fix Lesser GPL version number 2020-11-15 16:41:26 +01:00
openrisc
ppc linux user: Fix Lesser GPL version number 2020-11-15 16:41:26 +01:00
riscv
s390x linux user: Fix Lesser GPL version number 2020-11-15 16:41:26 +01:00
sh4
sparc linux user: Fix Lesser GPL version number 2020-11-15 16:41:26 +01:00
sparc64 linux user: Fix Lesser GPL version number 2020-11-15 16:41:26 +01:00
tilegx linux user: Fix Lesser GPL version number 2020-11-15 16:41:26 +01:00
x86_64 linux user: Fix Lesser GPL version number 2020-11-15 16:41:26 +01:00
xtensa
cpu_loop-common.h
elfload.c
errno_defs.h
exit.c
fd-trans.c linux-user,netlink: add IFLA_BRPORT_MRP_RING_OPEN, IFLA_BRPORT_MRP_IN_OPEN 2020-11-17 15:22:52 +01:00
fd-trans.h
flat.h
flatload.c
ioctls.h
linux_loop.h
linuxload.c
main.c
meson.build
mmap.c
qemu.h
safe-syscall.S
signal-common.h
signal.c
socket.h
strace.c
strace.list
syscall_defs.h
syscall_types.h
syscall.c
target_flat.h
trace-events
trace.h
uaccess.c
uname.c
uname.h
vm86.c