Don't write to inferior_ptid in linux_get_siginfo_data
authorPedro Alves <palves@redhat.com>
Thu, 18 Jun 2020 20:28:17 +0000 (21:28 +0100)
committerPedro Alves <palves@redhat.com>
Thu, 18 Jun 2020 20:28:17 +0000 (21:28 +0100)
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.

gdb/ChangeLog
gdb/linux-tdep.c

index da4be157cdaeaab257c40f9185b92d8e768884d6..5611c42049cc9d4b355ff00e44e096edb3dbd68d 100644 (file)
@@ -1,3 +1,8 @@
+2020-06-18  Pedro Alves  <palves@redhat.com>
+
+       * linux-tdep.c (btrace_fetch): Save/restore current thread instead
+       of saving/restoring inferior_ptid.
+
 2020-06-17  Tom Tromey  <tom@tromey.com>
 
        * tui/tui-win.h (tui_scroll_forward, tui_scroll_backward)
index 2dcdc63076907881868601271fdbe509db81198e..d51d953ee202261c2edff15a935bf9f6f8ae356e 100644 (file)
@@ -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);
 
This page took 0.029285 seconds and 4 git commands to generate.