This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patchv2 2/2] PR 15231: import bare DW_TAG_lexical_block


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]