diff --git a/lldb/test/Shell/Commands/command-source.test b/lldb/test/Shell/Commands/command-source.test --- 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 --- 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 --- 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 --- a/lldb/test/Shell/Register/x86-64-fp-read.test +++ b/lldb/test/Shell/Register/x86-64-fp-read.test @@ -9,9 +9,9 @@ # 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 @@ # 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 --- 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 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 --- a/lldb/test/Shell/Register/x86-fp-read.test +++ b/lldb/test/Shell/Register/x86-fp-read.test @@ -9,9 +9,9 @@ # 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 --- 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 --- 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 --- 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 --- a/lldb/test/Shell/SymbolFile/DWARF/debug-types-expressions.test +++ b/lldb/test/Shell/SymbolFile/DWARF/debug-types-expressions.test @@ -40,18 +40,18 @@ # 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 --- 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 --- 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 --- 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 --- 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 @@ # 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 --- 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 @@ 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 --- 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 --- 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 --- 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 --- 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 --- 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 --- a/lldb/test/Shell/SymbolFile/NativePDB/inline_sites_live.cpp +++ b/lldb/test/Shell/SymbolFile/NativePDB/inline_sites_live.cpp @@ -24,11 +24,11 @@ // 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 --- a/lldb/test/Shell/SymbolFile/NativePDB/local-variables.cpp +++ b/lldb/test/Shell/SymbolFile/NativePDB/local-variables.cpp @@ -37,7 +37,7 @@ // 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 @@ // 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 @@ // 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 @@ // 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 @@ // 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 @@ // 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 @@ // 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 --- 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 --- 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 --- 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 --- a/lldb/test/Shell/SymbolFile/PDB/Inputs/VBases.script +++ b/lldb/test/Shell/SymbolFile/PDB/Inputs/VBases.script @@ -2,6 +2,6 @@ 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 --- a/lldb/test/Shell/SymbolFile/PDB/expressions.test +++ b/lldb/test/Shell/SymbolFile/PDB/expressions.test @@ -2,34 +2,34 @@ 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'