Files
clang-p2996/lldb/test/Shell/SymbolFile/NativePDB/inline_sites_live.cpp
Vladislav Dzhidzhoev e0b76bafde [lldb][test] Disable inline_sites_live.cpp for non-Windows targets (#116196)
This is a follow-up for the conversation here
https://github.com/llvm/llvm-project/pull/115722/.

This test is designed for Windows target/PDB format, so it shouldn't be
built and run for DWARF/etc.
2024-11-15 14:15:29 +01:00

35 lines
941 B
C++

// clang-format off
// REQUIRES: target-windows
// RUN: %build -o %t.exe -- %s
// RUN: %lldb -f %t.exe -s \
// RUN: %p/Inputs/inline_sites_live.lldbinit 2>&1 | FileCheck %s
void use(int) {}
void __attribute__((always_inline)) bar(int param) {
use(param); // BP_bar
}
void __attribute__((always_inline)) foo(int param) {
int local = param+1;
bar(local);
use(param);
use(local); // BP_foo
}
int main(int argc, char** argv) {
foo(argc);
}
// CHECK: * thread #1, {{.*}}stop reason = breakpoint 1
// CHECK-NEXT: frame #0: {{.*}}`main [inlined] bar(param=2)
// CHECK: (lldb) expression param
// CHECK-NEXT: (int) $0 = 2
// CHECK: * thread #1, {{.*}}stop reason = breakpoint 2
// CHECK-NEXT: frame #0: {{.*}}`main [inlined] foo(param=1)
// CHECK: (lldb) expression param
// CHECK-NEXT: (int) $1 = 1
// CHECK-NEXT: (lldb) expression local
// CHECK-NEXT: (int) $2 = 2