qemu-e2k/linux-user/sparc
Peter Maydell b10089a14c linux-user: Don't call gdb_handlesig() before queue_signal()
The CPU main-loop routines for linux-user generally
call gdb_handlesig() when they're about to queue a
SIGTRAP signal. This is wrong, because queue_signal()
will cause us to pend a signal, and process_pending_signals()
will then call gdb_handlesig() itself. So the effect is that
we notify gdb of the SIGTRAP, and then if gdb says "OK,
continue with signal X" we will incorrectly notify
gdb of the signal X as well. We don't do this double-notify
for anything else, only SIGTRAP.

Remove this unnecessary and incorrect code from all
the targets except for nios2 (whose main loop is
doing something different and broken, and will be handled
in a separate patch).

This bug only manifests if the user responds to the reported
SIGTRAP using "signal SIGFOO" rather than "continue"; since
the latter is the overwhelmingly common thing to do after a
breakpoint most people won't have hit this.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20181019174958.26616-2-peter.maydell@linaro.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2018-11-12 15:48:00 +01:00
..
cpu_loop.c linux-user: Don't call gdb_handlesig() before queue_signal() 2018-11-12 15:48:00 +01:00
signal.c linux-user: Remove dead error-checking code 2018-11-12 15:43:07 +01:00
sockbits.h linux-user: copy sparc/sockbits.h definitions from linux 2018-05-25 10:10:55 +02:00
syscall_nr.h linux-user: update sparc/syscall_nr.h to linux header 4.16 2018-05-11 19:05:12 +02:00
target_cpu.h linux-user: move get_sp_from_cpustate() to target_cpu.h 2018-06-04 01:30:44 +02:00
target_elf.h linux-user: Move CPU type name selection to a function 2018-02-25 17:27:41 +01:00
target_errno.h linux-user: add sparc/sparc64 specific errno 2018-05-11 19:05:31 +02:00
target_fcntl.h linux-user: move sparc/sparc64 fcntl definitions to sparc/target_fcntl.h 2018-06-04 01:30:44 +02:00
target_signal.h linux-user: move sparc signal definitions to sparc/target_signal.h 2018-06-04 01:30:44 +02:00
target_structs.h linux-user: Clean up target_structs.h header guards 2016-07-12 16:19:16 +02:00
target_syscall.h linux-user: fix UNAME_MACHINE for sparc/sparc64 2018-05-11 19:05:38 +02:00
termbits.h linux-user: Implement ioctl cmd TIOCGPTPEER 2018-02-18 18:52:32 +01:00