[PATCH] D153536: [Clang] Implement P2169 A nice placeholder with no name
Corentin Jabot via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 5 09:06:44 PDT 2023
cor3ntin added a subscriber: hubert.reinterpretcast.
cor3ntin added a comment.
Some tests with lldb
(lldb) b main
Breakpoint 1: where = placeholder`main + 4 at debug_placeholder.cpp:2:9, address = 0x0000555555555134
(lldb) run
Process 4044833 launched: '/home/cor3ntin/dev/compilers/LLVM/build-release/placeholder' (x86_64)
Process 4044833 stopped
* thread #1, name = 'placeholder', stop reason = breakpoint 1.1
frame #0: 0x0000555555555134 placeholder`main at debug_placeholder.cpp:2:9
1 int main() {
-> 2 int _ = 0;
3 int _ = 0;
4 int _ = 0;
5 {
6 int _ = 0;
7 int _ = 0;
(lldb) step
Process 4044833 stopped
* thread #1, name = 'placeholder', stop reason = step in
frame #0: 0x000055555555513b placeholder`main at debug_placeholder.cpp:3:9
1 int main() {
2 int _ = 0;
-> 3 int _ = 0;
4 int _ = 0;
5 {
6 int _ = 0;
7 int _ = 0;
(lldb) step
Process 4044833 stopped
* thread #1, name = 'placeholder', stop reason = step in
frame #0: 0x0000555555555142 placeholder`main at debug_placeholder.cpp:4:9
1 int main() {
2 int _ = 0;
3 int _ = 0;
-> 4 int _ = 0;
5 {
6 int _ = 0;
7 int _ = 0;
(lldb) frame variable
(int) _ = 0
(int) _ = 0
(int) _ = 0
(lldb) step
Process 4044833 stopped
* thread #1, name = 'placeholder', stop reason = step in
frame #0: 0x0000555555555149 placeholder`main at debug_placeholder.cpp:6:13
3 int _ = 0;
4 int _ = 0;
5 {
-> 6 int _ = 0;
7 int _ = 0;
8 }
9 }
(lldb) step
Process 4044833 stopped
* thread #1, name = 'placeholder', stop reason = step in
frame #0: 0x0000555555555150 placeholder`main at debug_placeholder.cpp:7:13
4 int _ = 0;
5 {
6 int _ = 0;
-> 7 int _ = 0;
8 }
9 }
(lldb) frame variable
(int) _ = 0
(int) _ = 0
(int) _ = 0
(int) _ = 0
(int) _ = 32767
(lldb)
Seems to work well enough @hubert.reinterpretcast
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D153536/new/
https://reviews.llvm.org/D153536
More information about the cfe-commits
mailing list