diff options
author | Pedro Alves <palves@redhat.com> | 2020-06-03 20:19:01 +0100 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2020-06-03 20:19:01 +0100 |
commit | 122821b9d32cf3765744d66526e888f37681ba7c (patch) | |
tree | edf8dd2b33c447c28e513953dc1a1666afbfec8d | |
parent | f6eee2d098049afd18f90b8f4bb6a5d1a49d900c (diff) | |
download | binutils-gdb-122821b9d32cf3765744d66526e888f37681ba7c.tar.gz |
Don't write to inferior_ptid in linux_get_siginfo_data
gdb/ChangeLog:
yyyy-mm-dd Pedro Alves <palves@redhat.com>
* linux-tdep.c (btrace_fetch): Save/restore current thread instead
of saving/restoring inferior_ptid.
-rw-r--r-- | gdb/linux-tdep.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/linux-tdep.c b/gdb/linux-tdep.c index 0f9559355f1..28456d48827 100644 --- a/gdb/linux-tdep.c +++ b/gdb/linux-tdep.c @@ -1618,8 +1618,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); |