Files
clang-p2996/lldb/test/Shell/Expr/nodefaultlib.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

19 lines
591 B
C++

// Test that we're able to evaluate expressions in inferiors without the
// standard library (and mmap-like functions in particular).
// REQUIRES: native
// UNSUPPORTED: ld_preload-present
// XFAIL: system-linux && !(target-x86 || target-x86_64)
// XFAIL: system-netbsd || system-freebsd || system-darwin
// RUN: %build %s --nodefaultlib -o %t
// RUN: %lldb %t -o "b main" -o run -o "expression call_me(5, 6)" -o exit \
// RUN: | FileCheck %s
// CHECK: expression call_me(5, 6)
// CHECK: (int) $0 = 30
int call_me(int x, long y) { return x * y; }
int main() { return call_me(4, 5); }