From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43273) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XliH6-0005WK-S7 for qemu-devel@nongnu.org; Tue, 04 Nov 2014 12:52:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XliH1-0002no-TV for qemu-devel@nongnu.org; Tue, 04 Nov 2014 12:52:12 -0500 Received: from mail.lispworks.com ([46.17.166.21]:63726 helo=lwfs1-cam.cam.lispworks.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XliH1-0002n0-Kv for qemu-devel@nongnu.org; Tue, 04 Nov 2014 12:52:07 -0500 Date: Tue, 4 Nov 2014 17:51:56 GMT Message-Id: <201411041751.sA4Hpu4X013678@heapu.cam.lispworks.com> From: Martin Simmons Subject: [Qemu-devel] [PATCH] gdbstub: Add a missing case of signal number translation in gdbstub List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org 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 diff --git a/gdbstub.c b/gdbstub.c index d1b5afd..6a73a35 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -823,7 +823,9 @@ 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; __Martin