From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id rSG5I4A9818OIAAAWB0awg (envelope-from ) for ; Mon, 04 Jan 2021 11:08:32 -0500 Received: by simark.ca (Postfix, from userid 112) id 835611F0AA; Mon, 4 Jan 2021 11:08:32 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_NONE,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 Received: from sourceware.org (unknown [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id D1B841E965 for ; Mon, 4 Jan 2021 11:08:31 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 14F83388E80C; Mon, 4 Jan 2021 16:08:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 14F83388E80C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1609776511; bh=uizsIfylF5V08uIES3xpDICoJmrFd8COseGn2sapSgk=; h=Date:To:In-Reply-To:Subject:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=yisqC3Ko3/lwxRHDaLfTK78xy33D+bQK4z2Ye5mSJiCqgyCr0LoQhxTO2sfy1V/sC HLZAowWp/y+AbX5Ihz7ARDacyFyVqMXZZU3kM1V/9ZWsfjzoiZn/1mOd7QyMz2MM9J APQV3yg/UWG09uZJenARnT9l1POIwLqoajTbXaL4= 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> To: Andrew Burgess 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-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: , From: Eli Zaretskii via Gdb-patches Reply-To: Eli Zaretskii Cc: gdb-patches@sourceware.org Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" > 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.