From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id kNZ3Kwd4BWb3jRkAWB0awg (envelope-from ) for ; Thu, 28 Mar 2024 10:00:39 -0400 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=gnu.org header.i=@gnu.org header.a=rsa-sha256 header.s=fencepost-gnu-org header.b=MYf0Ym9G; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id AC6FD1E0C0; Thu, 28 Mar 2024 10:00:39 -0400 (EDT) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 946E61E030 for ; Thu, 28 Mar 2024 10:00:37 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 6585D3858C98 for ; Thu, 28 Mar 2024 14:00:36 +0000 (GMT) Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id A74D63858D28 for ; Thu, 28 Mar 2024 14:00:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A74D63858D28 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gnu.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gnu.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org A74D63858D28 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2001:470:142:3::10 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711634417; cv=none; b=PvKOc2Kcr3Xv5s1/wx7/PeraoOi/qOHzOxyvdC0CaUFfr8dMTS68GOgTWF+QjzlmBvZ7wZrHu++VdDgU0O2VInVjUR41wFLwUyNamXye2NlKiGyJJ5cMYHrmVYTDf+hps9Ecda2qeaXWWPnCDJRsa6bGullwJx9ojtb8ex8gT+I= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711634417; c=relaxed/simple; bh=Tsi0haHdoH4xGMldVaxJvAvj6mNyU7mKGvOjfHzxH9s=; h=DKIM-Signature:Date:Message-Id:From:To:Subject; b=NCGw3h3mYJBuU66XDcs0mRHgS8jkwTLfijssKxwaJ7cQ+VIISeeugObjXVVUYdjrr0OAh6jSxCRTLtZ5jBY1KJYpdpINSHzD0GiYbQyBfmwkNOcR+kvxw0Pd+1dHQMVdmaR7xD4glGbTMjaafNZwOm8KymiU2ZA75QnvkQ8HoIw= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rpqIg-0002cw-0U; Thu, 28 Mar 2024 10:00:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=rU8o5XCCwtjwNNlZhHvTEb42ReootX9Q/Qo+vSTL/Js=; b=MYf0Ym9GCE/H KgsteRUr+WefVpRfr9zbzWHOg0DiXO3DozTNiZuuXw/ptLfDuz0DkY5+BWHQcMi9/30tByzIYoaam woUihLLZJEV0dytCYQpOHcfrJFobjSSFR1VDNnMDj8bcBd7kU3fW3M7H8V5HZjVCwm1/mbqQ/nLNA P5LIEbbFgd2d2vgvvQkT2ew2XOCW0sAHE0mhoQHm1jnD+9X5brl5t5u3BHKJNltIZsM4jcSTfK515 NjAOF8j3raRcGdhiPNZ60LpXSk34Oq/vqGlS3wjN7gcGNDyD2sdo2YoELz9gyb+m3TSVrFBybIA/g FzqLK3C4Ac0enMaC/EVsXw==; Date: Thu, 28 Mar 2024 15:59:59 +0200 Message-Id: <86v856fodc.fsf@gnu.org> From: Eli Zaretskii To: Abdul Basit Ijaz Cc: gdb-patches@sourceware.org, JiniSusan.George@amd.com, tom@tromey.com In-Reply-To: <20240328120528.30382-6-abdul.b.ijaz@intel.com> (message from Abdul Basit Ijaz on Thu, 28 Mar 2024 13:05:23 +0100) Subject: Re: [PATCH v6 05/10] gdb: Skip trampoline functions for the finish and reverse-finish commands. References: <20240328120528.30382-1-abdul.b.ijaz@intel.com> <20240328120528.30382-6-abdul.b.ijaz@intel.com> X-Spam-Status: No, score=-5.7 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org > From: Abdul Basit Ijaz > Cc: abdul.b.ijaz@intel.com, > JiniSusan.George@amd.com, > tom@tromey.com, > eliz@gnu.org > Date: Thu, 28 Mar 2024 13:05:23 +0100 > > gdb/NEWS | 5 +- > gdb/doc/gdb.texinfo | 4 ++ > gdb/infcmd.c | 12 ++++ > gdb/infrun.c | 8 +++ > gdb/infrun.h | 5 ++ > gdb/testsuite/gdb.fortran/func-trampoline.exp | 13 ++++- > .../gdb.reverse/finish-reverse-trampoline.exp | 56 +++++++++++++++++++ > 7 files changed, 99 insertions(+), 4 deletions(-) > create mode 100644 gdb/testsuite/gdb.reverse/finish-reverse-trampoline.exp > > diff --git a/gdb/NEWS b/gdb/NEWS > index 025f2e1a17e..b8577c58af7 100644 > --- a/gdb/NEWS > +++ b/gdb/NEWS > @@ -898,8 +898,9 @@ show skip-trampoline-functions > recognize function calls that have been marked as trampolines in the debug > info. It improves stepping behavior in that it steps over the trampoline > code and hides it from the user. It improves the printing of the stack by > - hiding trampoline functions from the backtrace. Currently, only DWARF > - trampolines are supported. > + hiding the trampoline frames from the backtrace and skips trampoline > + functions while returning from the target function of a trampoline call. > + Currently, only DWARF trampolines are supported. > > If this is turned off, GDB gdb will handle trampoline functions the same > as any other function. > diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo > index 6117f6e889f..5782e06b91d 100644 > --- a/gdb/doc/gdb.texinfo > +++ b/gdb/doc/gdb.texinfo > @@ -6475,6 +6475,10 @@ DWARF trampolines marked via DW_AT_trampoline are supported by this. > When issuing a @code{backtrace}, if @code{skip-trampoline-functions} is set, > @value{GDBN} will skip trampoline frames while printing the stack. > > +When issuing a @code{finish} or @code{reverse-finish}, if > +@code{skip-trampoline-functions} is set, @value{GDBN} will skip trampoline > +frames while returning from the target function. > + > Currently, only DWARF trampolines marked via DW_AT_trampoline are supported by > this. Thanks, the documentation parts of this are okay. Reviewed-By: Eli Zaretskii