aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2020-06-18 21:28:33 +0100
committerPedro Alves <palves@redhat.com>2020-06-18 23:15:48 +0100
commit1ee1a363454d88a87ad2ade7530b2a7fb670021e (patch)
treeb1313df8a08a4108ec2b1498e6cac1add09e0cc1 /gdb
parent6d350754a32007465f9adbc11b87339e4493b358 (diff)
downloadgdb-1ee1a363454d88a87ad2ade7530b2a7fb670021e.zip
gdb-1ee1a363454d88a87ad2ade7530b2a7fb670021e.tar.gz
gdb-1ee1a363454d88a87ad2ade7530b2a7fb670021e.tar.bz2
Don't write to inferior_ptid in go32-nat.c
gdb/ChangeLog: 2020-06-18 Pedro Alves <palves@redhat.com> * go32-nat.c (go32_nat_target::create_inferior): Switch to thread after creating it, instead of writing to inferior_ptid. Don't write to inferior_ptid.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog6
-rw-r--r--gdb/go32-nat.c4
2 files changed, 8 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index dc15d2d..bc8c371 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,11 @@
2020-06-18 Pedro Alves <palves@redhat.com>
+ * go32-nat.c (go32_nat_target::create_inferior): Switch to thread
+ after creating it, instead of writing to inferior_ptid. Don't
+ write to inferior_ptid.
+
+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>
diff --git a/gdb/go32-nat.c b/gdb/go32-nat.c
index d1e508c..8ffd289 100644
--- a/gdb/go32-nat.c
+++ b/gdb/go32-nat.c
@@ -753,14 +753,14 @@ go32_nat_target::create_inferior (const char *exec_file,
save_npx ();
#endif
- inferior_ptid = ptid_t (SOME_PID);
inf = current_inferior ();
inferior_appeared (inf, SOME_PID);
if (!target_is_pushed (this))
push_target (this);
- add_thread_silent (inferior_ptid);
+ thread_info *thr = add_thread_silent (ptid_t (SOME_PID));
+ switch_to_thread (thr);
clear_proceed_status (0);
insert_breakpoints ();