[PATCHv6 2/2] gdb: Track the current frame for each thread
Eli Zaretskii
eliz@gnu.org
Mon Jan 4 16:08:15 GMT 2021
> Date: Mon, 4 Jan 2021 15:07:55 +0000
> From: Andrew Burgess <andrew.burgess@embecosm.com>
> Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
>
> gdb/ChangeLog:
>
> * NEWS: Describe new feature.
> * frame.c (cache_selected_frame_on_thread): New function.
> (select_frame): Call new function.
> * frame.h (get_current_frame): Update comment.
> (get_selected_frame): Update comment.
> * gdbthread.h (class thread_info) <selected_frame_id>: New
> member variable.
> <selected_frame_level>: Likewise.
> (switch_to_thread): Extra parameter.
> * thread.c (switch_to_thread_if_alive): Extra parameter, passed to
> switch_to_thread.
> (scoped_restore_current_thread::restore): Restore the frame either
> from the thread, or from the local object.
> (set_executing_thread): Reset the currently selected frame.
> (restore_selected_frame_per_thread): New file level static variable.
> (show_restore_selected_frame_per_thread): New function.
> (print_thread_info_1): Pass extra parameter to switch_to_thread.
> (switch_to_thread): Take extra parameter, restore the previous
> frame if appropriate.
> (thread_apply_all_command): Pass extra parameter to switch_to_thread.
> (thread_apply_command): Likewise.
> (thread_select): Pass extra parameter to switch_to_thread_if_alive.
> (_initialize_thread): Add new set/show variable.
>
> gdb/doc/ChangeLog:
>
> * gdb.texinfo (Threads): Add anchor to 'info threads'. Describe
> the Frame column of 'info threads' more. Describe which frame is
> selected when switching threads, and document the new option for
> restoring the previously selected frame.
>
> gdb/testsuite/ChangeLog:
>
> * gdb.threads/restore-selected-frame.c: New file.
> * gdb.threads/restore-selected-frame.exp: New file.
OK for the documentation parts, thanks.
More information about the Gdb-patches
mailing list