From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id 285BD388E80C for ; Mon, 4 Jan 2021 16:08:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 285BD388E80C Received: from fencepost.gnu.org ([2001:470:142:3::e]:37512) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kwSPB-0000SN-PK; Mon, 04 Jan 2021 11:08:25 -0500 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2537 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kwSPB-00014a-7k; Mon, 04 Jan 2021 11:08:25 -0500 Date: Mon, 04 Jan 2021 18:08:15 +0200 Message-Id: <83o8i4bs7k.fsf@gnu.org> From: Eli Zaretskii To: Andrew Burgess Cc: tankut.baris.aktemur@intel.com, gdb-patches@sourceware.org In-Reply-To: <20210104150755.GA2945@embecosm.com> (message from Andrew Burgess on Mon, 4 Jan 2021 15:07:55 +0000) Subject: Re: [PATCHv6 2/2] gdb: Track the current frame for each thread References: <20201112115914.3702451-1-andrew.burgess@embecosm.com> <201d792035b200d19e6a07558fb3fc25062bea2b.1607600155.git.andrew.burgess@embecosm.com> <20210104150755.GA2945@embecosm.com> X-Spam-Status: No, score=1.5 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, RCVD_IN_BARRACUDACENTRAL, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jan 2021 16:08:29 -0000 > Date: Mon, 4 Jan 2021 15:07:55 +0000 > From: Andrew Burgess > Cc: "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) : New > member variable. > : 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.