switch inferior/thread before calling target methods
[deliverable/binutils-gdb.git] / gdb / ChangeLog
index 50c56c95c69103a9406abaa4968c2dcb1dcc5611..a733f0dfa01aafcdd9b1954e1b6f35d7e5247e6e 100644 (file)
@@ -1,3 +1,23 @@
+2020-01-10  Pedro Alves  <palves@redhat.com>
+
+       * gdbthread.h (scoped_restore_current_thread)
+       <dont_restore, restore, m_dont_restore>: Declare.
+       * thread.c (thread_alive): Add assertion.  Return bool.
+       (switch_to_thread_if_alive): New.
+       (prune_threads): Switch inferior/thread.
+       (print_thread_info_1): Switch thread before calling target methods.
+       (scoped_restore_current_thread::restore): New, factored out from
+       ...
+       (scoped_restore_current_thread::~scoped_restore_current_thread):
+       ... this.
+       (scoped_restore_current_thread::scoped_restore_current_thread):
+       Add assertion.
+       (thread_apply_all_command, thread_select): Use
+       switch_to_thread_if_alive.
+       * infrun.c (proceed, restart_threads, handle_signal_stop)
+       (switch_back_to_stepped_thread): Switch current thread before
+       calling target methods.
+
 2020-01-10  Pedro Alves <palves@redhat.com>
 
        * inferior.c (switch_to_inferior_no_thread): New function,
This page took 0.023795 seconds and 4 git commands to generate.