From: Tom de Vries <tdevries@suse.de>
To: Will Hawkins <hawkinsw@obs.cr>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH v5] gdb: Support embedded source in DWARF
Date: Sun, 14 Apr 2024 09:01:50 +0200 [thread overview]
Message-ID: <afe0f88a-ee39-41fd-852c-dd57c9c2e33e@suse.de> (raw)
In-Reply-To: <CADx9qWiBEQscHcemkJF5WVO4XUDi=75x1c=YhkHhqfBq+ah78Q@mail.gmail.com>
On 4/14/24 04:50, Will Hawkins wrote:
> On Fri, Apr 12, 2024 at 4:12 PM Tom de Vries <tdevries@suse.de> wrote:
>>
>> On 4/12/24 20:55, Will Hawkins wrote:
>>> + DW_LNE_set_address main_end
>>> + line [gdb_get_line_number "main end"]
>>> + DW_LNS_copy
>>> +
>>> + DW_LNE_end_sequence
>>> + }
>> I've just submitted a patch series designed to catch this (
>> https://sourceware.org/pipermail/gdb-patches/2024-April/207922.html ).
>>
>> The copy produces a line table entry with empty address range (because
>> the end_sequence is at the same address),.
>>
>> This is probably not what you intended.
>
> What I get for doing copy/paste! A v6 is on its way! Thank you for the
> eagle eyes!
>
It's just that I spent some time fixing all test-cases with this
problem, so I happened to spot it. Anyway, thanks for following up.
> On a semi-related note, it appears that "many" of the dwarf2 tests do
> not properly specify
>
> add_dummy_cus 0
>
> in their invocation of Dwarf::assemble resulting in two CUs being
> generated in the .S file. This does not appear to cause problems for
> the tests, but if you run the generated binaries through a "dwarf
> validator", e.g., llvm-dwarfdump, they will report errors. I have
> requested an account on the gdb bugzilla to report a bug and will file
> a related patch as a fix, if that is okay with you?
The dummy cu's are there by default, intentionally, as explained here (
https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=5ef670d81fd222ae5edfa1428ad48710f5e10d35
). In brief, it tries to make sure that when writing a dwarf assembly
test-case on one platform it will work on another.
If this causes problems with llvm-dwarfdump, we can look into fixing
that. So, yes, please file a PR.
But I'd look into a way of fixing this that doesn't require
"add_dummy_cus 0".
Thanks,
- Tom
next prev parent reply other threads:[~2024-04-14 7:01 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-12 18:55 Will Hawkins
2024-04-12 20:12 ` Tom de Vries
2024-04-14 2:50 ` Will Hawkins
2024-04-14 7:01 ` Tom de Vries [this message]
2024-04-14 7:15 ` Will Hawkins
2024-04-15 16:13 ` Will Hawkins
2024-04-19 20:17 ` Tom Tromey
2024-04-26 6:12 ` Will Hawkins
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=afe0f88a-ee39-41fd-852c-dd57c9c2e33e@suse.de \
--to=tdevries@suse.de \
--cc=gdb-patches@sourceware.org \
--cc=hawkinsw@obs.cr \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).