From: Daniel Jacobowitz Date: Wed, 8 Feb 2006 20:26:44 +0000 (+0000) Subject: * server.c (attach_inferior): Return SIGTRAP for a successful X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9db87ebd0412f0dcb17344c4f5d77514941417a4;p=binutils-gdb.git * server.c (attach_inferior): Return SIGTRAP for a successful attach. --- diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index 94190402c8f..4646b35c172 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,3 +1,8 @@ +2006-02-08 Daniel Jacobowitz + + * server.c (attach_inferior): Return SIGTRAP for a successful + attach. + 2006-02-01 Daniel Jacobowitz * Makefile.in (OBS): Add version.o. diff --git a/gdb/gdbserver/server.c b/gdb/gdbserver/server.c index 9ea2b72055c..0722e5996ef 100644 --- a/gdb/gdbserver/server.c +++ b/gdb/gdbserver/server.c @@ -80,6 +80,12 @@ attach_inferior (int pid, char *statusptr, int *sigptr) *sigptr = mywait (statusptr, 0); + /* GDB knows to ignore the first SIGSTOP after attaching to a running + process using the "attach" command, but this is different; it's + just using "target remote". Pretend it's just starting up. */ + if (*statusptr == 'T' && *sigptr == SIGSTOP) + *sigptr = SIGTRAP; + return 0; }