1 | // clang-format off
|
2 | // REQUIRES: system-windows
|
3 |
|
4 | // RUN: %build -o %t.exe -- %s
|
5 | // RUN: env LLDB_USE_NATIVE_PDB_READER=1 %lldb -f %t.exe -s \
|
6 | // RUN: %p/Inputs/inline_sites_live.lldbinit 2>&1 | FileCheck %s
|
7 |
|
8 | void use(int) {}
|
9 |
|
10 | void __attribute__((always_inline)) bar(int param) {
|
11 | use(param); // BP_bar
|
12 | }
|
13 |
|
14 | void __attribute__((always_inline)) foo(int param) {
|
15 | int local = param+1;
|
16 | bar(param: local);
|
17 | use(param);
|
18 | use(local); // BP_foo
|
19 | }
|
20 |
|
21 | int main(int argc, char** argv) {
|
22 | foo(param: argc);
|
23 | }
|
24 |
|
25 | // CHECK: * thread #1, stop reason = breakpoint 1
|
26 | // CHECK-NEXT: frame #0: {{.*}}`main [inlined] bar(param=2)
|
27 | // CHECK: (lldb) expression param
|
28 | // CHECK-NEXT: (int) $0 = 2
|
29 | // CHECK: * thread #1, stop reason = breakpoint 2
|
30 | // CHECK-NEXT: frame #0: {{.*}}`main [inlined] foo(param=1)
|
31 | // CHECK: (lldb) expression param
|
32 | // CHECK-NEXT: (int) $1 = 1
|
33 | // CHECK-NEXT: (lldb) expression local
|
34 | // CHECK-NEXT: (int) $2 = 2
|
35 | |