From: Tom de Vries <tdevries@suse.de>
To: Simon Marchi <simon.marchi@polymtl.ca>, gdb-patches@sourceware.org
Subject: Re: [PATCH][gdb/symtab] Fix duplicate CUs in create_cus_from_debug_names_list
Date: Fri, 5 Feb 2021 09:21:30 +0100 [thread overview]
Message-ID: <b1ab036a-7db8-420a-1045-7b269d48d9a8@suse.de> (raw)
In-Reply-To: <160b7f2f-944e-d971-d5c9-43545ef392e1@polymtl.ca>
On 2/3/21 7:29 PM, Simon Marchi wrote:
> On 2021-02-02 6:35 a.m., Tom de Vries wrote:
>> Hi,
>>
>> When running test-case gdb.dwarf2/clang-debug-names.exp, I run into the
>> following warning:
>> ...
>> (gdb) file clang-debug-names^M
>> Reading symbols from clang-debug-names...^M
>> warning: Section .debug_aranges in clang-debug-names has duplicate \
>> debug_info_offset 0xc7, ignoring .debug_aranges.^M
>> ...
>>
>> This is caused by a missing return in commit 3ee6bb113af "[gdb/symtab] Fix
>> incomplete CU list assert in .debug_names".
>>
>> Fix this by adding the missing return, such that we have instead this warning:
>> ...
>> (gdb) file clang-debug-names^M
>> Reading symbols from clang-debug-names...^M
>> warning: Section .debug_aranges in clang-debug-names \
>> entry at offset 0 debug_info_offset 0 does not exists, \
>> ignoring .debug_aranges.^M
>> ...
>> which is a known problem filed as PR25969 - "Ignoring .debug_aranges with
>> clang .debug_names".
>>
>> Tested on x86_64-linux.
>>
>> Any comments?
>>
>> Thanks,
>> - Tom
>>
>> [gdb/symtab] Fix duplicate CUs in create_cus_from_debug_names_list
>>
>> gdb/ChangeLog:
>>
>> 2021-02-02 Tom de Vries <tdevries@suse.de>
>>
>> PR symtab/27307
>> * dwarf2/read.c (create_cus_from_debug_names_list): Add missing
>> return.
>>
>> gdb/testsuite/ChangeLog:
>>
>> 2021-02-02 Tom de Vries <tdevries@suse.de>
>>
>> PR symtab/27307
>> * gdb.dwarf2/clang-debug-names.exp: Check file command warnings.
>>
>> ---
>> gdb/dwarf2/read.c | 1 +
>> gdb/testsuite/gdb.dwarf2/clang-debug-names.exp | 16 ++++++++++++++++
>> 2 files changed, 17 insertions(+)
>>
>> diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
>> index 0a00f89cf6d..872b4e7bcf2 100644
>> --- a/gdb/dwarf2/read.c
>> +++ b/gdb/dwarf2/read.c
>> @@ -5323,6 +5323,7 @@ create_cus_from_debug_names_list (dwarf2_per_bfd *per_bfd,
>> = create_cu_from_index_list (per_bfd, §ion, is_dwz, sect_off, 0);
>> per_bfd->all_comp_units.push_back (per_cu);
>> }
>> + return;
>> }
>
> I don't know the specific details of this, but from a quick glance it
> makes sense. It seems like two methods of patsing the CU table, we
> don't want to run through the two methods.
Thanks for the review.
> I noticed the indentation is
> wrong in the code above, could you push a patch to fix that?
Done, and committed this one.
Thanks,
- Tom
prev parent reply other threads:[~2021-02-05 8:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-02 11:35 Tom de Vries
2021-02-03 18:29 ` Simon Marchi via Gdb-patches
2021-02-05 8:21 ` Tom de Vries [this message]
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=b1ab036a-7db8-420a-1045-7b269d48d9a8@suse.de \
--to=tdevries@suse.de \
--cc=gdb-patches@sourceware.org \
--cc=simon.marchi@polymtl.ca \
/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