[PATCH] D53469: [DWARF] Use a function-local offset for AT_call_return_pc

Pavel Labath via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 23 00:16:02 PST 2019


labath added a comment.

Yes, having a DW_FORM_addr which is actually not an address does not sound optimal. Using a data form would be better, and more consistent with the handling of DW_AT_high_pc.

About the lldb side, handling an DW_FORM_addr in a way which works for all debug info formats is tricky, but possible. IIRC, it involves resolving the address to a section+offset pair using the sections of the file which contains the debug info (so, the .o file in case of non-dsym mach-o), and then calling SymbolFileDWARF->FixupAddress(), which will translate that to the sections of the actual executable (in case of .o; otherwise it's a no-op). It shouldn't be necessary to use function-local offsets just for that, though it may be interesting to use them as an optimization for other reasons (but that won't work for propeller'd functions or functions split into hot+cold sections, etc..)


Repository:
  rL LLVM

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

https://reviews.llvm.org/D53469





More information about the llvm-commits mailing list