* linux-nat.c (status_to_str): Handle TRAP_IS_SYSCALL.
authorDoug Evans <dje@google.com>
Mon, 28 Sep 2009 18:39:29 +0000 (18:39 +0000)
committerDoug Evans <dje@google.com>
Mon, 28 Sep 2009 18:39:29 +0000 (18:39 +0000)
gdb/ChangeLog
gdb/linux-nat.c

index defd90e..3475828 100644 (file)
@@ -1,3 +1,7 @@
+2009-09-28  Doug Evans  <dje@google.com>
+
+       * linux-nat.c (status_to_str): Handle TRAP_IS_SYSCALL.
+
 2009-09-28  Ulrich Weigand  <uweigand@de.ibm.com>
 
        * valops.c (value_assign): Respect parent offset when
index 98f6347..48affdb 100644 (file)
@@ -980,8 +980,14 @@ status_to_str (int status)
   static char buf[64];
 
   if (WIFSTOPPED (status))
-    snprintf (buf, sizeof (buf), "%s (stopped)",
-             strsignal (WSTOPSIG (status)));
+    {
+      if (WSTOPSIG (status) == TRAP_IS_SYSCALL)
+       snprintf (buf, sizeof (buf), "%s (stopped at syscall)",
+                 strsignal (SIGTRAP));
+      else
+       snprintf (buf, sizeof (buf), "%s (stopped)",
+                 strsignal (WSTOPSIG (status)));
+    }
   else if (WIFSIGNALED (status))
     snprintf (buf, sizeof (buf), "%s (terminated)",
              strsignal (WSTOPSIG (status)));