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.
This commit is contained in:
Pedro Alves 2020-06-18 21:28:36 +01:00
parent 2da4b788f7
commit 6dbdab44e5
2 changed files with 5 additions and 1 deletions

View File

@ -1,3 +1,7 @@
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.

View File

@ -902,7 +902,7 @@ pd_update (int set_infpid)
{
ptid = thread->ptid;
if (set_infpid)
inferior_ptid = ptid;
switch_to_thread (thread);
}
return ptid;
}