+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:
/* 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. */
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);
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 */
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)
{
/* 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. */
/* 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);