[12/28] Don't write to inferior_ptid in remote-sim.c

Message ID 20200414175434.8047-13-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.
gdb/ChangeLog:
yyyy-mm-dd  Pedro Alves  <palves@redhat.com>

	* remote-sim.c (gdbsim_target_open): Use switch_to_no_thread
	instead of writing to inferior_ptid directly.
---
 gdb/remote-sim.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.14.5

Patch

diff --git a/gdb/remote-sim.c b/gdb/remote-sim.c
index 347dfd7013..da1ee96519 100644
--- a/gdb/remote-sim.c
+++ b/gdb/remote-sim.c
@@ -761,7 +761,7 @@  gdbsim_target_open (const char *args, int from_tty)
 
   /* There's nothing running after "target sim" or "load"; not until
      "run".  */
-  inferior_ptid = null_ptid;
+  switch_to_no_thread ();
 
   gdbsim_is_open = 1;
 }