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

Message ID 20200414175434.8047-22-palves@redhat.com
State New
Headers show
Series
  • Decouple inferior_ptid/inferior_thread(); dup ptids in thread list (PR/25412)
Related show

Commit Message

Simon Marchi via Gdb-patches April 14, 2020, 5:54 p.m.
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(-)

-- 
2.14.5

Patch

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;