[PATCH] D104341: API to get Address Offset Section

Alexander Yermolovich via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 15 18:50:11 PDT 2021


ayermolo added a comment.

In D104341#2820787 <https://reviews.llvm.org/D104341#2820787>, @dblaikie wrote:

> In D104341#2820780 <https://reviews.llvm.org/D104341#2820780>, @ayermolo wrote:
>
>> In D104341#2820734 <https://reviews.llvm.org/D104341#2820734>, @dblaikie wrote:
>>
>>> Can you instead use the API more like the way llvm-symbolizer does - starting with the skeleton CU in the executable and it'll be able to load the dwp itself? (this codepath is already present and more tested, covers other sections like rnglists, etc, that you'll need too)
>>
>> Hmm. I thought way below is it.
>>
>> Only relevant code. DwCtx is context of binary.
>>
>>   DWPContext = DwCtx->getDWOContext(opts::DWPPath.c_str());
>>   llvm::Optional<uint64_t> DWOId = DwarfUnit->getDWOId()
>>   DWARFCompileUnit *DWOCU = DWPContext.get()->getDWOCompileUnitForHash(*DWOId);
>>
>> Let me poke around llvm-symbolizer some more. Last time I looked I don't remember seeing low level APIs, and more high level ones.
>
> Yeah, most of the symbolizers APIs are higher level - but what I mean is that the symbolizer libraries use the libDebugInfo[DWARF] APIs in such a way as to correctly wire up the everything when they start from the executables context (rather than the dwp/dwo context) - so doing things the same way (& hopefully sharing as much code as possible) is probably a good direction to look at.

Ah, figured it out. Thanks! This diff can be abandoned.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D104341/new/

https://reviews.llvm.org/D104341



More information about the llvm-commits mailing list