From: Bernd Edlinger <bernd.edlinger@hotmail.de>
To: Tom de Vries <tdevries@suse.de>,
Simon Marchi <simon.marchi@polymtl.ca>,
gdb-patches@sourceware.org
Cc: Tom Tromey <tom@tromey.com>
Subject: Re: [PATCH][gdb/symtab] Handle DW_AT_ranges with DW_FORM_sec_off in partial DIE
Date: Mon, 25 Jan 2021 16:47:30 +0100 [thread overview]
Message-ID: <AM8PR10MB4708288F8A42B6D97C8A4DA1E4BD0@AM8PR10MB4708.EURPRD10.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <ab073b4a-b335-3a26-c7ad-d2bf266a4a2f@suse.de>
On 1/25/21 4:37 PM, Tom de Vries wrote:
> On 1/25/21 4:27 PM, Simon Marchi wrote:
>>
>>
>> On 2021-01-25 7:52 a.m., Bernd Edlinger wrote:
>>> On 1/25/21 1:24 PM, Tom de Vries wrote:
>>>> Hi,
>>>>
>>>> While looking into a failure in gdb.go/package.exp with gcc-11, I noticed that
>>>> gdb shows some complaints when loading the executable (also with gcc-10, where
>>>> the test-case passes):
>>>> ...
>>>> $ gdb -batch -iex "set complaints 100" package.10 -ex start
>>>> During symbol reading: Attribute value is not a constant (DW_FORM_sec_offset)
>>>> Temporary breakpoint 1 at 0x402ae6: file gdb.go/package1.go, line 8.
>>>> During symbol reading: Attribute value is not a constant (DW_FORM_sec_offset)
>>>> During symbol reading: Invalid .debug_rnglists data (no base address)
>>>> ...
>>>>
>>>> Fix this by using as_unsigned () to read DW_AT_ranges in the partial DIE
>>>> reader, similar to how that is done in dwarf2_get_pc_bounds.
>>>>
>>>> Tested on x86_64-linux.
>>>>
>>>> Any comments?
>>>>
>>>
>>> Oh, interesting.
>>>
>>> This is exactly what I have posted here:
>>>
>>> https://sourceware.org/pipermail/gdb-patches/2021-January/174660.html
>>>
>>> but my test case shows the regression in the partial symbols.
>>>
>>>
>>>
>>> Maybe you can take my test case and merge it to your patch?
>>>
>>>
>
> I've looked at it, but it's optimized code, which may be fragile in
> terms of number of break locations. I wouldn't mind a dwarf assembly
> version of that one though.
>
Yes, unfortunately I have not any experience with writing such assembly
tests, but I am always impressed when one of you does it though :-)
Nevertheless, the test case seems to be stable from gcc-4.8 .. gcc-11,
that it fails without the patch and passes with the patch.
So is it okay to push my partial symbols test as-is?
Thanks
Bernd.
>>> Thanks
>>> Bernd.
>>>
>>
>> Haha, I also wrote the same patch:
>>
>> https://sourceware.org/pipermail/gdb-patches/2021-January/175225.html
>>
>
> Heh, this starts to sound a lot like a "how many software engineers does
> it take to fix one line of code" kind of joke :)
>
>> Either of your patches is fine with me. Note that the test that I add
>> later in my series (written with the DWARF assembler) triggers the bug
>> as well.
>
> Ah, that's good to know.
>
> I've push mine, and added you both as author in the ChangeLog.
>
> Thanks,
> - Tom
>
>
next prev parent reply other threads:[~2021-01-25 15:47 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-25 12:24 Tom de Vries
2021-01-25 12:52 ` Bernd Edlinger
2021-01-25 15:27 ` Simon Marchi via Gdb-patches
2021-01-25 15:37 ` Tom de Vries
2021-01-25 15:47 ` Bernd Edlinger [this message]
2021-01-25 16:36 ` Simon Marchi via Gdb-patches
2021-01-25 17:42 ` Bernd Edlinger
2021-01-25 18:12 ` Simon Marchi via Gdb-patches
2021-01-25 18:53 ` Bernd Edlinger
2021-01-25 19:20 ` Bernd Edlinger
2021-01-26 1:52 ` Simon Marchi via Gdb-patches
2021-01-26 7:47 ` Bernd Edlinger
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=AM8PR10MB4708288F8A42B6D97C8A4DA1E4BD0@AM8PR10MB4708.EURPRD10.PROD.OUTLOOK.COM \
--to=bernd.edlinger@hotmail.de \
--cc=gdb-patches@sourceware.org \
--cc=simon.marchi@polymtl.ca \
--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