]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Merge from head:
authorPedro Alves <palves@redhat.com>
Tue, 16 Dec 2008 22:44:23 +0000 (22:44 +0000)
committerPedro Alves <palves@redhat.com>
Tue, 16 Dec 2008 22:44:23 +0000 (22:44 +0000)
2008-12-07  Pedro Alves  <pedro@codesourcery.com>

(handle_inferior_event): On a TARGET_WAITKIND_EXITED or
TARGET_WAITKIND_SIGNALLED, switch inferior_ptid to the event ptid.
* linux_thread_db.c (thread_db_wait): On a TARGET_WAITKIND_EXITED
or TARGET_WAITKIND_SIGNALLED, return the ptid the beneath target
returned.
* inf-ptrace.c (inf_ptrace_wait): Return inferior_ptid instead of
minus_one_ptid if the inferior disappeared.
* rs6000-nat.c (rs6000_wait): Likewise.
* spu-linux-nat.c (spu_child_wait): Likewise.
C

gdb/ChangeLog.mp
gdb/inf-ptrace.c
gdb/infrun.c
gdb/linux-thread-db.c
gdb/rs6000-nat.c
gdb/spu-linux-nat.c

index d7cd53a1e85ddf35558a6121f4c80e4445c09715..5049403237d9b43e6b790f0437ee5a9949d7b1c3 100644 (file)
@@ -1,3 +1,18 @@
+2008-12-16  Pedro Alves  <pedro@codesourcery.com>
+
+       Merge from head:
+       2008-12-07  Pedro Alves  <pedro@codesourcery.com>
+
+       (handle_inferior_event): On a TARGET_WAITKIND_EXITED or
+       TARGET_WAITKIND_SIGNALLED, switch inferior_ptid to the event ptid.
+       * linux_thread_db.c (thread_db_wait): On a TARGET_WAITKIND_EXITED
+       or TARGET_WAITKIND_SIGNALLED, return the ptid the beneath target
+       returned.
+       * inf-ptrace.c (inf_ptrace_wait): Return inferior_ptid instead of
+       minus_one_ptid if the inferior disappeared.
+       * rs6000-nat.c (rs6000_wait): Likewise.
+       * spu-linux-nat.c (spu_child_wait): Likewise.
+
 2008-12-16  Pedro Alves  <pedro@codesourcery.com>
 
        Merge from head:
index eed454f05d06828ed04dc2c941529625b1863f8c..931831624469eadfd9933066c2080b62d3d361fe 100644 (file)
@@ -414,7 +414,7 @@ inf_ptrace_wait (ptid_t ptid, struct target_waitstatus *ourstatus)
          /* Claim it exited with unknown signal.  */
          ourstatus->kind = TARGET_WAITKIND_SIGNALLED;
          ourstatus->value.sig = TARGET_SIGNAL_UNKNOWN;
-         return minus_one_ptid;
+         return inferior_ptid;
        }
 
       /* Ignore terminated detached child processes.  */
index cd809edb6612b97ecba46f99739c37efec4cbcd2..1019f1baeb974836669d0d21c8d3d3c5b3aa4e0b 100644 (file)
@@ -2265,6 +2265,7 @@ handle_inferior_event (struct execution_control_state *ecs)
     case TARGET_WAITKIND_EXITED:
       if (debug_infrun)
         fprintf_unfiltered (gdb_stdlog, "infrun: TARGET_WAITKIND_EXITED\n");
+      inferior_ptid = ecs->ptid;
       target_terminal_ours (); /* Must do this before mourn anyway */
       print_stop_reason (EXITED, ecs->ws.value.integer);
 
@@ -2283,6 +2284,7 @@ handle_inferior_event (struct execution_control_state *ecs)
     case TARGET_WAITKIND_SIGNALLED:
       if (debug_infrun)
         fprintf_unfiltered (gdb_stdlog, "infrun: TARGET_WAITKIND_SIGNALLED\n");
+      inferior_ptid = ecs->ptid;
       stop_print_frame = 0;
       target_terminal_ours (); /* Must do this before mourn anyway */
 
index 02bc103e79c7ff662daa81b6216b05cd19c09b28..63ff69c568a184dcd7a276272095305196d9d925 100644 (file)
@@ -889,8 +889,8 @@ thread_db_wait (ptid_t ptid, struct target_waitstatus *ourstatus)
     return ptid;
 
   if (ourstatus->kind == TARGET_WAITKIND_EXITED
-    || ourstatus->kind == TARGET_WAITKIND_SIGNALLED)
-    return pid_to_ptid (-1);
+      || ourstatus->kind == TARGET_WAITKIND_SIGNALLED)
+    return ptid;
 
   if (ourstatus->kind == TARGET_WAITKIND_EXECD)
     {
index 6501def221066780dead21ae1605ae83b0e9d094..efdfaa68fddb295a8f59f35a787ce76a0955395d 100644 (file)
@@ -546,7 +546,7 @@ rs6000_wait (ptid_t ptid, struct target_waitstatus *ourstatus)
          /* Claim it exited with unknown signal.  */
          ourstatus->kind = TARGET_WAITKIND_SIGNALLED;
          ourstatus->value.sig = TARGET_SIGNAL_UNKNOWN;
-         return minus_one_ptid;
+         return inferior_ptid;
        }
 
       /* Ignore terminated detached child processes.  */
index 5d763009b30d66c7fd2c0d5479bca66cfd369444..7223a968a9e84ad438b4b83f2ffdc35ae56ba98d 100644 (file)
@@ -444,7 +444,7 @@ spu_child_wait (ptid_t ptid, struct target_waitstatus *ourstatus)
       /* Claim it exited with unknown signal.  */
       ourstatus->kind = TARGET_WAITKIND_SIGNALLED;
       ourstatus->value.sig = TARGET_SIGNAL_UNKNOWN;
-      return minus_one_ptid;
+      return inferior_ptid;
     }
 
   store_waitstatus (ourstatus, status);