43 lines · cpp
1// clang-format off2// REQUIRES: lld, target-windows3 4// RUN: %build --compiler=clang-cl --nodefaultlib -o %t.exe -- %s5// RUN: %lldb -f %t.exe -s \6// RUN: %p/Inputs/stack_unwinding01.lldbinit 2>&1 | FileCheck %s7 8 9struct Struct {10 void simple_method(int a, int b) {11 a += 1;12 simple_method(a, b);13 }14};15 16 17 18int main(int argc, char **argv) {19 Struct s;20 s.simple_method(1,2);21 return 0;22}23 24 25// CHECK: (lldb) thread backtrace26// CHECK-NEXT: * thread #1, stop reason = breakpoint 1.127// CHECK-NEXT: * frame #0: {{.*}} stack_unwinding01.cpp.tmp.exe`void Struct::simple_method(this={{.*}}, a=2, b=2) at stack_unwinding01.cpp:1228// CHECK-NEXT: frame #1: {{.*}} stack_unwinding01.cpp.tmp.exe`main(argc={{.*}}, argv={{.*}}) at stack_unwinding01.cpp:2029 30 31// CHECK: (lldb) thread backtrace32// CHECK-NEXT: * thread #1, stop reason = breakpoint 1.133// CHECK-NEXT: * frame #0: {{.*}} stack_unwinding01.cpp.tmp.exe`void Struct::simple_method(this={{.*}}, a=3, b=2) at stack_unwinding01.cpp:1234// CHECK-NEXT: frame #1: {{.*}} stack_unwinding01.cpp.tmp.exe`void Struct::simple_method(this={{.*}}, a=2, b=2) at stack_unwinding01.cpp:1235// CHECK-NEXT: frame #2: {{.*}} stack_unwinding01.cpp.tmp.exe`main(argc={{.*}}, argv={{.*}}) at stack_unwinding01.cpp:2036 37// CHECK: (lldb) thread backtrace38// CHECK-NEXT: * thread #1, stop reason = breakpoint 1.139// CHECK-NEXT: * frame #0: {{.*}} stack_unwinding01.cpp.tmp.exe`void Struct::simple_method(this={{.*}}, a=4, b=2) at stack_unwinding01.cpp:1240// CHECK-NEXT: frame #1: {{.*}} stack_unwinding01.cpp.tmp.exe`void Struct::simple_method(this={{.*}}, a=3, b=2) at stack_unwinding01.cpp:1241// CHECK-NEXT: frame #2: {{.*}} stack_unwinding01.cpp.tmp.exe`void Struct::simple_method(this={{.*}}, a=2, b=2) at stack_unwinding01.cpp:1242// CHECK-NEXT: frame #3: {{.*}} stack_unwinding01.cpp.tmp.exe`main(argc={{.*}}, argv={{.*}}) at stack_unwinding01.cpp:2043