[PATCH] D103131: support debug info for alias variable
kamlesh kumar via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 22 19:27:04 PDT 2021
kamleshbhalui added a comment.
In D103131#2834744 <https://reviews.llvm.org/D103131#2834744>, @dblaikie wrote:
> Huh, that surprises me - guess gdb favors checking the symbol first. I guess maybe it is using something that determines that that symbol comes from the file with debug info - because on a similar test case (one file without debug info, defining some global variable `i`, another file with debug info with a `using ns::i` in the global scope - printing `i` when stepping into the second file correctly prints the `using` based alias value, but stepping into the file without debug info and printing `i` complains about not knowing the type of that `i`)
>
> How's lldb go?
lldb seems to be printing value , but I worry about type.
* thread #1, name = 'a.out', stop reason = breakpoint 1.1
frame #0: 0x0000000000400484 a.out`main at test.c:3:12
1 int oldname = 1;
2 extern int newname __attribute__((alias("oldname")));
-> 3 int main(){}
(lldb) p oldname
(int) $0 = 1
(lldb) p newname
(void *) $1 = 0x0000000000000001
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D103131/new/
https://reviews.llvm.org/D103131
More information about the cfe-commits
mailing list