From: Tom de Vries <tdevries@suse.de>
To: Andrew Burgess <aburgess@redhat.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH 3/3] [gdb/symtab] Tweak fix-up of truncated inline function block ranges
Date: Thu, 12 Mar 2026 07:45:56 +0100 [thread overview]
Message-ID: <88176650-0478-4a98-9401-4a27d384f3c2@suse.de> (raw)
In-Reply-To: <52f8de7f-62c7-4a04-919d-aedee3314b7f@suse.de>
On 3/11/26 4:13 PM, Tom de Vries wrote:
> On 3/11/26 2:24 PM, Tom de Vries wrote:
>> On 3/10/26 5:05 PM, Andrew Burgess wrote:
>>> Which is why I tried to write DWARF assembler tests to cover edge cases
>>> as I found them, and I think it would be great if we could get such a
>>> test to cover this fix too.
>>
>> Agreed.
>>
>>> I'm happy to help with, or even write, the
>>> test, once I can reproduce the failure.
>>
>> My first try:
>> ...
>> diff --git a/gdb/testsuite/gdb.dwarf2/dw2-extend-inline-block.exp b/
>> gdb/ testsuite/gdb.dwarf2/dw2-ext
>> end-inline-block.exp
>> index 9e4798b53f3..82d3f7e0310 100644
>> --- a/gdb/testsuite/gdb.dwarf2/dw2-extend-inline-block.exp
>> +++ b/gdb/testsuite/gdb.dwarf2/dw2-extend-inline-block.exp
>> @@ -115,7 +115,7 @@ proc build_dwarf_for_contiguous_block { asm_file } {
>> DW_LNS_copy
>>
>> DW_LNE_set_address main_3
>> - line $::foo_call_line
>> + line [expr $::foo_call_line + 1]
>> DW_LNS_negate_stmt
>> DW_LNS_copy
>> ...
>> doesn't seem to work (in the sense of causing failure with the fix
>> applied), I'll investigate a bit further to understand why.
>
> OK, I think this:
> ...
> diff --git a/gdb/testsuite/gdb.dwarf2/dw2-extend-inline-block.exp b/gdb/
> testsuite/gdb.dwarf2/dw2-ext
> end-inline-block.exp
> index 9e4798b53f3..4a88250d927 100644
> --- a/gdb/testsuite/gdb.dwarf2/dw2-extend-inline-block.exp
> +++ b/gdb/testsuite/gdb.dwarf2/dw2-extend-inline-block.exp
> @@ -120,10 +120,10 @@ proc build_dwarf_for_contiguous_block { asm_file } {
> DW_LNS_copy
>
> DW_LNE_set_address main_4
> + DW_LNS_advance_line 1
> DW_LNS_copy
>
> DW_LNE_set_address main_5
> - DW_LNS_advance_line 1
> DW_LNS_negate_stmt
> DW_LNS_copy
> ...
> is the patch that represents the behavior I was seeing.
>
> The testcase doesn't completely pass though, I get:
> ...
> (gdb) PASS: $exp: contiguous block: step to second line of foo
> step^M
> 28 /* foo:3 */^M
> (gdb) PASS: $exp: contiguous block: step to third line of foo
> step^M
> 37 /* main:4 */^M
> (gdb) FAIL: $exp: contiguous block: set back to main
> ...
> so the message saying we're back in main is missing.
>
I've filed a PR ( https://sourceware.org/bugzilla/show_bug.cgi?id=33981
) with some analysis.
Thanks,
- Tom
> Thanks,
> - Tom
next prev parent reply other threads:[~2026-03-12 6:46 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-02 11:48 [PATCH 0/3] " Tom de Vries
2026-03-02 11:48 ` [PATCH 1/3] [gdb/symtab] Rename lnp_state_machine::m_last_line to m_last_recorded_line Tom de Vries
2026-03-02 11:48 ` [PATCH 2/3] [gdb/symtab] Re-add lnp_state_machine::m_last_line Tom de Vries
2026-03-02 11:48 ` [PATCH 3/3] [gdb/symtab] Tweak fix-up of truncated inline function block ranges Tom de Vries
2026-03-10 16:05 ` Andrew Burgess
2026-03-10 20:34 ` Tom de Vries
2026-03-14 14:22 ` Andrew Burgess
2026-03-14 14:53 ` Tom de Vries
2026-03-11 13:24 ` Tom de Vries
2026-03-11 15:13 ` Tom de Vries
2026-03-12 6:45 ` Tom de Vries [this message]
2026-03-12 12:07 ` Tom de Vries
2026-03-19 15:39 ` Andrew Burgess
2026-04-20 14:38 ` Tom de Vries
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=88176650-0478-4a98-9401-4a27d384f3c2@suse.de \
--to=tdevries@suse.de \
--cc=aburgess@redhat.com \
--cc=gdb-patches@sourceware.org \
/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