[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
Fri Jan 10 13:01:40 PST 2020


vsk marked an inline comment as done.
vsk added a subscriber: djtodoro.
vsk added inline comments.


================
Comment at: llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp:984-991
   // from one function to another.
   if (DD->getDwarfVersion() == 4 && DD->tuneForGDB()) {
     assert(PCAddr && "Missing PC information for a call");
     addLabelAddress(CallSiteDIE, dwarf::DW_AT_low_pc, PCAddr);
   } else if (!IsTail || DD->tuneForGDB()) {
-    assert(PCOffset && "Missing return PC information for a call");
-    addAddressExpr(CallSiteDIE, dwarf::DW_AT_call_return_pc, PCOffset);
+    assert(PCAddr && "Missing return PC information for a call");
+    addLabelAddress(CallSiteDIE, dwarf::DW_AT_call_return_pc, PCAddr);
----------------
dblaikie wrote:
> Side question: How'd this end up like this? Why all these GDB tuning checks? Seems like it'd add another layer of complexity/variety that'll make it harder for us to all be evaluating the same things. 
+ @djtodoro, I'm not sure why AT_call_return_pc would be needed at a tail call site as the debugger must ignore it. As for emitting DW_AT_low_pc under gdb tuning, I think this might be an artifact from the original GNU implementation.


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

https://reviews.llvm.org/D72489





More information about the lldb-commits mailing list