This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patchv2 2/2] PR 15231: import bare DW_TAG_lexical_block
- From: Pedro Alves <palves at redhat dot com>
- To: Jan Kratochvil <jan dot kratochvil at redhat dot com>, gdb-patches at sourceware dot org
- Date: Mon, 30 May 2016 11:45:14 +0100
- Subject: Re: [patchv2 2/2] PR 15231: import bare DW_TAG_lexical_block
- Authentication-results: sourceware.org; auth=none
- References: <20160529141043 dot GB13685 at host1 dot jankratochvil dot net>
On 05/29/2016 03:10 PM, Jan Kratochvil wrote:
> --- a/gdb/dwarf2read.c
> +++ b/gdb/dwarf2read.c
> @@ -1610,10 +1610,13 @@ static int dwarf2_ranges_read (unsigned, CORE_ADDR *, CORE_ADDR *,
> values. */
> enum pc_bounds_kind
The code that uses this enum is now assuming order in the values:
> + if (dwarf2_get_pc_bounds (die, &low, &high, cu, NULL) >= pc_bounds_ranges)
...
> + has_pc_info <= pc_bounds_invalid, cu);
Please extend the comment above "enum pc_bounds_kind" to say something
about this.
> + case pc_bounds_not_present:
> + /* DW_TAG_lexical_block has no attributes, process its children as if
> + there was no wrapping by that DW_TAG_lexical_block.
> + GCC does no longer produces such DWARF since GCC r224161. */
> + for (child_die = die->child; child_die && child_die->tag;
> + child_die = sibling_die (child_die))
for (child_die = die->child;
child_die != NULL && child_die->tag != NULL;
child_die = sibling_die (child_die))
> + process_die (child_die, cu);
> + return;
> + case pc_bounds_invalid:
> + return;
LGTM with those changes.
Thanks,
Pedro Alves