ptid = ptid_t (new_pid, new_pid, 0);
- if (debug_threads)
- {
- debug_printf ("HEW: Got fork event from LWP %ld, "
+ debug_printf("HEW: Got fork event from LWP %ld, "
"new child is %d\n",
ptid_of (event_thr).lwp (),
ptid.pid ());
- }
+
/* Add the new process to the tables and clone the breakpoint
lists of the parent. We need to do this even if the new process
if (event_child->waitstatus.kind == TARGET_WAITKIND_FORKED
|| event_child->waitstatus.kind == TARGET_WAITKIND_VFORKED)
{
+ debug_printf("wait returning vfork %s -> %s\n", event_child->thread->id.to_string().c_str(),
+ event_child->thread->fork_child->id.to_string().c_str());
gdb_assert (event_child->thread->fork_child != nullptr);
gdb_assert (event_child->thread->fork_child->fork_parent != nullptr);
event_child->thread->fork_child->fork_parent = nullptr;
event_child->thread->fork_child = nullptr;
}
+
*ourstatus = event_child->waitstatus;
/* Clear the event lwp's waitstatus since we handled it already. */
event_child->waitstatus.kind = TARGET_WAITKIND_IGNORE;
SIGSTOP is an implementation detail. */
ourstatus->value.sig = GDB_SIGNAL_0;
}
- else if (current_thread->last_resume_kind == resume_stop
- && WSTOPSIG (w) != SIGSTOP)
- {
- /* A thread that has been requested to stop by GDB with vCont;t,
- but, it stopped for other reasons. */
- ourstatus->value.sig = gdb_signal_from_host (WSTOPSIG (w));
- }
else if (ourstatus->kind == TARGET_WAITKIND_STOPPED)
- {
- ourstatus->value.sig = gdb_signal_from_host (WSTOPSIG (w));
- }
+ ourstatus->value.sig = gdb_signal_from_host (WSTOPSIG (w));
gdb_assert (step_over_bkpt == null_ptid);
&& event_ptid != null_ptid)
async_file_mark ();
+ debug_printf(":;wait return %s, %s\n", event_ptid.to_string().c_str(), target_waitstatus_to_string(ourstatus).c_str());
+
return event_ptid;
}