[PATCH] D73526: [SafeStack][DebugInfo] Insert DW_OP_deref in correct location
Bjorn Pettersson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 4 14:05:47 PST 2020
bjope added a comment.
In D73526#1857628 <https://reviews.llvm.org/D73526#1857628>, @leonardchan wrote:
> In D73526#1857223 <https://reviews.llvm.org/D73526#1857223>, @bjope wrote:
>
> > This broke some of our downstream tests using vla:s. Those are compiled from C and executed in gdb. What happens is that DW_OP_deref disappears and then the debugger prints the wrong value.
>
>
> Separate from my previous comment, would it be possible to share your downstream test for debugging, or at least a "sanitized" version safe for upstream?
As I wrote earlier, this is seen when running `llc -O1 -mtriple=x86_64-unknown-linux-gnu -o - test/DebugInfo/X86/safestack-deref.ll`.
If also adding `-print-after-all` you'll find
DBG_VALUE %2:gr64, 0, !"value", !DIExpression(DW_OP_constu, 8, DW_OP_minus), debug-location !7; /tmp/test3.cpp:8:5 line no:8 indirect
before regalloc, and after you get
DBG_VALUE $rbx, $noreg, !"value", !DIExpression(DW_OP_constu, 8, DW_OP_minus), debug-location !7; /tmp/test3.cpp:8:5 line no:8
so LiveDebugVariables simply drops the "indirect" information.
Is that good enough as a test case?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D73526/new/
https://reviews.llvm.org/D73526
More information about the llvm-commits
mailing list