Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/gpl3/gdb/dist/gdb Overwrite waiton_ptid in nbsd-nat...
details: https://anonhg.NetBSD.org/src/rev/47cf1c6f1d72
branches: trunk
changeset: 451008:47cf1c6f1d72
user: kamil <kamil%NetBSD.org@localhost>
date: Fri May 03 19:03:57 2019 +0000
description:
Overwrite waiton_ptid in nbsd-nat, rather than generic core
This avoids compatibility issues with remote access to !NetBSD platform.
diffstat:
external/gpl3/gdb/dist/gdb/infrun.c | 4 ----
external/gpl3/gdb/dist/gdb/nbsd-nat.c | 11 +++++++++++
2 files changed, 11 insertions(+), 4 deletions(-)
diffs (36 lines):
diff -r 5e82b98aeb9b -r 47cf1c6f1d72 external/gpl3/gdb/dist/gdb/infrun.c
--- a/external/gpl3/gdb/dist/gdb/infrun.c Fri May 03 16:06:56 2019 +0000
+++ b/external/gpl3/gdb/dist/gdb/infrun.c Fri May 03 19:03:57 2019 +0000
@@ -3874,11 +3874,7 @@
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));
diff -r 5e82b98aeb9b -r 47cf1c6f1d72 external/gpl3/gdb/dist/gdb/nbsd-nat.c
--- a/external/gpl3/gdb/dist/gdb/nbsd-nat.c Fri May 03 16:06:56 2019 +0000
+++ b/external/gpl3/gdb/dist/gdb/nbsd-nat.c Fri May 03 19:03:57 2019 +0000
@@ -360,6 +360,17 @@
{
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),
Home |
Main Index |
Thread Index |
Old Index