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: DW_AT_specification: long ago GDB change


On 15 Apr 2004 00:17:23 -0500, Jim Blandy <jimb@redhat.com> wrote:

> Back in 1999, you posted this patch:
>
>     http://sources.redhat.com/ml/gdb-patches/1999-q4/msg00325.html
>
> Do you know why you tested for the presence of DW_AT_specification, as
> well as DW_AT_declaration?
>
> I can't think of a case where a die would be a declaration, but also
> refer to a specification; since DW_AT_specification generally points
> from definitions to previous declarations, I'd rather expect
> specifications to point at declarations.  And even if a declaration
> did have a specification, it would still be a declaration.

Yes.  IIRC, the issue is that dwarf_attr looks through the
DW_AT_specification link, so it will find a DW_AT_declaration attribute in
the definition.  Also looking for DW_AT_specification allows us to avoid
that false positive for the test.

Jason


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