[PATCH] D102224: Add option to llvm-gsymutil to read addresses from stdin.

Greg Clayton via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 13 11:30:28 PDT 2021


clayborg added a comment.

In D102224#2874784 <https://reviews.llvm.org/D102224#2874784>, @simon.giesecke wrote:

>>> That makes me wonder whether the direction this takes is actually the right one. Another option might be to add support for GSYM to llvm-symbolizer. Do you think this would be a better direction?
>>
>> It would be great to add support for GSYM into llvm-symbolizer! It also should be very easy to add if users supply the symbol file to llvm-symbolizer as it would be easy to sniff the first few bytes of the files for magic bytes and routing to the correctly file format's parser.
>
> I am working on this now :) I am trying to find my way around llvm-symbolizer, and I came across `DILineInfo`, which is documented as "A format-neutral container for source line information." Is there already a way to get a DILineInfo from GSYM files? I haven't found any direct way to do this, in GsymReader or so.

Not yet! Feel free to add an accessor to convert any GSYM data structures into DI data structures. There are two main formats that come out of GSYM: the full llvm::gsym::FunctionInfo or the llvm::gsym::LookupResult. llvm::gsym::FunctionInfo is the complete information for the function with the name, address range, line table and inline info. This info covers all addresses in the function. llvm::gsym::LookupResult is just the information you need for a single address and in a much friendlier format where all strings have been retrieved from the string table. It should be very easy to make any needed conversions. Let me know if you have any questions.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D102224



More information about the llvm-commits mailing list