Don't write to inferior_ptid in fork-child.c
authorPedro Alves <palves@redhat.com>
Thu, 18 Jun 2020 20:28:32 +0000 (21:28 +0100)
committerPedro Alves <palves@redhat.com>
Thu, 18 Jun 2020 22:15:16 +0000 (23:15 +0100)
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.

gdb/ChangeLog
gdb/fork-child.c

index 606ac65d9ced1148e34d38fe3268b8c6613b3bb9..dc15d2df4d99b470e4055ee0da5dba4034dd6f73 100644 (file)
@@ -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
index 41d5e2a0a47b53baf12799e16880d146a10098f3..90a01b2b16f08332c90fcc09df59718960bb4b2f 100644 (file)
@@ -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;