This is the mail archive of the gdb@sourceware.org mailing list for the GDB 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: FYI DWARF .gdb_index-like proposal by Apple


Jan> just a highlight of submitted DWARF extension with new indexes:
Jan> 	http://www.dwarfstd.org/ShowIssue.php?issue=130410.1&type=open
Jan> I have not checked yet if it is sufficient for GDB instead of .gdb_index.

Jakub asked me to send my notes on this to the public list.


The big issue I found with it is that it doesn't specify name
canonicalization.  It just defers to DW_AT_name.  This would probably
prevent us from using it in gdb.

I think either name canonicalization is needed to successfully look up
template instantiations, or everything has to be simple names; but then
that seems to require multiple trips through the index to look anything
up.

Perhaps the intent is that readers can use the demangler on the mangled
form of names.  However, this is quite expensive.  I think it would
defeat the purpose of the index.


It wasn't clear to me how this interacts with dwz.


.gdb_index has a section that indicates the CU offsets in .debug_info.

This is needed because you cannot read a DIE without first reading the
CU's header.  Various things in DWARF depend on data in the header.

The proposed index seems to handle this via DW_ATOM_cu_offset.  However
this seems somewhat bloaty given that this is required in order to be
correct; at least without some other bit saying "please pretend all CUs
have the same header settings".

Perhaps the idea is that CU boundaries are to be determined from
.debug_aranges.


It wasn't clear to me how this index handles duplication.  E.g. nearly
every CU defines "int".  gdb's index is defined to squash these
duplicates.


I'm not convinced that the treatment of anonymous namespaces is what
readers want.  I don't have a counter-proposal.  I think .gdb_index
probably gets this wrong as well.


Naturally I may have misunderstood things.  I welcome your insight.

Tom


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