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

Pedro Alves
2020-04-14T17:54:47Z

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(-)

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;
}
--
2.14.5