Modules and debugging in DWARF
Iain Buclaw
ibuclaw at gdcproject.org
Sat Feb 22 11:39:38 PST 2014
On 22 February 2014 18:15, Sarath Kodali <sarath at dummy.com> wrote:
> On Saturday, 22 February 2014 at 00:30:18 UTC, Iain Buclaw wrote:
>>
>> Hi all,
>>
> [skip]
>
>>
>> And currently I'm testing selective imports to be represented as
>> DW_TAG_imported_declaration. Don't have any examples for yet, but it looks
>> like it would be the imported declaration tag pointing to the real
>> declaration.
>>
>>
>> Regards
>> Iain.
>
>
> Below is dwarf info generated by g++ for selective imports in C++
> code.
>
> < 1><0x00000045> DW_TAG_typedef
> DW_AT_name va_list
> DW_AT_decl_file 0x00000002
> /usr/lib/gcc/i586-suse-linux/4.7/include/stdarg.h
> DW_AT_decl_line 0x00000066
> DW_AT_type <0x00000029>
> < 1><0x00000050> DW_TAG_namespace
> DW_AT_name std
> DW_AT_decl_file 0x00000004
> /home/sarath/development/dbg/tests/c/<built-in>
> DW_AT_decl_line 0x00000000
> DW_AT_sibling <0x00000079>
> < 2><0x0000005b> DW_TAG_imported_declaration
> DW_AT_decl_file 0x00000005
> /usr/include/c++/4.7/cstdarg
> DW_AT_decl_line 0x00000038
> DW_AT_import <0x00000045>
>
> - Sarath
Yeah, I don't need to know that per say (although I will have to bear
in mind how GDB represents it in its runtime environment). GCC
provides a handy debug hooks called 'imported_module_or_decl'. I just
need to make sure that the trees passed to it are generated correctly.
:-)
I just posted this information because this is what gdc does today,
and at least DMD developers have the misfortune for having to have to
worry about this. :o)
Regards
Iain.
More information about the Digitalmars-d
mailing list