[PATCH] D70293: Fix PR44001: assert failure in getFunctionLocalOffsetAfterInsn
Thomas Preud'homme via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 18 05:27:28 PST 2019
thopre marked an inline comment as done.
thopre added inline comments.
================
Comment at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp:772-777
// Address of a call-like instruction for a normal call or a jump-like
// instruction for a tail call. This is needed for GDB + DWARF 4 tuning.
const MCSymbol *PCAddr =
- ApplyGNUExtensions ? const_cast<MCSymbol*>(getLabelAfterInsn(&MI))
- : nullptr;
+ ApplyGNUExtensions
+ ? const_cast<MCSymbol *>(getLabelAfterInsn(TopLevelCallMI))
+ : nullptr;
----------------
BTW this seems wrong to me, it should probably be getLabelBeforeInsn(MI) but would need labels to be added before call MIs inside a bundle rather than after bundle MIs with a call MI. On the testcase below it gives a DW_AT_low_pc of 0x8 for the following code:
Disassembly of section .text:
00000000 foo:
0: 00 40 00 5a 5a004000 { call 0x0
4: 00 c0 9d a0 a09dc000 allocframe(#0) }
8: 40 3f 00 51 51003f40 { r0 = add(r0,#1); dealloc_return }
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D70293/new/
https://reviews.llvm.org/D70293
More information about the llvm-commits
mailing list