Module Name: src
Committed By: kamil
Date: Fri May 3 19:03:57 UTC 2019
Modified Files:
src/external/gpl3/gdb/dist/gdb: infrun.c nbsd-nat.c
Log Message:
Overwrite waiton_ptid in nbsd-nat, rather than generic core
This avoids compatibility issues with remote access to !NetBSD platform.
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/gpl3/gdb/dist/gdb/infrun.c
cvs rdiff -u -r1.7 -r1.8 src/external/gpl3/gdb/dist/gdb/nbsd-nat.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/external/gpl3/gdb/dist/gdb/infrun.c
diff -u src/external/gpl3/gdb/dist/gdb/infrun.c:1.2 src/external/gpl3/gdb/dist/gdb/infrun.c:1.3
--- src/external/gpl3/gdb/dist/gdb/infrun.c:1.2 Fri May 3 07:05:28 2019
+++ src/external/gpl3/gdb/dist/gdb/infrun.c Fri May 3 19:03:57 2019
@@ -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));
Index: src/external/gpl3/gdb/dist/gdb/nbsd-nat.c
diff -u src/external/gpl3/gdb/dist/gdb/nbsd-nat.c:1.7 src/external/gpl3/gdb/dist/gdb/nbsd-nat.c:1.8
--- src/external/gpl3/gdb/dist/gdb/nbsd-nat.c:1.7 Fri May 3 07:05:28 2019
+++ src/external/gpl3/gdb/dist/gdb/nbsd-nat.c Fri May 3 19:03:57 2019
@@ -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),