[PATCH] D105985: Support GSYM in llvm-symbolizer.
Simon Giesecke via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 16 00:27:28 PDT 2021
simon.giesecke marked 5 inline comments as done.
simon.giesecke added inline comments.
================
Comment at: llvm/lib/DebugInfo/GSYM/GsymDIContext.cpp:99-100
+DILineInfoTable
+GsymDIContext::getLineInfoForAddressRange(object::SectionedAddress Address,
+ uint64_t Size,
+ DILineInfoSpecifier Specifier) {
----------------
clayborg wrote:
> as long as we are doing this layer, we might as well fill this in. The code above is a good start. Something like:
>
> ```
> if (Address.SectionIndex != llvm::object::SectionedAddress::UndefSection)
> return DILineInfoTable();
>
> if (auto FuncInfoOrErr = Reader->getFunctionInfo(Address.Address)) {
> if (FuncInfoOrErr->OptLineTable) {
> const gsym::LineTable < = *FuncInfoOrErr->OptLineTable;
> const uint64_t StartAddr = Address.Address;
> const uint64_t EndAddr = Address.Address + Size;
> for (const auto &gsym::LineEntry : LT) {
> if (StartAddr <= LineEntry.Addr && LineEntry.Addr < EndAddr) {
> // Use LineEntry.Addr, LineEntry.File (which is a file index into the
> // files tables from the GsymReader), and LineEntry.Line (source line
> // number) to add stuff to the DILineInfoTable
> }
> }
> }
> } else {
> consumeError(LineTableOrErr.takeError());
> return DILineInfoTable();
> }
> ```
Ok.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D105985/new/
https://reviews.llvm.org/D105985
More information about the llvm-commits
mailing list