From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id BJwzBj3gjGj2vAEAWB0awg (envelope-from ) for ; Fri, 01 Aug 2025 11:41:49 -0400 Received: by simark.ca (Postfix, from userid 112) id 0636C1E102; Fri, 1 Aug 2025 11:41:49 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-9.0 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED, RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE autolearn=ham autolearn_force=no version=4.0.1 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 AD2DA1E091 for ; Fri, 1 Aug 2025 11:41:47 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 3D5843858C39 for ; Fri, 1 Aug 2025 15:41:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3D5843858C39 Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) by sourceware.org (Postfix) with ESMTP id 8D8333858D1E for ; Fri, 1 Aug 2025 15:41:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8D8333858D1E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gentoo.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gentoo.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 8D8333858D1E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=140.211.166.183 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1754062874; cv=none; b=HZnwyO2WflcyakZry+KhuygzHCKdZtKjJ+MlQXwYr4rC5kgGQ/4S6p5n5OSVOmCkklgT6yskg8wp/zNgFffF6+uqjmBF2en7IgCdNe8nb0OAWpa38WzZFbmUPVDYednHcOUPVWIBTVoFhDahZNoQztxlX2ENR/9iQWlo2C4e/EY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1754062874; c=relaxed/simple; bh=uTJDveYdSohppmizH/SEGdf/4n531cRaml8r4Js3Zpg=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=FhhRekMDwgMcI2CxhjVbeXC8/zIubHvHH22KxA7uM9lktXAc2yoaEOVLyVJM85zzEuN4h71It2sDKdGw4fJhieY7TcT+3laTCiBalV0a18G8iEqDx2CfEOGNc6bWgQvpjG3rjezRzR2lOFt4F5Zo6evonMk7OWoDN7rMljWgDtk= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8D8333858D1E Received: from mop.sam.mop (unknown [82.8.138.118]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange secp256r1 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: sam) by smtp.gentoo.org (Postfix) with ESMTPSA id A62D2340DE6; Fri, 01 Aug 2025 15:41:12 +0000 (UTC) From: Sam James To: Andrew Burgess Cc: gdb-patches@sourceware.org Subject: Re: [PATCH 0/7] Inline Function Optimised Code Debug Improvements In-Reply-To: Organization: Gentoo References: User-Agent: mu4e 1.12.11; emacs 31.0.50 Date: Fri, 01 Aug 2025 16:41:07 +0100 Message-ID: <878qk3123w.fsf@gentoo.org> MIME-Version: 1.0 Content-Type: text/plain 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 Andrew Burgess writes: > This series presents some improvements to debugging inline functions, > especially in optimised code. > > The first two patches of this series have been posted previously here: > > https://inbox.sourceware.org/gdb-patches/cover.1736865029.git.aburgess@redhat.com > > This series replaces that earlier work, though the patches are > basically unchanged. > > This entire series is an alternative solution to the patches that were > posted here: > > https://inbox.sourceware.org/gdb-patches/AS1PR01MB946510286FBF2497A6F03E83E4922@AS1PR01MB9465.eurprd01.prod.exchangelabs.com/ > > My reasons for writing an alternative patch set can be found in the > commit messages of patches (2) and (7), I'm not going to repeat them > here. However, Bernd, the original patch author, did amazing work > identifying the problems GDB was having, and these patches likely > wouldn't exist without the original patch series, so a big thanks > there. > > For reviewing, this series can be considered in 3 parts: > > + Patches (1) and (2) are independent from the rest of the series, > though related in theme. Both these patches could be approved and > merged ahead of remaining work, and do offer an improvement to GDB > on their own. > > + Patches (3), (4), (5), and (6) are refactoring work to support the > last patch. These can be reviewed, but shouldn't be merged until > the last patch is approved. > > + Patch (7) covers the final parts of this work, which deal with > non-empty inline functions. > > All thoughts and feedback are welcome. There hasn't been anything else so I don't feel too guilty about being noisy: thanks again for these to you and Bernd. I'd stopped using the patches when they ceased to apply a few months ago and then applied these and found I could immediately spot the difference with `list` working correctly inside/out of an inlined function. All I need now is PR32381 and I'm a very happy debugger indeed! Anyway, thank you. I'll continue to test them out. > > Thanks, > Andrew > > --- > > Andrew Burgess (7): > gdb: improve line number lookup around inline functions > gdb: handle empty ranges for inline subroutines > gdb: split dwarf line table parsing in two > gdb: move block range recording into its own function > gdb: create address map after parsing all DIE > gdb: record block end addresses while parsing DIEs > gdb: fix-up truncated inline function block ranges > > gdb/buildsym.c | 42 +- > gdb/buildsym.h | 13 +- > gdb/dwarf2/cu.h | 7 + > gdb/dwarf2/read.c | 288 +++++++-- > gdb/symtab.c | 25 +- > gdb/testsuite/gdb.cp/step-and-next-inline.exp | 171 ++++-- > .../gdb.dwarf2/dw2-empty-inline-low-high.c | 39 ++ > .../gdb.dwarf2/dw2-empty-inline-low-high.exp | 128 ++++ > .../gdb.dwarf2/dw2-empty-inline-ranges.c | 54 ++ > .../gdb.dwarf2/dw2-empty-inline-ranges.exp | 260 ++++++++ > .../gdb.dwarf2/dw2-extend-inline-block.c | 78 +++ > .../gdb.dwarf2/dw2-extend-inline-block.exp | 574 ++++++++++++++++++ > gdb/testsuite/gdb.dwarf2/dw2-inline-bt.c | 79 +++ > gdb/testsuite/gdb.dwarf2/dw2-inline-bt.exp | 227 +++++++ > .../gdb.dwarf2/dw2-unexpected-entry-pc.exp | 75 ++- > gdb/testsuite/gdb.opt/empty-inline-cxx.cc | 65 ++ > gdb/testsuite/gdb.opt/empty-inline-cxx.exp | 95 +++ > gdb/testsuite/gdb.opt/empty-inline.c | 40 ++ > gdb/testsuite/gdb.opt/empty-inline.exp | 130 ++++ > gdb/testsuite/gdb.opt/inline-bt.c | 28 + > gdb/testsuite/gdb.opt/inline-bt.exp | 119 ++-- > 21 files changed, 2342 insertions(+), 195 deletions(-) > create mode 100644 gdb/testsuite/gdb.dwarf2/dw2-empty-inline-low-high.c > create mode 100644 gdb/testsuite/gdb.dwarf2/dw2-empty-inline-low-high.exp > create mode 100644 gdb/testsuite/gdb.dwarf2/dw2-empty-inline-ranges.c > create mode 100644 gdb/testsuite/gdb.dwarf2/dw2-empty-inline-ranges.exp > create mode 100644 gdb/testsuite/gdb.dwarf2/dw2-extend-inline-block.c > create mode 100644 gdb/testsuite/gdb.dwarf2/dw2-extend-inline-block.exp > create mode 100644 gdb/testsuite/gdb.dwarf2/dw2-inline-bt.c > create mode 100644 gdb/testsuite/gdb.dwarf2/dw2-inline-bt.exp > create mode 100644 gdb/testsuite/gdb.opt/empty-inline-cxx.cc > create mode 100644 gdb/testsuite/gdb.opt/empty-inline-cxx.exp > create mode 100644 gdb/testsuite/gdb.opt/empty-inline.c > create mode 100644 gdb/testsuite/gdb.opt/empty-inline.exp > > > base-commit: cfbf9925c1c34f9e9d47c8b29d165866557663e3