This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: DW_AT_specification: long ago GDB change
- From: Jason Merrill <jason at redhat dot com>
- To: Jim Blandy <jimb at redhat dot com>
- Cc: gdb-patches at redhat dot com
- Date: Thu, 15 Apr 2004 09:51:05 -0400
- Subject: Re: DW_AT_specification: long ago GDB change
- References: <vt2ad1d6crg.fsf@zenia.home>
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