* server.c (attach_inferior): Return SIGTRAP for a successful
authorDaniel Jacobowitz <drow@false.org>
Wed, 8 Feb 2006 20:26:44 +0000 (20:26 +0000)
committerDaniel Jacobowitz <drow@false.org>
Wed, 8 Feb 2006 20:26:44 +0000 (20:26 +0000)
attach.

gdb/gdbserver/ChangeLog
gdb/gdbserver/server.c

index 94190402c8f815cd9f4eb40c461df5aeea3c7b1c..4646b35c172ad1075753534f9676dccb8d51879b 100644 (file)
@@ -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.
index 9ea2b72055cc64545ae0158d308bc553fb49ba2e..0722e5996ef9045ece14b4a9b579f58d0242c447 100644 (file)
@@ -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;
 }