Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom de Vries via Gdb-patches <gdb-patches@sourceware.org>
To: Tom Tromey <tom@tromey.com>,
	Tom de Vries via Gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH][gdb/testsuite] Generate .debug_aranges entry for dummy CU
Date: Fri, 27 Aug 2021 16:52:17 +0200	[thread overview]
Message-ID: <d3b86a14-0a07-ebbf-6c9f-3feae2396d41@suse.de> (raw)
In-Reply-To: <875yvrovgk.fsf@tromey.com>

On 8/27/21 3:42 PM, Tom Tromey wrote:
>>>>>> "Tom" == Tom de Vries via Gdb-patches <gdb-patches@sourceware.org> writes:
> 
> Tom> A best practise for DWARF [1] is to generate .debug_aranges entries for CUs
> Tom> even if they have no address range.
> 
> Tom> Generate .debug_arange entries for the dummy CUs added by the DWARF assembler.
> 
> Tom> Tested on x86_64-linux.
> 
> Tom> [1] http://wiki.dwarfstd.org/index.php?title=Best_Practices
> 
> Tom> Any comments?
> 
> Tom> +	declare_labels dummy_cu
> 

[ FWIW, with the committed "[gdb/testsuite] Add label option to proc cu"
there's also no longer a need for declare_labels. ]

> If there are two dummy CUs, won't the labels clash?

No, due to the way cu labels are defined in "[gdb/testsuite] Add label
option to proc cu".

So, for say test-case gdb.dwarf2/dw2-ranges-base.exp we have these
references:
...
$ grep "Offset" outputs/gdb.dwarf2/dw2-ranges-base/dw2-ranges-base-dw.S
        .4byte        .Lcu0_begin       /* Offset into .debug_info */
        .4byte        .Lcu1_begin       /* Offset into .debug_info */
        .4byte        .Lcu2_begin       /* Offset into .debug_info */
...
where .Lcu0_begin is a dummy CU, .Lcu1_begin is the one specified by the
.exp file and .Lcu2_begin is another dummy CU.

Thanks,
- Tom

  reply	other threads:[~2021-08-27 14:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-26 11:58 Tom de Vries via Gdb-patches
2021-08-27 13:42 ` Tom Tromey
2021-08-27 14:52   ` Tom de Vries via Gdb-patches [this message]
2021-08-27 16:40     ` Tom Tromey

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=d3b86a14-0a07-ebbf-6c9f-3feae2396d41@suse.de \
    --to=gdb-patches@sourceware.org \
    --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