Don't write to inferior_ptid in go32-nat.c
authorPedro Alves <palves@redhat.com>
Thu, 18 Jun 2020 20:28:27 +0000 (21:28 +0100)
committerPedro Alves <palves@redhat.com>
Thu, 18 Jun 2020 22:10:53 +0000 (23:10 +0100)
generic_mourn_inferior already takes care of switching to no thread.

gdb/ChangeLog:
2020-06-18  Pedro Alves  <palves@redhat.com>

* go32-nat.c (go32_nat_target::create_inferior): Don't write to
inferior_ptid.

gdb/ChangeLog
gdb/go32-nat.c

index dc0202d33741abc7d08e37cb46d4e7aa9749089b..eff2fa2093e85ddfdcf3d16a901e45ab8b02cfd5 100644 (file)
@@ -1,3 +1,8 @@
+2020-06-18  Pedro Alves  <palves@redhat.com>
+
+       * go32-nat.c (go32_nat_target::create_inferior): Don't write to
+       inferior_ptid.
+
 2020-06-18  Pedro Alves  <palves@redhat.com>
 
        * nto-procfs.c (nto_procfs_target::update_thread_list): Avoid
index 881decf078904c6eee60b180d455249159e573d4..d1e508cc78073666dc28e2a10c8c6bacf9cbe5dc 100644 (file)
@@ -770,8 +770,6 @@ go32_nat_target::create_inferior (const char *exec_file,
 void
 go32_nat_target::mourn_inferior ()
 {
-  ptid_t ptid;
-
   redir_cmdline_delete (&child_cmd);
   resume_signal = -1;
   resume_is_step = 0;
@@ -787,8 +785,6 @@ go32_nat_target::mourn_inferior ()
      the OS cleans up when the debuggee exits.  */
   x86_cleanup_dregs ();
 
-  ptid = inferior_ptid;
-  inferior_ptid = null_ptid;
   prog_has_started = 0;
 
   generic_mourn_inferior ();