This is the mail archive of the archer@sourceware.org mailing list for the Archer 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: Interpretation of DW_AT_external


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


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