From: Simon Marchi <simon.marchi@polymtl.ca>
To: Tom Tromey <tromey@adacore.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH v2] Add PROP_VARIABLE_NAME
Date: Fri, 4 Jun 2021 15:40:11 -0400 [thread overview]
Message-ID: <e2636173-5f0a-647c-0ee2-dbbbe03b900b@polymtl.ca> (raw)
In-Reply-To: <20210604173059.3021089-1-tromey@adacore.com>
On 2021-06-04 1:30 p.m., Tom Tromey wrote:
> With -fgnat-encodings=minimal, an internal version (these patches will
> be upstreamed in the near future) of the Ada compiler can emit DWARF
> for an array where the bound comes from a variable, like:
>
> <1><12a7>: Abbrev Number: 7 (DW_TAG_array_type)
> <12a8> DW_AT_name : (indirect string, offset: 0x1ae9): pck__my_array
> [...]
> <2><12b4>: Abbrev Number: 8 (DW_TAG_subrange_type)
> <12b5> DW_AT_type : <0x1294>
> <12b9> DW_AT_upper_bound : <0x1277>
>
> With the upper bound DIE being:
>
> <1><1277>: Abbrev Number: 2 (DW_TAG_variable)
> <1278> DW_AT_name : (indirect string, offset: 0x1a4d): pck__my_length___U
> <127c> DW_AT_type : <0x128f>
> <1280> DW_AT_external : 1
> <1280> DW_AT_artificial : 1
> <1280> DW_AT_declaration : 1
>
> Note that the variable is just a declaration -- in this situation, the
> variable comes from another compilation unit, and must be found when
> trying to compute the array bound.
>
> This patch adds a new PROP_VARIABLE_NAME kind, to enable this search.
>
> This same scenario can occur with DW_OP_GNU_variable_value, so this
> patch adds support for that as well.
The changes following my feedback LGTM, thanks.
Simon
prev parent reply other threads:[~2021-06-04 19:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-04 17:30 Tom Tromey
2021-06-04 19:40 ` Simon Marchi [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=e2636173-5f0a-647c-0ee2-dbbbe03b900b@polymtl.ca \
--to=simon.marchi@polymtl.ca \
--cc=gdb-patches@sourceware.org \
--cc=tromey@adacore.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).