[PATCH 06/28] Don't write to inferior_ptid in target.c

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

gdb/ChangeLog:
yyyy-mm-dd Pedro Alves <palves@redhat.com>

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

diff --git a/gdb/target.c b/gdb/target.c
index 2dc356d935..2514ce521b 100644
--- a/gdb/target.c
+++ b/gdb/target.c
@@ -3196,7 +3196,7 @@ generic_mourn_inferior (void)
{
inferior *inf = current_inferior ();

- inferior_ptid = null_ptid;
+ switch_to_no_thread ();

/* Mark breakpoints uninserted in case something tries to delete a
breakpoint while we delete the inferior's threads (which would
--
2.14.5