Files
clang-p2996/lldb/test/Shell/SymbolFile/NativePDB/inline_sites_live.cpp
Dave Lee d875838e8b [lldb][test] Replace use of p with expression in Shell tests (NFC)
In Shell tests, replace use of the `p` alias with the `expression` command.

To avoid conflating tests of the alias with tests of the expression command,
this patch canonicalizes to the use `expression`.

See also D141539 which made the same change to API tests.

Differential Revision: https://reviews.llvm.org/D146230
2023-03-17 10:29:24 -07:00

35 lines
962 B
C++

// clang-format off
// REQUIRES: system-windows
// RUN: %build -o %t.exe -- %s
// RUN: env LLDB_USE_NATIVE_PDB_READER=1 %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