diff options
author | Martin Simmons <martin@lispworks.com> | 2014-11-05 14:47:39 +0000 |
---|---|---|
committer | Michael Tokarev <mjt@tls.msk.ru> | 2014-11-11 08:58:30 +0300 |
commit | f17b06901049e54dbfa8b01c278cdc2e3ae5d62d (patch) | |
tree | 6a38ea666a1926e91b84f25e4bcb6ad8bb9cf2b3 /gdbstub.c | |
parent | 5b009e400809523e71f1b72bdaa2b681e2a5b1c7 (diff) | |
download | qemu-f17b06901049e54dbfa8b01c278cdc2e3ae5d62d.zip qemu-f17b06901049e54dbfa8b01c278cdc2e3ae5d62d.tar.gz qemu-f17b06901049e54dbfa8b01c278cdc2e3ae5d62d.tar.bz2 |
gdbstub: Add a missing case of signal number translation in gdbstub
While using qemu with gdb "target remote" to debug an application that uses
fork and exec, the qemu process receives SIGSTOP every time the forked process
terminates (sending SIGCHLD).
This is caused by a missing call to gdb_signal_to_target in gdbstub.c, which
is fixed by this patch:
Signed-off-by: Martin Simmons <martin@lispworks.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Diffstat (limited to 'gdbstub.c')
-rw-r--r-- | gdbstub.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -823,7 +823,10 @@ static int gdb_handle_packet(GDBState *s, const char *line_buf) action = *p++; signal = 0; if (action == 'C' || action == 'S') { - signal = strtoul(p, (char **)&p, 16); + signal = gdb_signal_to_target(strtoul(p, (char **)&p, 16)); + if (signal == -1) { + signal = 0; + } } else if (action != 'c' && action != 's') { res = 0; break; |