This is the mail archive of the gdb-patches@sources.redhat.com 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/dwarf-2] Fix for the null record problem


Daniel Jacobowitz <drow@false.org> writes:
> > The following C++ code produces Dwarf 2 info where the definition of
> > struct s::t has a DW_AT_specification attribute, but GDB doesn't skip
> > it, and I don't really understand why:
> 
> Did you misread die_is_declaration?
> 
>   return (dwarf2_attr (die, DW_AT_declaration, cu)
>           && ! dwarf2_attr (die, DW_AT_specification, cu));

Yes, I misread it.  That explains a lot.  :)

> I don't even know what that DW_AT_specification test is doing there -
> the idea of a declaration with a specification is pretty peculiar.
> ...
> It's not clear why the specification check is there; the important bit
> was presumably:
>  > !   if (die->has_children)
>  > !   if (die->has_children && ! die_is_declaration (die))
> 
> i.e. the point of the patch was to add the DW_AT_declaration check.

Yeah.  The other place it's used is in checking data members of
structs.  There, too, you shouldn't have declarations with
specifications.  I'll ask Jason if he remembers.

Joel,how about dropping the DW_AT_specification test from
die_is_declaration, and then using it in the new test in your patch?


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