aboutsummaryrefslogtreecommitdiff
path: root/gdb/linux-tdep.c
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2020-06-18 21:28:17 +0100
committerPedro Alves <palves@redhat.com>2020-06-18 21:28:17 +0100
commit41792d688a5a1f158d6e9ecda2b603ae122d69a1 (patch)
tree1d6a5d139f43d73f1761362a27c794b717ded0f7 /gdb/linux-tdep.c
parenta8a566853a0fc7f57159e55436ff6f395e499568 (diff)
downloadgdb-41792d688a5a1f158d6e9ecda2b603ae122d69a1.zip
gdb-41792d688a5a1f158d6e9ecda2b603ae122d69a1.tar.gz
gdb-41792d688a5a1f158d6e9ecda2b603ae122d69a1.tar.bz2
Don't write to inferior_ptid in linux_get_siginfo_data
gdb/ChangeLog: 2020-06-18 Pedro Alves <palves@redhat.com> * linux-tdep.c (btrace_fetch): Save/restore current thread instead of saving/restoring inferior_ptid.
Diffstat (limited to 'gdb/linux-tdep.c')
-rw-r--r--gdb/linux-tdep.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/linux-tdep.c b/gdb/linux-tdep.c
index 2dcdc63..d51d953 100644
--- a/gdb/linux-tdep.c
+++ b/gdb/linux-tdep.c
@@ -1612,8 +1612,8 @@ linux_get_siginfo_data (thread_info *thread, struct gdbarch *gdbarch)
if (!gdbarch_get_siginfo_type_p (gdbarch))
return gdb::byte_vector ();
- scoped_restore save_inferior_ptid = make_scoped_restore (&inferior_ptid);
- inferior_ptid = thread->ptid;
+ scoped_restore_current_thread save_current_thread;
+ switch_to_thread (thread);
siginfo_type = gdbarch_get_siginfo_type (gdbarch);