[PATCH 27/28] Don't write to inferior_ptid in aix-thread.c

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

There are other writes in the file, but they seem more harmless. This
one is changing the current thread permanently.

Untested.

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

* aix-thread.c (pd_update): Use switch_to_thread.
---
gdb/aix-thread.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gdb/aix-thread.c b/gdb/aix-thread.c
index f2bd05fef2..3963a08c84 100644
--- a/gdb/aix-thread.c
+++ b/gdb/aix-thread.c
@@ -902,7 +902,7 @@ pd_update (int set_infpid)
{
ptid = thread->ptid;
if (set_infpid)
- inferior_ptid = ptid;
+ switch_to_thread (thread);
}
return ptid;
}
--
2.14.5