[PATCH] D105985: Support GSYM in llvm-symbolizer.

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 19 01:01:08 PDT 2021


jhenderson added a comment.

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

> In D105985#2886506 <https://reviews.llvm.org/D105985#2886506>, @jhenderson wrote:
>
>> In D105985#2882575 <https://reviews.llvm.org/D105985#2882575>, @simon.giesecke wrote:
>>
>>> 
>>
>> A better approach might be to write the GSYM test from scratch, as if the DWARF test didn't exist, and then write a DWARF equivalent one (alternatively the other way around would also work). The important parts of sym.test could then be split off.
>
> Hm, that makes sense. I'll give the cross-project-tests a look.
>
> However, one general question that comes to my mind here: The addresses will probably be platform-specific. How can I deal with that? I can determine the addresses on my local (Linux amd64) platform, but how would I do the same generally? I can use `nm` to determine the address of `main` (which for the canned binary is 0x400540), but I need some offset to identify an inlined location (which is 0x40054d) for the canned binary. I probably can't generally assume that 0xd is an appropriate offset for any platform.

I'd pin to a specific triple, e.g. x86-64 (along with appropriate REQUIRES), so that the addresses aren't going to change due to moving to a different machine.


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