Compile this simple code with g++ -g. I tried 3.3, 4.0, and 4.1 compilers. namespace bar { struct whatever { int someval; }; typedef whatever zot; }; int main() { bar::whatever b; bar::zot c; return 1; } The debugging information will reveal that "whatever" is in bar, but not "zot". In fact, "zot" will appear to be defined in main instead. This prevents the debugger from e.g. "ptype bar::zot".
Confirmed.
I tried this with some random svn trunk checkout, and it worked ok: <1><25>: Abbrev Number: 2 (DW_TAG_namespace) <26> DW_AT_name : bar <2a> DW_AT_decl_file : 1 <2b> DW_AT_decl_line : 2 <2c> DW_AT_sibling : <0x42> <2><30>: Abbrev Number: 3 (DW_TAG_structure_type) <31> DW_AT_name : (indirect string, offset: 0x4c): whatever <35> DW_AT_declaration : 1 <2><36>: Abbrev Number: 4 (DW_TAG_typedef) <37> DW_AT_name : zot <3b> DW_AT_decl_file : 1 <3c> DW_AT_decl_line : 7 <3d> DW_AT_type : <0x42>
Works for me too, using GCC 4.4.