[PATCH] D73159: ARM64: Debug info for structure argument missing DW_AT_location
kamlesh kumar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 22 10:32:59 PST 2020
kamleshbhalui added a comment.
@vsk thanks for reviewing.
below dump is taken, by debugging the clang with this test
#include<stdio.h>
typedef struct {
double a,b,c,d,e;
}mystruct;
void foo(mystruct ms){
printf("%llu\n",(unsigned long long) &ms);
}
This is the dump before erasing the MI ()
bb.1.entry:
liveins: $x0
%0:gpr64(p0) = COPY $x0
%4:gpr64(p0) = MOVaddr target-flags(aarch64-page) @.str, target-flags(aarch64-pageoff, aarch64-nc) @.str, debug-location !DILocation(line: 0, scope: !9); kk3.c:0
DBG_VALUE %0:gpr64(p0), $noreg, !"ms", !DIExpression(DW_OP_deref), debug-location !22; kk3.c:5:19 line no:5
%1:gpr64(s64) = COPY %0:gpr64(p0), debug-location !23; kk3.c:7:1
ADJCALLSTACKDOWN 0, 0, implicit-def $sp, implicit $sp, debug-location !24; kk3.c:6:5
$x0 = COPY %4:gpr64(p0), debug-location !24; kk3.c:6:5
$x1 = COPY %1:gpr64(s64), debug-location !24; kk3.c:6:5
BL @printf, <regmask $fp $lr $b8 $b9 $b10 $b11 $b12 $b13 $b14 $b15 $d8 $d9 $d10 $d11 $d12 $d13 $d14 $d15 $h8 $h9 $h10 $h11 $h12 $h13 $h14 $h15 $s8 $s9 $s10 $s11 $s12 $s13 $s14 and 51 more...>, implicit-def $lr, implicit $sp, implicit $x0, implicit $x1, implicit-def $w0, debug-location !24; kk3.c:6:5
ADJCALLSTACKUP 0, 0, implicit-def $sp, implicit $sp, debug-location !24; kk3.c:6:5
RET_ReallyLR debug-location !25; kk3.c:8:1
This MI ( %1:gpr64(s64) = COPY %0:gpr64(p0), debug-location !23; kk3.c:7:1)
is getting erased based on condition at line 176 and It is marking the DBG_VALUE for removal.
Which makes difficult to debug even unoptimized code.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D73159/new/
https://reviews.llvm.org/D73159
More information about the llvm-commits
mailing list