summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPedro Alves <pedro@codesourcery.com>2008-12-16 22:44:22 +0000
committerPedro Alves <pedro@codesourcery.com>2008-12-16 22:44:22 +0000
commit9895c65f234a2b6b1f2b228c50b2ac93d07e8e49 (patch)
treeeb354236033d2e9dc15c4ce834a521098e4effa8
parentd75d95997936815092cfb4faf415b1d1616d99c2 (diff)
downloadgdb-9895c65f234a2b6b1f2b228c50b2ac93d07e8e49.tar.gz
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. C
-rw-r--r--gdb/ChangeLog.mp15
-rw-r--r--gdb/inf-ptrace.c2
-rw-r--r--gdb/infrun.c2
-rw-r--r--gdb/linux-thread-db.c4
-rw-r--r--gdb/rs6000-nat.c2
-rw-r--r--gdb/spu-linux-nat.c2
6 files changed, 22 insertions, 5 deletions
diff --git a/gdb/ChangeLog.mp b/gdb/ChangeLog.mp
index d7cd53a1e85..5049403237d 100644
--- a/gdb/ChangeLog.mp
+++ b/gdb/ChangeLog.mp
@@ -1,6 +1,21 @@
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:
2008-12-05 Pedro Alves <pedro@codesourcery.com>
* infcmd.c (step_1, step_once): Look up the stepping range based
diff --git a/gdb/inf-ptrace.c b/gdb/inf-ptrace.c
index eed454f05d0..93183162446 100644
--- a/gdb/inf-ptrace.c
+++ b/gdb/inf-ptrace.c
@@ -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. */
diff --git a/gdb/infrun.c b/gdb/infrun.c
index cd809edb661..1019f1baeb9 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -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 */
diff --git a/gdb/linux-thread-db.c b/gdb/linux-thread-db.c
index 02bc103e79c..63ff69c568a 100644
--- a/gdb/linux-thread-db.c
+++ b/gdb/linux-thread-db.c
@@ -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)
{
diff --git a/gdb/rs6000-nat.c b/gdb/rs6000-nat.c
index 6501def2210..efdfaa68fdd 100644
--- a/gdb/rs6000-nat.c
+++ b/gdb/rs6000-nat.c
@@ -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. */
diff --git a/gdb/spu-linux-nat.c b/gdb/spu-linux-nat.c
index 5d763009b30..7223a968a9e 100644
--- a/gdb/spu-linux-nat.c
+++ b/gdb/spu-linux-nat.c
@@ -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);