[PATCH] D24706: [ELF] - Partial support of --gdb-index command line option (Part 1).

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 5 02:23:39 PDT 2016


grimar added a comment.

In https://reviews.llvm.org/D24706#561568, @echristo wrote:

> I think calling the file SplitDebugInfo.cpp is a bit of a misnomer, there's nothing related to fission/split-dwarf/etc in it other than a couple of references. Also not sure why we need yet another dwarf parser here rather than using the one in llvm?
>
> Looks fine otherwise though.
>
> -eric


Thanks for comments, Eric !

I called it SplitDebugInfo.cpp initially as this patch is a part of https://reviews.llvm.org/D24267 where this file contains whole functionality needed
by linker for generation --gdb-index, for example implementation of symbol hash table (GdbHashTab). So it is relative to fussion.
I am fine with renaming it to something if you think it is misnomer though. May be GdbIndex.cpp ?

We are trying to keep code minimal and fast in linker, but llvm parsers are generic and generally do more job than we need, short quick example:
Imaging I want to get address ranges and so I want to use DWARFDebugInfoEntryMinimal::getAddressRanges(const DWARFUnit *U).
For doing that I need DWARFUnit, which requires DWARFContext in constructor. Looking at comments that says 
"DWARFContextInMemory is the simplest possible implementation of a DWARFContext.", I am opening its constructor and
see that it takes an object and do a scan over all sections uncompresses the compressed ones. But we do not need that as we already have
content of sections available.

https://reviews.llvm.org/D24267 which is full version of this functionality shows that we seems need not that lot of parsing code for --gdb-index option in total,
I think using own inplementation should allow to make it faster.



> echristo wrote in SplitDebugInfo.cpp:290
> "parcer" -> "parser"

Done.

> echristo wrote in gdb-index.s:2
> "were generated in this way"

Done.

https://reviews.llvm.org/D24706





More information about the llvm-commits mailing list