Overwrite waiton_ptid in nbsd-nat, rather than generic core
This avoids compatibility issues with remote access to !NetBSD platform.
This commit is contained in:
parent
422da90206
commit
1c9d9aa474
|
@ -3874,11 +3874,7 @@ fetch_inferior_event (void *client_data)
|
|||
struct cleanup *old_chain = make_cleanup (null_cleanup, NULL);
|
||||
struct cleanup *ts_old_chain;
|
||||
int cmd_done = 0;
|
||||
#if defined(__NetBSD__)
|
||||
ptid_t waiton_ptid = inferior_ptid;
|
||||
#else
|
||||
ptid_t waiton_ptid = minus_one_ptid;
|
||||
#endif
|
||||
|
||||
memset (ecs, 0, sizeof (*ecs));
|
||||
|
||||
|
|
|
@ -360,6 +360,17 @@ nbsd_wait (struct target_ops *ops,
|
|||
{
|
||||
ptid_t wptid;
|
||||
|
||||
/*
|
||||
* Always perform polling on exact PID, overwrite the default polling on
|
||||
* WAIT_ANY.
|
||||
*
|
||||
* This avoids events reported in random order reported for FORK / VFORK
|
||||
* when child and parent events are otherwise reported in random order.
|
||||
*
|
||||
* Polling on traced parent always simplifies the code.
|
||||
*/
|
||||
ptid = inferior_ptid;
|
||||
|
||||
if (debug_nbsd_lwp)
|
||||
fprintf_unfiltered (gdb_stdlog, "NLWP: calling super_wait (%d, %ld, %ld) target_options=%#x\n",
|
||||
ptid_get_pid (ptid), ptid_get_lwp (ptid),
|
||||
|
|
Loading…
Reference in New Issue