aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2006-02-08 20:26:44 +0000
committerDaniel Jacobowitz <drow@false.org>2006-02-08 20:26:44 +0000
commit9db87ebd0412f0dcb17344c4f5d77514941417a4 (patch)
tree1a6f9163a9477c94fa135d864ff107c1e29bedea /gdb/gdbserver
parenteb4d9372857d63c244daea0193a8dcf6f9ee54e9 (diff)
downloadgdb-9db87ebd0412f0dcb17344c4f5d77514941417a4.zip
gdb-9db87ebd0412f0dcb17344c4f5d77514941417a4.tar.gz
gdb-9db87ebd0412f0dcb17344c4f5d77514941417a4.tar.bz2
* server.c (attach_inferior): Return SIGTRAP for a successful
attach.
Diffstat (limited to 'gdb/gdbserver')
-rw-r--r--gdb/gdbserver/ChangeLog5
-rw-r--r--gdb/gdbserver/server.c6
2 files changed, 11 insertions, 0 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index 9419040..4646b35 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,3 +1,8 @@
+2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * server.c (attach_inferior): Return SIGTRAP for a successful
+ attach.
+
2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
* Makefile.in (OBS): Add version.o.
diff --git a/gdb/gdbserver/server.c b/gdb/gdbserver/server.c
index 9ea2b72..0722e59 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;
}