[PATCH 21/28] Don't write to inferior_ptid in fork-child.c

Pedro Alves palves@redhat.com
Tue Apr 14 17:54:27 GMT 2020


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:
yyyy-mm-dd  Pedro Alves  <palves@redhat.com>

	* fork-child.c (postfork_hook): Don't write to inferior_ptid.
---
 gdb/fork-child.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/gdb/fork-child.c b/gdb/fork-child.c
index 41d5e2a0a4..90a01b2b16 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;
-- 
2.14.5



More information about the Gdb-patches mailing list