aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2020-06-18 21:28:36 +0100
committerPedro Alves <palves@redhat.com>2020-06-18 23:18:08 +0100
commit6dbdab44e57d21c895ef60246d0e7aadb3c076a4 (patch)
tree371585b84b8d1ed8ff6aa7d08b0fe6d9a51da5ef
parent2da4b788f7a80ed9589d0e8856584e9dfa2813ff (diff)
downloadgdb-6dbdab44e57d21c895ef60246d0e7aadb3c076a4.zip
gdb-6dbdab44e57d21c895ef60246d0e7aadb3c076a4.tar.gz
gdb-6dbdab44e57d21c895ef60246d0e7aadb3c076a4.tar.bz2
Don't write to inferior_ptid in aix-thread.c
There are other writes in the file, but they seem more harmless. This one is changing the current thread permanently. gdb/ChangeLog: 2020-06-18 Pedro Alves <palves@redhat.com> * aix-thread.c (pd_update): Use switch_to_thread.
-rw-r--r--gdb/ChangeLog4
-rw-r--r--gdb/aix-thread.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 2f15382..cd2af5c 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,9 @@
2020-06-18 Pedro Alves <palves@redhat.com>
+ * aix-thread.c (pd_update): Use switch_to_thread.
+
+2020-06-18 Pedro Alves <palves@redhat.com>
+
* ravenscar-thread.c (ravenscar_thread_target): Update.
(ravenscar_thread_target::update_inferior_ptid): Rename to ...
(ravenscar_thread_target::add_active_thread): ... this. Don't
diff --git a/gdb/aix-thread.c b/gdb/aix-thread.c
index f2bd05f..3963a08 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;
}