[PATCH] D93497: Salvage debug info for function arguments in coro-split funclets.
Chuanqi Xu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 4 03:51:06 PST 2021
ChuanqiXu added a comment.
Hi all, I want to ask some question about the debug information in coroutine. I wonder this patch may be a suitable place.
I know this patch intentionally to solve problems under O0.
And I want to enable the ability to debug coroutine program with optimization.
Now I create following instruction with '-O2 -emit-llvm':
%local.reload.addr = getelementptr %FramePtrTy, %FramePtrTy %Frame, ...
call void @llvm.dbg.declare(metadata %"struct_type"* %a.reload.addr, metadata !1, metadata !DIExpression()), !dbg !2
; ...
!1 = !DILocalVariable(name: "a", ... );
But I find I can't print the value of a in debugger. To my understanding, `%a.reload.addr` marks the address of `a`. So gdb should know the address of `a` and print its value.
What's going wrong?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D93497/new/
https://reviews.llvm.org/D93497
More information about the llvm-commits
mailing list