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: [RFA 2/4] dwarf2_physname


On Fri, Feb 05, 2010 at 09:13:32AM -0800, Keith Seitz wrote:
> I hadn't either. Next iteration in attached patch.
> 
> BTW, while goofing around with the code a bit, it appears that since
> I wrote all of this many, many months ago, things have changed (for
> the better). physname_prefix and dependents are no longer necessary.
> We can use determine_prefix instead. I apologize that I did not catch
> this earlier.

This version looks much nicer.  I'm still confused about
die_needs_namespace, but I think we're almost done.

> +    case DW_TAG_variable:
> +      if (dwarf2_attr (die, DW_AT_specification, cu))
> +	{
> +	  struct dwarf2_cu *spec_cu = cu;
> +	  return die_needs_namespace (die_specification (die, &spec_cu),
> +				      spec_cu);
> +	}
> +
> +      return die_needs_namespace (die->parent, cu);

Recursing to follow the specification makes sense.  I don't think
recursing onto the parent makes sense though.  Won't this cause
the wrong answer for:

DW_TAG_subprogram
  DW_TAG_variable

?  If that doesn't matter, then I'm totally confused again :-)
That's your basic local variable.

Otherwise, everything looks OK.

-- 
Daniel Jacobowitz
CodeSourcery


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