[binutils-gdb] Don't write to inferior_ptid in fork-child.c
Pedro Alves
palves@sourceware.org
Thu Jun 18 22:27:28 GMT 2020
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=6d350754a32007465f9adbc11b87339e4493b358
commit 6d350754a32007465f9adbc11b87339e4493b358
Author: Pedro Alves <palves@redhat.com>
Date: Thu Jun 18 21:28:32 2020 +0100
Don't write to inferior_ptid in fork-child.c
This is no longer necessary. All targets that call fork_inferior now
also call switch_to_thread as soon as they add the main thread.
gdb/ChangeLog:
2020-06-18 Pedro Alves <palves@redhat.com>
* fork-child.c (postfork_hook): Don't write to inferior_ptid.
Diff:
---
gdb/ChangeLog | 4 ++++
gdb/fork-child.c | 3 ---
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 606ac65d9ce..dc15d2df4d9 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,7 @@
+2020-06-18 Pedro Alves <palves@redhat.com>
+
+ * fork-child.c (postfork_hook): Don't write to inferior_ptid.
+
2020-06-18 Pedro Alves <palves@redhat.com>
* bsd-kvm.c (bsd_kvm_target_open): Switch to thread after adding
diff --git a/gdb/fork-child.c b/gdb/fork-child.c
index 41d5e2a0a47..90a01b2b16f 100644
--- a/gdb/fork-child.c
+++ b/gdb/fork-child.c
@@ -82,9 +82,6 @@ postfork_hook (pid_t pid)
inferior_appeared (inf, pid);
- /* Needed for wait_for_inferior stuff. */
- inferior_ptid = ptid_t (pid);
-
gdb_assert (saved_ui != NULL);
current_ui = saved_ui;
saved_ui = NULL;
More information about the Gdb-cvs
mailing list