This is the mail archive of the
archer@sourceware.org
mailing list for the Archer project.
Re: Interpretation of DW_AT_external
- From: Daniel Jacobowitz <drow at false dot org>
- To: Sami Wagiaalla <swagiaal at redhat dot com>
- Cc: archer at sourceware dot org
- Date: Mon, 25 Aug 2008 11:04:33 -0400
- Subject: Re: Interpretation of DW_AT_external
- References: <48B2C595.60809@redhat.com>
On Mon, Aug 25, 2008 at 10:45:41AM -0400, Sami Wagiaalla wrote:
> the following program:
>
> namespace A{
> int a;
> }
>
> int main(){
> A::a;
> return 0;
> }
>
> compiled with gcc 4.3.0-8 produces the following debug info for int a:
>
> [...]
> <2><5d>: Abbrev Number: 5 (DW_TAG_variable)
> <5e> DW_AT_name : a
> <60> DW_AT_decl_file : 1
> <61> DW_AT_decl_line : 5
> <62> DW_AT_MIPS_linkage_name: (indirect string, offset: 0x2e):
> _ZN1A1aE
> <66> DW_AT_type : <0x4d>
> <6a> DW_AT_external : 1
> <6b> DW_AT_declaration : 1
> [...]
While GCC does use a somewhat different convention for DW_AT_external than
other compilers, this seems clearly correct; A::a is a globally
visible name. Why shouldn't 'a' be found in the global scope? Or do
you mean that 'a' with no 'A::' is found?
The name in GDB's symbol table will be "A::a".
--
Daniel Jacobowitz
CodeSourcery