Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Simon Marchi via Gdb-patches <gdb-patches@sourceware.org>
To: Tom de Vries <tdevries@suse.de>, gdb-patches@sourceware.org
Subject: Re: [PATCH][gdb/symtab] Fix duplicate CUs in create_cus_from_debug_names_list
Date: Wed, 3 Feb 2021 13:29:08 -0500	[thread overview]
Message-ID: <160b7f2f-944e-d971-d5c9-43545ef392e1@polymtl.ca> (raw)
In-Reply-To: <20210202113513.GA10112@delia>

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, &section, 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.  I noticed the indentation is
wrong in the code above, could you push a patch to fix that?

Simon

  reply	other threads:[~2021-02-03 18:29 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 [this message]
2021-02-05  8:21   ` 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=160b7f2f-944e-d971-d5c9-43545ef392e1@polymtl.ca \
    --to=gdb-patches@sourceware.org \
    --cc=simon.marchi@polymtl.ca \
    --cc=tdevries@suse.de \
    /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