[Lldb-commits] [PATCH] D72489: [DWARF] Emit DW_AT_call_return_pc as an address

Vedant Kumar via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Jan 9 18:16:41 PST 2020


vsk created this revision.
vsk added reviewers: aprantl, labath, dblaikie.
Herald added a subscriber: hiraditya.
Herald added a reviewer: JDevlieghere.
Herald added a project: LLVM.

This reverts D53469 <https://reviews.llvm.org/D53469>, which changed llvm's DWARF emission to emit
DW_AT_call_return_pc as a function-local offset. Such an encoding is not
compatible with post-link block re-ordering tools and isn't standards-
compliant.

In addition to reverting back to the original DW_AT_call_return_pc
encoding, teach lldb how to fix up DW_AT_call_return_pc when the address
comes from an object file pointed-to by a debug map. While doing this I
noticed that lldb's support for tail calls that cross a DSO/object file
boundary wasn't covered, so I added tests for that. This latter case
exercises the newly added return PC fixup.

The dsymutil changes in this patch were originall included in D49887 <https://reviews.llvm.org/D49887>:
the associated test should be sufficient to test DW_AT_call_return_pc
encoding purely on the llvm side.


https://reviews.llvm.org/D72489

Files:
  lldb/include/lldb/Symbol/Function.h
  lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/cross_dso/Makefile
  lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/cross_dso/One.mk
  lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/cross_dso/One/One.c
  lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/cross_dso/TestCrossDSOTailCalls.py
  lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/cross_dso/Two.mk
  lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/cross_dso/Two/Two.c
  lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/cross_dso/main.c
  lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/cross_dso/shared.h
  lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/cross_object/Makefile
  lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/cross_object/One.c
  lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/cross_object/TestCrossObjectTailCalls.py
  lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/cross_object/Two.c
  lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/cross_object/main.c
  lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/cross_object/shared.h
  lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
  lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
  lldb/source/Symbol/Function.cpp
  llvm/include/llvm/CodeGen/DebugHandlerBase.h
  llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp
  llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
  llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
  llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
  llvm/test/tools/dsymutil/Inputs/call-site-entry.c
  llvm/test/tools/dsymutil/Inputs/call-site-entry.macho.x86_64
  llvm/test/tools/dsymutil/Inputs/call-site-entry.macho.x86_64.o
  llvm/test/tools/dsymutil/call-site-entry-linking.test
  llvm/tools/dsymutil/DwarfLinker.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D72489.237231.patch
Type: text/x-patch
Size: 26840 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20200110/433c56c8/attachment-0001.bin>


More information about the lldb-commits mailing list