[Lldb-commits] [lldb] d875838 - [lldb][test] Replace use of p with expression in Shell tests (NFC)
Dave Lee via lldb-commits
lldb-commits at lists.llvm.org
Fri Mar 17 10:29:35 PDT 2023
Author: Dave Lee
Date: 2023-03-17T10:29:24-07:00
New Revision: d875838e8b45cb0da5070298d0c1a2d1ee78ce7e
URL: https://github.com/llvm/llvm-project/commit/d875838e8b45cb0da5070298d0c1a2d1ee78ce7e
DIFF: https://github.com/llvm/llvm-project/commit/d875838e8b45cb0da5070298d0c1a2d1ee78ce7e.diff
LOG: [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
Added:
Modified:
lldb/test/Shell/Commands/command-source.test
lldb/test/Shell/Commands/command-stop-hook-no-target.test
lldb/test/Shell/Expr/nodefaultlib.cpp
lldb/test/Shell/Register/x86-64-fp-read.test
lldb/test/Shell/Register/x86-db-read.test
lldb/test/Shell/Register/x86-fp-read.test
lldb/test/Shell/Settings/Inputs/DontStopCommandSource.in
lldb/test/Shell/Settings/Inputs/StopCommandSource.in
lldb/test/Shell/Settings/TestStopCommandSourceOnError.test
lldb/test/Shell/SymbolFile/DWARF/debug-types-expressions.test
lldb/test/Shell/SymbolFile/DWARF/split-dwarf-expression-eval-bug.cpp
lldb/test/Shell/SymbolFile/DWARF/x86/DW_TAG_GNU_call_site-DW_AT_low_pc.s
lldb/test/Shell/SymbolFile/DWARF/x86/DW_TAG_variable-DW_AT_const_value.s
lldb/test/Shell/SymbolFile/DWARF/x86/debug-types-basic.test
lldb/test/Shell/SymbolFile/DWARF/x86/debug-types-missing-signature.test
lldb/test/Shell/SymbolFile/DWARF/x86/dwarf5-line-strp.s
lldb/test/Shell/SymbolFile/DWARF/x86/limit-debug-info.s
lldb/test/Shell/SymbolFile/NativePDB/Inputs/inline_sites_live.lldbinit
lldb/test/Shell/SymbolFile/NativePDB/Inputs/local-variables.lldbinit
lldb/test/Shell/SymbolFile/NativePDB/incomplete-tag-type.cpp
lldb/test/Shell/SymbolFile/NativePDB/inline_sites_live.cpp
lldb/test/Shell/SymbolFile/NativePDB/local-variables.cpp
lldb/test/Shell/SymbolFile/PDB/Inputs/ExpressionsTest0.script
lldb/test/Shell/SymbolFile/PDB/Inputs/ExpressionsTest1.script
lldb/test/Shell/SymbolFile/PDB/Inputs/ExpressionsTest2.script
lldb/test/Shell/SymbolFile/PDB/Inputs/VBases.script
lldb/test/Shell/SymbolFile/PDB/expressions.test
Removed:
################################################################################
diff --git a/lldb/test/Shell/Commands/command-source.test b/lldb/test/Shell/Commands/command-source.test
index fa389f2a12889..579e3989f6fd0 100644
--- a/lldb/test/Shell/Commands/command-source.test
+++ b/lldb/test/Shell/Commands/command-source.test
@@ -6,7 +6,7 @@
# RUN: %lldb -x -b -o 'settings set interpreter.stop-command-source-on-error false' -o "command source %s" 2>&1 | FileCheck %s --check-prefix CONTINUE
bogus
-p 10+1
+expression 10+1
# CONTINUE: $0 = 11
# STOP-NOT: $0 = 11
diff --git a/lldb/test/Shell/Commands/command-stop-hook-no-target.test b/lldb/test/Shell/Commands/command-stop-hook-no-target.test
index ee9ded164d745..cc5e71dff00cd 100644
--- a/lldb/test/Shell/Commands/command-stop-hook-no-target.test
+++ b/lldb/test/Shell/Commands/command-stop-hook-no-target.test
@@ -1,4 +1,4 @@
# RUN: %clang_host -g %S/Inputs/main.c -o %t
-# RUN: %lldb -b -o 'target stop-hook add --name test --shlib test -o "p 95000 + 126"' -o 'file %t' -o 'b main' -o 'r' 2>&1 | FileCheck %s
+# RUN: %lldb -b -o 'target stop-hook add --name test --shlib test -o "expression 95000 + 126"' -o 'file %t' -o 'b main' -o 'r' 2>&1 | FileCheck %s
# CHECK: Stop hook #1 added
# CHECK-NOT: 95126
diff --git a/lldb/test/Shell/Expr/nodefaultlib.cpp b/lldb/test/Shell/Expr/nodefaultlib.cpp
index fb53da7fcb08b..f97d8aad9a8db 100644
--- a/lldb/test/Shell/Expr/nodefaultlib.cpp
+++ b/lldb/test/Shell/Expr/nodefaultlib.cpp
@@ -7,10 +7,10 @@
// XFAIL: system-netbsd || system-freebsd || system-darwin
// RUN: %build %s --nodefaultlib -o %t
-// RUN: %lldb %t -o "b main" -o run -o "p call_me(5, 6)" -o exit \
+// RUN: %lldb %t -o "b main" -o run -o "expression call_me(5, 6)" -o exit \
// RUN: | FileCheck %s
-// CHECK: p call_me(5, 6)
+// CHECK: expression call_me(5, 6)
// CHECK: (int) $0 = 30
int call_me(int x, long y) { return x * y; }
diff --git a/lldb/test/Shell/Register/x86-64-fp-read.test b/lldb/test/Shell/Register/x86-64-fp-read.test
index 39fdaf170f3f2..e23e333c204a5 100644
--- a/lldb/test/Shell/Register/x86-64-fp-read.test
+++ b/lldb/test/Shell/Register/x86-64-fp-read.test
@@ -9,9 +9,9 @@ process launch
# CHECK: Process {{.*}} stopped
# fdiv (%rbx) gets encoded into 2 bytes, int3 into 1 byte
-print (void*)($pc-3)
+expression (void*)($pc-3)
# CHECK: (void *) $0 = [[FDIV:0x[0-9a-f]*]]
-print &zero
+expression &zero
# CHECK: (uint32_t *) $1 = [[ZERO:0x[0-9a-f]*]]
register read --all
@@ -32,9 +32,9 @@ register read --all
# CHECK-DAG: st{{(mm)?}}7 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00}
# legacy approach, superseded by fip/fdp registers
-print (void*)($fiseg*0x100000000 + $fioff)
+expression (void*)($fiseg*0x100000000 + $fioff)
# CHECK: (void *) $2 = [[FDIV]]
-print (uint32_t*)($foseg * 0x100000000 + $fooff)
+expression (uint32_t*)($foseg * 0x100000000 + $fooff)
# CHECK: (uint32_t *) $3 = [[ZERO]]
process continue
diff --git a/lldb/test/Shell/Register/x86-db-read.test b/lldb/test/Shell/Register/x86-db-read.test
index f8380440c6270..85cdcd1cb8104 100644
--- a/lldb/test/Shell/Register/x86-db-read.test
+++ b/lldb/test/Shell/Register/x86-db-read.test
@@ -15,13 +15,13 @@ watchpoint set variable -w write g_32w
watchpoint set variable -w read_write g_32rw
# CHECK: Watchpoint created: Watchpoint 4: addr = 0x{{[0-9a-f]*}} size = 4 state = enabled type = rw
-print &g_8w
+expression &g_8w
# CHECK: (uint8_t *) $0 = [[VAR8W:0x[0-9a-f]*]]
-print &g_16rw
+expression &g_16rw
# CHECK: (uint16_t *) $1 = [[VAR16RW:0x[0-9a-f]*]]
-print &g_32w
+expression &g_32w
# CHECK: (uint32_t *) $2 = [[VAR32W:0x[0-9a-f]*]]
-print &g_32rw
+expression &g_32rw
# CHECK: (uint32_t *) $3 = [[VAR64RW:0x[0-9a-f]*]]
register read --all
diff --git a/lldb/test/Shell/Register/x86-fp-read.test b/lldb/test/Shell/Register/x86-fp-read.test
index 566157b938367..f668b8cb78658 100644
--- a/lldb/test/Shell/Register/x86-fp-read.test
+++ b/lldb/test/Shell/Register/x86-fp-read.test
@@ -9,9 +9,9 @@ process launch
# CHECK: Process {{.*}} stopped
# fdiv (%rbx) gets encoded into 2 bytes, int3 into 1 byte
-print (void*)($pc-3)
+expression (void*)($pc-3)
# CHECK: (void *) $0 = [[FDIV:0x[0-9a-f]*]]
-print &zero
+expression &zero
# CHECK: (uint32_t *) $1 = [[ZERO:0x[0-9a-f]*]]
register read --all
diff --git a/lldb/test/Shell/Settings/Inputs/DontStopCommandSource.in b/lldb/test/Shell/Settings/Inputs/DontStopCommandSource.in
index e33a1e329cad9..f3ef2a9e7016b 100644
--- a/lldb/test/Shell/Settings/Inputs/DontStopCommandSource.in
+++ b/lldb/test/Shell/Settings/Inputs/DontStopCommandSource.in
@@ -1,3 +1,3 @@
settings set interpreter.stop-command-source-on-error false
bogus
-print 123400000 + 56789
+expression 123400000 + 56789
diff --git a/lldb/test/Shell/Settings/Inputs/StopCommandSource.in b/lldb/test/Shell/Settings/Inputs/StopCommandSource.in
index 19974c0c444b1..1159554e3425f 100644
--- a/lldb/test/Shell/Settings/Inputs/StopCommandSource.in
+++ b/lldb/test/Shell/Settings/Inputs/StopCommandSource.in
@@ -1,3 +1,3 @@
settings set interpreter.stop-command-source-on-error true
bogus
-print 123400000 + 56789
+expression 123400000 + 56789
diff --git a/lldb/test/Shell/Settings/TestStopCommandSourceOnError.test b/lldb/test/Shell/Settings/TestStopCommandSourceOnError.test
index d734a0940a2d7..f99c9c204c19c 100644
--- a/lldb/test/Shell/Settings/TestStopCommandSourceOnError.test
+++ b/lldb/test/Shell/Settings/TestStopCommandSourceOnError.test
@@ -12,10 +12,10 @@
# RUN: %lldb -b -o 'settings set interpreter.stop-command-source-on-error false' -s %S/Inputs/StopCommandSource.in | FileCheck %s --check-prefix CONTINUE
# FIXME: Should continue
-# RUN: not %lldb -b -s %S/Inputs/DontStopCommandSource.in -o 'bogus' -o 'print 111100000 + 11111' | FileCheck %s --check-prefix STOP
+# RUN: not %lldb -b -s %S/Inputs/DontStopCommandSource.in -o 'bogus' -o 'expression 111100000 + 11111' | FileCheck %s --check-prefix STOP
# FIXME: Should continue
-# RUN: not %lldb -b -o 'settings set interpreter.stop-command-source-on-error false' -o 'bogus' -o 'print 123400000 + 56789' | FileCheck %s --check-prefix STOP
+# RUN: not %lldb -b -o 'settings set interpreter.stop-command-source-on-error false' -o 'bogus' -o 'expression 123400000 + 56789' | FileCheck %s --check-prefix STOP
# FIXME: Should continue
# RUN: not %lldb -b -s %S/Inputs/DontStopCommandSource.in | FileCheck %s --check-prefix STOP
diff --git a/lldb/test/Shell/SymbolFile/DWARF/debug-types-expressions.test b/lldb/test/Shell/SymbolFile/DWARF/debug-types-expressions.test
index 0442cd8faa3b2..653af7b17c449 100644
--- a/lldb/test/Shell/SymbolFile/DWARF/debug-types-expressions.test
+++ b/lldb/test/Shell/SymbolFile/DWARF/debug-types-expressions.test
@@ -40,18 +40,18 @@ frame variable *a
# CHECK-NEXT: j = 42
# CHECK-NEXT: }
-print a->f()
-# CHECK-LABEL: print a->f()
+expression a->f()
+# CHECK-LABEL: expression a->f()
# CHECK: (int) $0 = 47
-print ns::A()
-# CHECK-LABEL: print ns::A()
+expression ns::A()
+# CHECK-LABEL: expression ns::A()
# CHECK: (ns::A) $1 = (i = 147)
-print ns::A().i + a->i
-# CHECK-LABEL: print ns::A().i + a->i
+expression ns::A().i + a->i
+# CHECK-LABEL: expression ns::A().i + a->i
# CHECK: (int) $2 = 194
-print ns::A().getA()
+expression ns::A().getA()
# CHECK-LABEL: ns::A().getA()
# CHECK: (A) $3 = (i = 146)
diff --git a/lldb/test/Shell/SymbolFile/DWARF/split-dwarf-expression-eval-bug.cpp b/lldb/test/Shell/SymbolFile/DWARF/split-dwarf-expression-eval-bug.cpp
index ef1aa257665df..4a8004ddd287f 100644
--- a/lldb/test/Shell/SymbolFile/DWARF/split-dwarf-expression-eval-bug.cpp
+++ b/lldb/test/Shell/SymbolFile/DWARF/split-dwarf-expression-eval-bug.cpp
@@ -11,10 +11,10 @@
// RUN: %clang_host -c -gsplit-dwarf -g %s -o %t2.o -DTWO
// RUN: %clang_host -c -gsplit-dwarf -g %s -o %t3.o -DTHREE
// RUN: %clang_host %t1.o %t2.o %t3.o -o %t
-// RUN: %lldb %t -o "br set -n foo" -o run -o "p bool_in_first_cu" -o exit \
+// RUN: %lldb %t -o "br set -n foo" -o run -o "expression bool_in_first_cu" -o exit \
// RUN: | FileCheck %s
-// CHECK: (lldb) p bool_in_first_cu
+// CHECK: (lldb) expression bool_in_first_cu
// CHECK: (bool) $0 = true
diff --git a/lldb/test/Shell/SymbolFile/DWARF/x86/DW_TAG_GNU_call_site-DW_AT_low_pc.s b/lldb/test/Shell/SymbolFile/DWARF/x86/DW_TAG_GNU_call_site-DW_AT_low_pc.s
index 8cc1cc1ed2f95..c6e5ccda5f2ef 100644
--- a/lldb/test/Shell/SymbolFile/DWARF/x86/DW_TAG_GNU_call_site-DW_AT_low_pc.s
+++ b/lldb/test/Shell/SymbolFile/DWARF/x86/DW_TAG_GNU_call_site-DW_AT_low_pc.s
@@ -11,7 +11,7 @@
# REQUIRES: target-x86_64, system-linux, lld
# RUN: %clang_host -o %t %s
-# RUN: %lldb %t -o r -o 'p p' -o exit | FileCheck %s
+# RUN: %lldb %t -o r -o 'expression p' -o exit | FileCheck %s
# CHECK: (int) $0 = 1
diff --git a/lldb/test/Shell/SymbolFile/DWARF/x86/DW_TAG_variable-DW_AT_const_value.s b/lldb/test/Shell/SymbolFile/DWARF/x86/DW_TAG_variable-DW_AT_const_value.s
index 7ab9a8c61bafd..1d9bec342de5b 100644
--- a/lldb/test/Shell/SymbolFile/DWARF/x86/DW_TAG_variable-DW_AT_const_value.s
+++ b/lldb/test/Shell/SymbolFile/DWARF/x86/DW_TAG_variable-DW_AT_const_value.s
@@ -1,7 +1,7 @@
# This tests that lldb is able to print DW_TAG_variable using DW_AT_const_value.
# RUN: llvm-mc -triple x86_64-unknown-linux-gnu %s -filetype=obj > %t.o
-# RUN: %lldb %t.o -o "p/x magic64" -o exit | FileCheck %s
+# RUN: %lldb %t.o -o "expression/x magic64" -o exit | FileCheck %s
# CHECK: (const long) $0 = 0xed9a924c00011151
diff --git a/lldb/test/Shell/SymbolFile/DWARF/x86/debug-types-basic.test b/lldb/test/Shell/SymbolFile/DWARF/x86/debug-types-basic.test
index 947b43ba6b2ff..dc8005f73930e 100644
--- a/lldb/test/Shell/SymbolFile/DWARF/x86/debug-types-basic.test
+++ b/lldb/test/Shell/SymbolFile/DWARF/x86/debug-types-basic.test
@@ -51,12 +51,12 @@ type lookup EC
# CHECK-NEXT: e3
# CHECK-NEXT: }
-print (E) 1
-# CHECK-LABEL: print (E) 1
+expression (E) 1
+# CHECK-LABEL: expression (E) 1
# CHECK: (E) $0 = e2
-print (EC) 1
-# CHECK-LABEL: print (EC) 1
+expression (EC) 1
+# CHECK-LABEL: expression (EC) 1
# CHECK: (EC) $1 = e2
target variable a e ec
diff --git a/lldb/test/Shell/SymbolFile/DWARF/x86/debug-types-missing-signature.test b/lldb/test/Shell/SymbolFile/DWARF/x86/debug-types-missing-signature.test
index 8bdc2219cc1c9..e94b10a68d4e9 100644
--- a/lldb/test/Shell/SymbolFile/DWARF/x86/debug-types-missing-signature.test
+++ b/lldb/test/Shell/SymbolFile/DWARF/x86/debug-types-missing-signature.test
@@ -14,10 +14,10 @@ LOOKUPE: no type was found matching 'E'
RUN: %lldb %t -b -o "type lookup EC" | FileCheck --check-prefix=LOOKUPEC %s
LOOKUPEC: no type was found matching 'EC'
-RUN: not %lldb %t -b -o "print (E) 1" 2>&1 | FileCheck --check-prefix=PRINTE %s
+RUN: not %lldb %t -b -o "expression (E) 1" 2>&1 | FileCheck --check-prefix=PRINTE %s
PRINTE: use of undeclared identifier 'E'
-RUN: not %lldb %t -b -o "print (EC) 1" 2>&1 | FileCheck --check-prefix=PRINTEC %s
+RUN: not %lldb %t -b -o "expression (EC) 1" 2>&1 | FileCheck --check-prefix=PRINTEC %s
PRINTEC: use of undeclared identifier 'EC'
RUN: %lldb %t -b -o "target variable a e ec" | FileCheck --check-prefix=VARS %s
diff --git a/lldb/test/Shell/SymbolFile/DWARF/x86/dwarf5-line-strp.s b/lldb/test/Shell/SymbolFile/DWARF/x86/dwarf5-line-strp.s
index 5c08f4a40528b..67f52454604f6 100755
--- a/lldb/test/Shell/SymbolFile/DWARF/x86/dwarf5-line-strp.s
+++ b/lldb/test/Shell/SymbolFile/DWARF/x86/dwarf5-line-strp.s
@@ -3,7 +3,7 @@
# UNSUPPORTED: system-darwin, system-windows
# RUN: llvm-mc -filetype=obj -o %t -triple x86_64-pc-linux %s
-# RUN: %lldb %t -o "p main" \
+# RUN: %lldb %t -o "expression main" \
# RUN: -o exit | FileCheck %s
# CHECK: (void (*)()) $0 = 0x0000000000000000
diff --git a/lldb/test/Shell/SymbolFile/DWARF/x86/limit-debug-info.s b/lldb/test/Shell/SymbolFile/DWARF/x86/limit-debug-info.s
index 6a2140a147921..4bd0fc8a9b55e 100644
--- a/lldb/test/Shell/SymbolFile/DWARF/x86/limit-debug-info.s
+++ b/lldb/test/Shell/SymbolFile/DWARF/x86/limit-debug-info.s
@@ -3,10 +3,10 @@
# RUN: llvm-mc --triple=x86_64-pc-windows --filetype=obj --defsym EXE=0 %s >%t.exe.o
# RUN: lld-link /OUT:%t.dll %t.dll.o /SUBSYSTEM:console /dll /noentry /debug
# RUN: lld-link /OUT:%t.exe %t.exe.o /SUBSYSTEM:console /debug /force
-# RUN: %lldb %t.exe -o "target modules add %t.dll" -o "p var" \
+# RUN: %lldb %t.exe -o "target modules add %t.dll" -o "expression var" \
# RUN: -o exit 2>&1 | FileCheck %s
-# CHECK: (lldb) p var
+# CHECK: (lldb) expression var
# CHECK: (A) $0 = (member = 47)
.section .debug_abbrev,"dr"
diff --git a/lldb/test/Shell/SymbolFile/NativePDB/Inputs/inline_sites_live.lldbinit b/lldb/test/Shell/SymbolFile/NativePDB/Inputs/inline_sites_live.lldbinit
index 584d835977bf0..2291c7c452717 100644
--- a/lldb/test/Shell/SymbolFile/NativePDB/Inputs/inline_sites_live.lldbinit
+++ b/lldb/test/Shell/SymbolFile/NativePDB/Inputs/inline_sites_live.lldbinit
@@ -1,7 +1,7 @@
br set -p BP_bar -f inline_sites_live.cpp
br set -p BP_foo -f inline_sites_live.cpp
run
-p param
+expression param
continue
-p param
-p local
+expression param
+expression local
diff --git a/lldb/test/Shell/SymbolFile/NativePDB/Inputs/local-variables.lldbinit b/lldb/test/Shell/SymbolFile/NativePDB/Inputs/local-variables.lldbinit
index 1071edd25c92b..4c8073e7bd884 100644
--- a/lldb/test/Shell/SymbolFile/NativePDB/Inputs/local-variables.lldbinit
+++ b/lldb/test/Shell/SymbolFile/NativePDB/Inputs/local-variables.lldbinit
@@ -1,30 +1,30 @@
break set -f local-variables.cpp -l 17
run a b c d e f g
-p argc
+expression argc
step
-p SomeLocal
+expression SomeLocal
step
-p Param1
-p Param2
+expression Param1
+expression Param2
step
-p Param1
-p Param2
-p Local1
+expression Param1
+expression Param2
+expression Local1
step
-p Param1
-p Param2
-p Local1
-p Local2
+expression Param1
+expression Param2
+expression Local1
+expression Local2
step
-p Param1
-p Param2
-p Local1
-p Local2
+expression Param1
+expression Param2
+expression Local1
+expression Local2
step
-p Param1
-p Param2
-p Local1
-p Local2
+expression Param1
+expression Param2
+expression Local1
+expression Local2
continue
target modules dump ast
diff --git a/lldb/test/Shell/SymbolFile/NativePDB/incomplete-tag-type.cpp b/lldb/test/Shell/SymbolFile/NativePDB/incomplete-tag-type.cpp
index b6e7ab3a7b1a9..279d638782cfb 100644
--- a/lldb/test/Shell/SymbolFile/NativePDB/incomplete-tag-type.cpp
+++ b/lldb/test/Shell/SymbolFile/NativePDB/incomplete-tag-type.cpp
@@ -6,13 +6,13 @@
// RUN: lld-link /debug:full /nodefaultlib /entry:main %t1.obj %t2.obj /out:%t.exe /pdb:%t.pdb
// RUN: env LLDB_USE_NATIVE_PDB_READER=1 %lldb -f %t.exe -o \
// RUN: "settings set interpreter.stop-command-source-on-error false" \
-// RUN: -o "p b" -o "p d" -o "p static_e_ref" -o "exit" 2>&1 | FileCheck %s
+// RUN: -o "expression b" -o "expr d" -o "expr static_e_ref" -o "exit" 2>&1 | FileCheck %s
-// CHECK: (lldb) p b
+// CHECK: (lldb) expression b
// CHECK: (B) $0 = {}
-// CHECK: (lldb) p d
+// CHECK: (lldb) expression d
// CHECK: (D) $1 = {}
-// CHECK: (lldb) p static_e_ref
+// CHECK: (lldb) expression static_e_ref
// CHECK: error: expression failed to parse:
// CHECK: error: {{.*}}: incomplete type 'E' where a complete type is required
// CHECK: static_e_ref
diff --git a/lldb/test/Shell/SymbolFile/NativePDB/inline_sites_live.cpp b/lldb/test/Shell/SymbolFile/NativePDB/inline_sites_live.cpp
index bd3f80afd849c..767149ea18c46 100644
--- a/lldb/test/Shell/SymbolFile/NativePDB/inline_sites_live.cpp
+++ b/lldb/test/Shell/SymbolFile/NativePDB/inline_sites_live.cpp
@@ -24,11 +24,11 @@ int main(int argc, char** argv) {
// CHECK: * thread #1, stop reason = breakpoint 1
// CHECK-NEXT: frame #0: {{.*}}`main [inlined] bar(param=2)
-// CHECK: (lldb) p param
+// 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) p param
+// CHECK: (lldb) expression param
// CHECK-NEXT: (int) $1 = 1
-// CHECK-NEXT: (lldb) p local
+// CHECK-NEXT: (lldb) expression local
// CHECK-NEXT: (int) $2 = 2
diff --git a/lldb/test/Shell/SymbolFile/NativePDB/local-variables.cpp b/lldb/test/Shell/SymbolFile/NativePDB/local-variables.cpp
index 4779a28c8b380..a1f147b4bda6d 100644
--- a/lldb/test/Shell/SymbolFile/NativePDB/local-variables.cpp
+++ b/lldb/test/Shell/SymbolFile/NativePDB/local-variables.cpp
@@ -37,7 +37,7 @@ int main(int argc, char **argv) {
// CHECK-NEXT: 20
// CHECK: Process {{.*}} launched: '{{.*}}local-variables.cpp.tmp.exe'
-// CHECK-NEXT: (lldb) p argc
+// CHECK-NEXT: (lldb) expression argc
// CHECK-NEXT: (int) $0 = 8
// CHECK-NEXT: (lldb) step
// CHECK-NEXT: Process {{.*}} stopped
@@ -50,7 +50,7 @@ int main(int argc, char **argv) {
// CHECK-NEXT: 19 }
// CHECK-NEXT: 20
-// CHECK: (lldb) p SomeLocal
+// CHECK: (lldb) expression SomeLocal
// CHECK-NEXT: (int) $1 = 16
// CHECK-NEXT: (lldb) step
// CHECK-NEXT: Process {{.*}} stopped
@@ -64,9 +64,9 @@ int main(int argc, char **argv) {
// CHECK-NEXT: 11 ++Local1;
// CHECK-NEXT: 12 ++Local2;
-// CHECK: (lldb) p Param1
+// CHECK: (lldb) expression Param1
// CHECK-NEXT: (int) $2 = 16
-// CHECK-NEXT: (lldb) p Param2
+// CHECK-NEXT: (lldb) expression Param2
// CHECK-NEXT: (char) $3 = 'a'
// CHECK-NEXT: (lldb) step
// CHECK-NEXT: Process {{.*}} stopped
@@ -80,11 +80,11 @@ int main(int argc, char **argv) {
// CHECK-NEXT: 12 ++Local2;
// CHECK-NEXT: 13 return Local1;
-// CHECK: (lldb) p Param1
+// CHECK: (lldb) expression Param1
// CHECK-NEXT: (int) $4 = 16
-// CHECK-NEXT: (lldb) p Param2
+// CHECK-NEXT: (lldb) expression Param2
// CHECK-NEXT: (char) $5 = 'a'
-// CHECK-NEXT: (lldb) p Local1
+// CHECK-NEXT: (lldb) expression Local1
// CHECK-NEXT: (unsigned int) $6 = 17
// CHECK-NEXT: (lldb) step
// CHECK-NEXT: Process {{.*}} stopped
@@ -98,13 +98,13 @@ int main(int argc, char **argv) {
// CHECK-NEXT: 13 return Local1;
// CHECK-NEXT: 14 }
-// CHECK: (lldb) p Param1
+// CHECK: (lldb) expression Param1
// CHECK-NEXT: (int) $7 = 16
-// CHECK-NEXT: (lldb) p Param2
+// CHECK-NEXT: (lldb) expression Param2
// CHECK-NEXT: (char) $8 = 'a'
-// CHECK-NEXT: (lldb) p Local1
+// CHECK-NEXT: (lldb) expression Local1
// CHECK-NEXT: (unsigned int) $9 = 17
-// CHECK-NEXT: (lldb) p Local2
+// CHECK-NEXT: (lldb) expression Local2
// CHECK-NEXT: (char) $10 = 'b'
// CHECK-NEXT: (lldb) step
// CHECK-NEXT: Process {{.*}} stopped
@@ -118,13 +118,13 @@ int main(int argc, char **argv) {
// CHECK-NEXT: 14 }
// CHECK-NEXT: 15
-// CHECK: (lldb) p Param1
+// CHECK: (lldb) expression Param1
// CHECK-NEXT: (int) $11 = 16
-// CHECK-NEXT: (lldb) p Param2
+// CHECK-NEXT: (lldb) expression Param2
// CHECK-NEXT: (char) $12 = 'a'
-// CHECK-NEXT: (lldb) p Local1
+// CHECK-NEXT: (lldb) expression Local1
// CHECK-NEXT: (unsigned int) $13 = 18
-// CHECK-NEXT: (lldb) p Local2
+// CHECK-NEXT: (lldb) expression Local2
// CHECK-NEXT: (char) $14 = 'b'
// CHECK-NEXT: (lldb) step
// CHECK-NEXT: Process {{.*}} stopped
@@ -138,13 +138,13 @@ int main(int argc, char **argv) {
// CHECK-NEXT: 15
// CHECK-NEXT: 16 int main(int argc, char **argv) {
-// CHECK: (lldb) p Param1
+// CHECK: (lldb) expression Param1
// CHECK-NEXT: (int) $15 = 16
-// CHECK-NEXT: (lldb) p Param2
+// CHECK-NEXT: (lldb) expression Param2
// CHECK-NEXT: (char) $16 = 'a'
-// CHECK-NEXT: (lldb) p Local1
+// CHECK-NEXT: (lldb) expression Local1
// CHECK-NEXT: (unsigned int) $17 = 18
-// CHECK-NEXT: (lldb) p Local2
+// CHECK-NEXT: (lldb) expression Local2
// CHECK-NEXT: (char) $18 = 'c'
// CHECK-NEXT: (lldb) continue
// CHECK-NEXT: Process {{.*}} resuming
diff --git a/lldb/test/Shell/SymbolFile/PDB/Inputs/ExpressionsTest0.script b/lldb/test/Shell/SymbolFile/PDB/Inputs/ExpressionsTest0.script
index d31a2abb68a2f..dcdaa9e1731d2 100644
--- a/lldb/test/Shell/SymbolFile/PDB/Inputs/ExpressionsTest0.script
+++ b/lldb/test/Shell/SymbolFile/PDB/Inputs/ExpressionsTest0.script
@@ -1,7 +1,7 @@
breakpoint set --file ExpressionsTest.cpp --line 19
run
-print result
-print N0::N1::sum(N0::N1::buf1, sizeof(N0::N1::buf1))
-print N1::sum(N1::buf1, sizeof(N1::buf1))
-print sum(buf1, sizeof(buf1))
-print sum(buf1, 1000000000)
+expression result
+expression N0::N1::sum(N0::N1::buf1, sizeof(N0::N1::buf1))
+expression N1::sum(N1::buf1, sizeof(N1::buf1))
+expression sum(buf1, sizeof(buf1))
+expression sum(buf1, 1000000000)
diff --git a/lldb/test/Shell/SymbolFile/PDB/Inputs/ExpressionsTest1.script b/lldb/test/Shell/SymbolFile/PDB/Inputs/ExpressionsTest1.script
index dac887faa5bba..d5d6292d3fdb7 100644
--- a/lldb/test/Shell/SymbolFile/PDB/Inputs/ExpressionsTest1.script
+++ b/lldb/test/Shell/SymbolFile/PDB/Inputs/ExpressionsTest1.script
@@ -1 +1 @@
-print sum(buf0, 1)
+expression sum(buf0, 1)
diff --git a/lldb/test/Shell/SymbolFile/PDB/Inputs/ExpressionsTest2.script b/lldb/test/Shell/SymbolFile/PDB/Inputs/ExpressionsTest2.script
index b19240baf99da..ce6af93463711 100644
--- a/lldb/test/Shell/SymbolFile/PDB/Inputs/ExpressionsTest2.script
+++ b/lldb/test/Shell/SymbolFile/PDB/Inputs/ExpressionsTest2.script
@@ -1,2 +1,2 @@
-print sum(buf0, result - 28)
-print sum(buf1 + 3, 3)
+expression sum(buf0, result - 28)
+expression sum(buf1 + 3, 3)
diff --git a/lldb/test/Shell/SymbolFile/PDB/Inputs/VBases.script b/lldb/test/Shell/SymbolFile/PDB/Inputs/VBases.script
index 8675890b76e1d..9206ccadafdb9 100644
--- a/lldb/test/Shell/SymbolFile/PDB/Inputs/VBases.script
+++ b/lldb/test/Shell/SymbolFile/PDB/Inputs/VBases.script
@@ -2,6 +2,6 @@ breakpoint set --file VBases.cpp --line 15
run
-print c
+expression c
-frame variable c
\ No newline at end of file
+frame variable c
diff --git a/lldb/test/Shell/SymbolFile/PDB/expressions.test b/lldb/test/Shell/SymbolFile/PDB/expressions.test
index 819e2e180945c..89d7c94e7aa06 100644
--- a/lldb/test/Shell/SymbolFile/PDB/expressions.test
+++ b/lldb/test/Shell/SymbolFile/PDB/expressions.test
@@ -2,34 +2,34 @@ REQUIRES: system-windows, msvc
RUN: %build --compiler=msvc --nodefaultlib --output=%t.exe %S/Inputs/ExpressionsTest.cpp
RUN: not %lldb -b -s %S/Inputs/ExpressionsTest0.script -s %S/Inputs/ExpressionsTest1.script -s %S/Inputs/ExpressionsTest2.script -- %t.exe 2>&1 | FileCheck %s
-// Check the variable value through `print`
-CHECK: (lldb) print result
+// Check the variable value through `expression`
+CHECK: (lldb) expression result
CHECK: (char) $0 = '\x1c'
// Call the function just like in the code
-CHECK: (lldb) print N0::N1::sum(N0::N1::buf1, sizeof(N0::N1::buf1))
+CHECK: (lldb) expression N0::N1::sum(N0::N1::buf1, sizeof(N0::N1::buf1))
CHECK: (char) $1 = '\x1c'
// Try the relaxed namespaces search
-CHECK: (lldb) print N1::sum(N1::buf1, sizeof(N1::buf1))
+CHECK: (lldb) expression N1::sum(N1::buf1, sizeof(N1::buf1))
CHECK: (char) $2 = '\x1c'
// Try the relaxed variables and functions search
-CHECK: (lldb) print sum(buf1, sizeof(buf1))
+CHECK: (lldb) expression sum(buf1, sizeof(buf1))
CHECK: (char) $3 = '\x1c'
// Make a crash during expression calculation
-CHECK: (lldb) print sum(buf1, 1000000000)
+CHECK: (lldb) expression sum(buf1, 1000000000)
CHECK: The process has been returned to the state before expression evaluation.
// Make one more crash
-CHECK: (lldb) print sum(buf0, 1)
+CHECK: (lldb) expression sum(buf0, 1)
CHECK: The process has been returned to the state before expression evaluation.
// Check if the process state was restored succesfully
-CHECK: (lldb) print sum(buf0, result - 28)
+CHECK: (lldb) expression sum(buf0, result - 28)
CHECK: (char) $4 = '\0'
// Call the function with arbitrary parameters
-CHECK: (lldb) print sum(buf1 + 3, 3)
+CHECK: (lldb) expression sum(buf1 + 3, 3)
CHECK: (char) $5 = '\f'
More information about the lldb-commits
mailing list