Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andrew Burgess <aburgess@redhat.com>
To: Tom de Vries <tdevries@suse.de>, Tom Tromey <tom@tromey.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCHv3 1/7] gdb: improve line number lookup around inline functions
Date: Thu, 18 Dec 2025 14:46:35 +0000	[thread overview]
Message-ID: <87ike34zlg.fsf@redhat.com> (raw)
In-Reply-To: <4316d420-4728-4b90-8e37-7c5429d1acbe@suse.de>

Tom de Vries <tdevries@suse.de> writes:

> On 12/17/25 3:32 PM, Andrew Burgess wrote:
>> Tom Tromey <tom@tromey.com> writes:
>> 
>>>>>>>> "Andrew" == Andrew Burgess <aburgess@redhat.com> writes:
>>>
>>> Andrew> So my proposal is that the backward scan of the line table looking for
>>> Andrew> an is-stmt entry should not be performed when NOTCURRENT is true.  In
>>> Andrew> the case above this means we will report the entry at index 9, which
>>> Andrew> is for line 10, which is correct.
>>>
>>> Thanks for the explanation.  It all made sense to me.
>>>
>>> Andrew> +    if ![runto foo] {
>>>
>>> We're bracing if conditions these days.
>>>
>>> Otherwise this looks good to me.
>>>
>>> Approved-By: Tom Tromey <tom@tromey.com>
>> 
>> I fixed the TCL bracing issue and pushed just this patch for now.  I'm
>> taking a deeper look at some of the questions you raised on the later
>> patches.
>
> Hi,
>
> I'm getting:
> ...
> $ pre-commit run --all-files
> black....................................................................Passed
> flake8...................................................................Passed
> isort....................................................................Passed
> codespell................................................................Passed
> check-include-guards.....................................................Passed
> check-gnu-style..........................................................Passed
> - hook id: check-gnu-style
> - duration: 0.19s
> check-whitespace.........................................................Passed
> pre-commit-setup.........................................................Passed
> tclint...................................................................Failed
> - hook id: tclint
> - exit code: 1
>
> gdb/testsuite/gdb.dwarf2/dw2-inline-bt.exp:211:26: expression with 
> substitutions should be enclosed by braces [unbraced-expr]
> gdb/testsuite/gdb.dwarf2/dw2-inline-bt.exp:212:26: expression with 
> substitutions should be enclosed by braces [unbraced-expr]

Sorry for the breakage.  I pushed the patch below to address this.

Thanks,
Andrew

--

commit e3b02794ca17af6c12780ba32cb38c98e152a903
Author: Andrew Burgess <aburgess@redhat.com>
Date:   Thu Dec 18 13:30:38 2025 +0000

    gdb/testsuite: fix tclint errors
    
    After commit:
    
      commit b5160e2ee6a0192389caf7acee1fc32961ed29f4 (upstream/master, upstream/HEAD, gdb-tmp-g)
      Date:   Fri Jul 26 16:32:33 2024 +0100
    
          gdb: improve line number lookup around inline functions
    
    the following tclint errors were reported:
    
      gdb/testsuite/gdb.dwarf2/dw2-inline-bt.exp:211:26: expression with substitutions should be enclosed by braces [unbraced-expr]
      gdb/testsuite/gdb.dwarf2/dw2-inline-bt.exp:212:26: expression with substitutions should be enclosed by braces [unbraced-expr]
    
    Fixed by this commit.

diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-bt.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-bt.exp
index cf66897cd70..77a18918eb1 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-inline-bt.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-bt.exp
@@ -208,8 +208,8 @@ proc do_test { } {
     # is reported.  We might get different line numbers depending on
     # how the architectures skip prologue function works.  This test
     # is all about how frame #1 is reported.
-    set foo_body_1 [expr $::foo_prologue + 1]
-    set foo_body_2 [expr $::foo_prologue + 2]
+    set foo_body_1 [expr {$::foo_prologue + 1}]
+    set foo_body_2 [expr {$::foo_prologue + 2}]
     gdb_test "bt" \
 	[multi_line \
 	     "^#0\\s+foo \\(\\) at \[^\r\n\]+$::srcfile:(?:$::foo_prologue|$foo_body_1|$foo_body_2)" \


  reply	other threads:[~2025-12-18 14:47 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-20 10:20 [PATCH 0/7] Inline Function Optimised Code Debug Improvements Andrew Burgess
2025-07-20 10:20 ` [PATCH 1/7] gdb: improve line number lookup around inline functions Andrew Burgess
2025-07-20 10:20 ` [PATCH 2/7] gdb: handle empty ranges for inline subroutines Andrew Burgess
2025-07-20 10:20 ` [PATCH 3/7] gdb: split dwarf line table parsing in two Andrew Burgess
2025-07-20 10:20 ` [PATCH 4/7] gdb: move block range recording into its own function Andrew Burgess
2025-07-20 10:20 ` [PATCH 5/7] gdb: create address map after parsing all DIE Andrew Burgess
2025-07-20 10:20 ` [PATCH 6/7] gdb: record block end addresses while parsing DIEs Andrew Burgess
2025-07-20 10:20 ` [PATCH 7/7] gdb: fix-up truncated inline function block ranges Andrew Burgess
2025-08-01  8:58 ` [PATCHv2 0/7] Inline Function Optimised Code Debug Improvements Andrew Burgess
2025-08-01  8:58   ` [PATCHv2 1/7] gdb: improve line number lookup around inline functions Andrew Burgess
2025-08-01  8:58   ` [PATCHv2 2/7] gdb: handle empty ranges for inline subroutines Andrew Burgess
2025-08-01  8:58   ` [PATCHv2 3/7] gdb: split dwarf line table parsing in two Andrew Burgess
2025-08-01  8:58   ` [PATCHv2 4/7] gdb: move block range recording into its own function Andrew Burgess
2025-08-01  8:58   ` [PATCHv2 5/7] gdb: create address map after parsing all DIE Andrew Burgess
2025-08-01  8:58   ` [PATCHv2 6/7] gdb: record block end addresses while parsing DIEs Andrew Burgess
2025-08-01  8:58   ` [PATCHv2 7/7] gdb: fix-up truncated inline function block ranges Andrew Burgess
2025-10-16 17:49   ` [PATCHv3 0/7] Inline Function Optimised Code Debug Improvements Andrew Burgess
2025-10-16 17:49     ` [PATCHv3 1/7] gdb: improve line number lookup around inline functions Andrew Burgess
2025-10-27 22:22       ` Tom Tromey
2025-12-17 14:32         ` Andrew Burgess
2025-12-17 14:48           ` Tom de Vries
2025-12-18 14:46             ` Andrew Burgess [this message]
2025-10-16 17:49     ` [PATCHv3 2/7] gdb: handle empty ranges for inline subroutines Andrew Burgess
2025-10-16 17:49     ` [PATCHv3 3/7] gdb: split dwarf line table parsing in two Andrew Burgess
2025-10-16 17:49     ` [PATCHv3 4/7] gdb: move block range recording into its own function Andrew Burgess
2025-10-27 22:45       ` Tom Tromey
2025-10-16 17:49     ` [PATCHv3 5/7] gdb: create address map after parsing all DIE Andrew Burgess
2025-10-27 22:56       ` Tom Tromey
2026-01-02 16:36         ` Andrew Burgess
2026-01-05 20:03           ` Tom Tromey
2026-01-05 21:37             ` Andrew Burgess
2026-01-06  0:53               ` Tom Tromey
2025-10-16 17:49     ` [PATCHv3 6/7] gdb: record block end addresses while parsing DIEs Andrew Burgess
2025-10-27 23:00       ` Tom Tromey
2025-10-16 17:49     ` [PATCHv3 7/7] gdb: fix-up truncated inline function block ranges Andrew Burgess
2026-02-04 10:43     ` [PATCHv3 0/7] Inline Function Optimised Code Debug Improvements Andrew Burgess
2025-08-01 15:41 ` [PATCH " Sam James

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ike34zlg.fsf@redhat.com \
    --to=aburgess@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=tdevries@suse.de \
    --cc=tom@tromey.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox