[Lldb-commits] [lldb] 4076664 - [lldb][test] Replace use of p with expression (NFC)
Dave Lee via lldb-commits
lldb-commits at lists.llvm.org
Wed Jan 25 11:04:11 PST 2023
Author: Dave Lee
Date: 2023-01-25T11:03:58-08:00
New Revision: 40766642283854d035a992513e314d59c1b4ca53
URL: https://github.com/llvm/llvm-project/commit/40766642283854d035a992513e314d59c1b4ca53
DIFF: https://github.com/llvm/llvm-project/commit/40766642283854d035a992513e314d59c1b4ca53.diff
LOG: [lldb][test] Replace use of p with expression (NFC)
In API 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`.
Differential Revision: https://reviews.llvm.org/D141539
Added:
lldb/test/API/functionalities/alias/Makefile
lldb/test/API/functionalities/alias/TestPAlias.py
lldb/test/API/functionalities/alias/main.c
Modified:
lldb/test/API/commands/expression/call-function/TestCallStdStringFunction.py
lldb/test/API/commands/expression/codegen-crash-typedefdecl-not-in_declcontext/main.cpp
lldb/test/API/commands/expression/persist_objc_pointeetype/TestPersistObjCPointeeType.py
lldb/test/API/commands/expression/rdar44436068/main.c
lldb/test/API/commands/register/register/aarch64_sve_registers/rw_access_static_config/TestSVERegisters.py
lldb/test/API/commands/target/dump-pcm-info/TestDumpPCMInfo.py
lldb/test/API/functionalities/backticks/TestBackticksWithoutATarget.py
lldb/test/API/functionalities/data-formatter/data-formatter-categories/TestDataFormatterCategories.py
lldb/test/API/functionalities/data-formatter/data-formatter-cpp/TestDataFormatterCpp.py
lldb/test/API/functionalities/data-formatter/data-formatter-ptr-to-array/TestPtrToArrayFormatting.py
lldb/test/API/functionalities/data-formatter/data-formatter-smart-array/TestDataFormatterSmartArray.py
lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/list/TestDataFormatterGenericList.py
lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/multimap/TestDataFormatterGenericMultiMap.py
lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/multiset/TestDataFormatterGenericMultiSet.py
lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/set/TestDataFormatterGenericSet.py
lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/map/TestDataFormatterLibccMap.py
lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/vector/TestDataFormatterLibcxxVector.py
lldb/test/API/functionalities/data-formatter/data-formatter-stl/libstdcpp/map/TestDataFormatterStdMap.py
lldb/test/API/functionalities/data-formatter/data-formatter-stl/libstdcpp/vector/TestDataFormatterStdVector.py
lldb/test/API/functionalities/inferior-assert/TestInferiorAssert.py
lldb/test/API/functionalities/inferior-crashing/TestInferiorCrashing.py
lldb/test/API/functionalities/inferior-crashing/TestInferiorCrashingStep.py
lldb/test/API/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferior.py
lldb/test/API/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferiorStep.py
lldb/test/API/functionalities/multiple-slides/TestMultipleSlides.py
lldb/test/API/functionalities/set-data/TestSetData.py
lldb/test/API/functionalities/ubsan/user-expression/TestUbsanUserExpression.py
lldb/test/API/lang/c/enum_types/TestEnumTypes.py
lldb/test/API/lang/c/strings/TestCStrings.py
lldb/test/API/lang/cpp/namespace/TestNamespace.py
lldb/test/API/lang/cpp/unique-types4/TestUniqueTypes4.py
lldb/test/API/lang/objc/foundation/TestObjCMethodsNSError.py
lldb/test/API/lang/objc/modules-auto-import/TestModulesAutoImport.py
lldb/test/API/lang/objc/modules/TestObjCModules.py
lldb/test/API/lang/objc/objc-struct-argument/TestObjCStructArgument.py
lldb/test/API/lang/objc/radar-9691614/TestObjCMethodReturningBOOL.py
lldb/test/API/linux/aarch64/non_address_bit_memory_access/TestAArch64LinuxNonAddressBitMemoryAccess.py
lldb/test/API/linux/builtin_trap/TestBuiltinTrap.py
lldb/test/API/lua_api/TestFileHandle.lua
lldb/test/API/macosx/early-process-launch/TestEarlyProcessLaunch.py
lldb/test/API/macosx/macCatalyst/TestMacCatalyst.py
lldb/test/API/macosx/macCatalystAppMacOSFramework/TestMacCatalystAppWithMacOSFramework.py
lldb/test/API/python_api/file_handle/TestFileHandle.py
lldb/test/API/types/TestRecursiveTypes.py
Removed:
################################################################################
diff --git a/lldb/test/API/commands/expression/call-function/TestCallStdStringFunction.py b/lldb/test/API/commands/expression/call-function/TestCallStdStringFunction.py
index 2aaaa550194f0..35ef95761a86d 100644
--- a/lldb/test/API/commands/expression/call-function/TestCallStdStringFunction.py
+++ b/lldb/test/API/commands/expression/call-function/TestCallStdStringFunction.py
@@ -19,7 +19,7 @@ def test_with(self):
self.build()
lldbutil.run_to_source_breakpoint(self, "// break here", lldb.SBFileSpec("main.cpp"))
- self.expect("print str",
+ self.expect("expression str",
substrs=['Hello world'])
# Calling this function now succeeds, but we follow the typedef return type through to
@@ -32,5 +32,5 @@ def test_with(self):
if triple in ["arm64-apple-ios", "arm64e-apple-ios", "arm64-apple-tvos", "armv7k-apple-watchos", "arm64-apple-bridgeos", "arm64_32-apple-watchos"]:
do_cstr_test = False
if do_cstr_test:
- self.expect("print str.c_str()",
+ self.expect("expression str.c_str()",
substrs=['Hello world'])
diff --git a/lldb/test/API/commands/expression/codegen-crash-typedefdecl-not-in_declcontext/main.cpp b/lldb/test/API/commands/expression/codegen-crash-typedefdecl-not-in_declcontext/main.cpp
index e4f6600eab2c1..9052694f8c683 100644
--- a/lldb/test/API/commands/expression/codegen-crash-typedefdecl-not-in_declcontext/main.cpp
+++ b/lldb/test/API/commands/expression/codegen-crash-typedefdecl-not-in_declcontext/main.cpp
@@ -23,7 +23,7 @@ struct E {
E(B &b) : b_ref(b) {}
NS::DW f() { return {}; };
void g() {
- return; //%self.expect("p b_ref", substrs=['(B) $0 =', '(spd = NS::DW', 'a = 0)'])
+ return; //%self.expect("expression b_ref", substrs=['(B) $0 =', '(spd = NS::DW', 'a = 0)'])
}
B &b_ref;
diff --git a/lldb/test/API/commands/expression/persist_objc_pointeetype/TestPersistObjCPointeeType.py b/lldb/test/API/commands/expression/persist_objc_pointeetype/TestPersistObjCPointeeType.py
index 4113e9d55fd53..1f25fa42dbe7b 100644
--- a/lldb/test/API/commands/expression/persist_objc_pointeetype/TestPersistObjCPointeeType.py
+++ b/lldb/test/API/commands/expression/persist_objc_pointeetype/TestPersistObjCPointeeType.py
@@ -38,11 +38,16 @@ def cleanup():
self.runCmd("run", RUN_SUCCEEDED)
- self.expect("p *self", substrs=['_sc_name = nil',
- '_sc_name2 = nil',
- '_sc_name3 = nil',
- '_sc_name4 = nil',
- '_sc_name5 = nil',
- '_sc_name6 = nil',
- '_sc_name7 = nil',
- '_sc_name8 = nil'])
+ self.expect(
+ "expression *self",
+ substrs=[
+ "_sc_name = nil",
+ "_sc_name2 = nil",
+ "_sc_name3 = nil",
+ "_sc_name4 = nil",
+ "_sc_name5 = nil",
+ "_sc_name6 = nil",
+ "_sc_name7 = nil",
+ "_sc_name8 = nil",
+ ],
+ )
diff --git a/lldb/test/API/commands/expression/rdar44436068/main.c b/lldb/test/API/commands/expression/rdar44436068/main.c
index 092913d8a9056..4d5a041ad91d5 100644
--- a/lldb/test/API/commands/expression/rdar44436068/main.c
+++ b/lldb/test/API/commands/expression/rdar44436068/main.c
@@ -2,7 +2,7 @@ int main(void)
{
__int128_t n = 1;
n = n + n;
- return n; //%self.expect("p n", substrs=['(__int128_t) $0 = 2'])
- //%self.expect("p n + 6", substrs=['(__int128_t) $1 = 8'])
- //%self.expect("p n + n", substrs=['(__int128_t) $2 = 4'])
+ return n; //%self.expect("expression n", substrs=['(__int128_t) $0 = 2'])
+ //%self.expect("expression n + 6", substrs=['(__int128_t) $1 = 8'])
+ //%self.expect("expression n + n", substrs=['(__int128_t) $2 = 4'])
}
diff --git a/lldb/test/API/commands/register/register/aarch64_sve_registers/rw_access_static_config/TestSVERegisters.py b/lldb/test/API/commands/register/register/aarch64_sve_registers/rw_access_static_config/TestSVERegisters.py
index 2330efc4620de..24a39fe189f54 100644
--- a/lldb/test/API/commands/register/register/aarch64_sve_registers/rw_access_static_config/TestSVERegisters.py
+++ b/lldb/test/API/commands/register/register/aarch64_sve_registers/rw_access_static_config/TestSVERegisters.py
@@ -163,7 +163,7 @@ def test_sve_registers_read_write(self):
self.check_sve_regs_read(z_reg_size)
# Evaluate simple expression and print function expr_eval_func address.
- self.expect("p expr_eval_func", substrs=["= 0x"])
+ self.expect("expression expr_eval_func", substrs=["= 0x"])
# Evaluate expression call function expr_eval_func.
self.expect_expr("expr_eval_func()",
diff --git a/lldb/test/API/commands/target/dump-pcm-info/TestDumpPCMInfo.py b/lldb/test/API/commands/target/dump-pcm-info/TestDumpPCMInfo.py
index a3c9dda7bb160..5d62d9ffc73ae 100644
--- a/lldb/test/API/commands/target/dump-pcm-info/TestDumpPCMInfo.py
+++ b/lldb/test/API/commands/target/dump-pcm-info/TestDumpPCMInfo.py
@@ -27,7 +27,7 @@ def test(self):
self.runCmd(f"settings set symbols.clang-modules-cache-path '{mod_cache}'")
# Cause lldb to generate a Darwin-*.pcm
- self.runCmd("p @import Darwin")
+ self.runCmd("expression @import Darwin")
# root/<config-hash>/<module-name>-<modulemap-path-hash>.pcm
pcm_paths = glob.glob(os.path.join(mod_cache, '*', 'Darwin-*.pcm'))
diff --git a/lldb/test/API/functionalities/alias/Makefile b/lldb/test/API/functionalities/alias/Makefile
new file mode 100644
index 0000000000000..695335e068c0c
--- /dev/null
+++ b/lldb/test/API/functionalities/alias/Makefile
@@ -0,0 +1,4 @@
+C_SOURCES := main.c
+CFLAGS_EXTRAS := -std=c99
+
+include Makefile.rules
diff --git a/lldb/test/API/functionalities/alias/TestPAlias.py b/lldb/test/API/functionalities/alias/TestPAlias.py
new file mode 100644
index 0000000000000..b694e903b9f00
--- /dev/null
+++ b/lldb/test/API/functionalities/alias/TestPAlias.py
@@ -0,0 +1,11 @@
+import lldb
+from lldbsuite.test.lldbtest import TestBase
+from lldbsuite.test import lldbutil
+
+
+class TestCase(TestBase):
+ def test(self):
+ self.build()
+ lldbutil.run_to_source_breakpoint(self, "return", lldb.SBFileSpec("main.c"))
+ self.expect("p -g", substrs=["$0 = -"])
+ self.expect("p -i0 -g", error=True)
diff --git a/lldb/test/API/functionalities/alias/main.c b/lldb/test/API/functionalities/alias/main.c
new file mode 100644
index 0000000000000..73eebf39acf69
--- /dev/null
+++ b/lldb/test/API/functionalities/alias/main.c
@@ -0,0 +1,4 @@
+int main() {
+ int g = 41;
+ return 0;
+}
diff --git a/lldb/test/API/functionalities/backticks/TestBackticksWithoutATarget.py b/lldb/test/API/functionalities/backticks/TestBackticksWithoutATarget.py
index c2367d7ef8161..75b3b418ab858 100644
--- a/lldb/test/API/functionalities/backticks/TestBackticksWithoutATarget.py
+++ b/lldb/test/API/functionalities/backticks/TestBackticksWithoutATarget.py
@@ -15,5 +15,5 @@ class BackticksWithNoTargetTestCase(TestBase):
@no_debug_info_test
def test_backticks_no_target(self):
"""A simple test of backticks without a target."""
- self.expect("print `1+2-3`",
+ self.expect("expression `1+2-3`",
substrs=[' = 0'])
diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-categories/TestDataFormatterCategories.py b/lldb/test/API/functionalities/data-formatter/data-formatter-categories/TestDataFormatterCategories.py
index 6a4c50a012a38..08375c699a5b0 100644
--- a/lldb/test/API/functionalities/data-formatter/data-formatter-categories/TestDataFormatterCategories.py
+++ b/lldb/test/API/functionalities/data-formatter/data-formatter-categories/TestDataFormatterCategories.py
@@ -260,13 +260,13 @@ def cleanup():
"type summary add Shape -w BaseCategory --summary-string \"AShape\"")
self.runCmd("type category enable BaseCategory")
- self.expect("print (Shape*)&c1",
+ self.expect("expression (Shape*)&c1",
substrs=['AShape'])
- self.expect("print (Shape*)&r1",
+ self.expect("expression (Shape*)&r1",
substrs=['AShape'])
- self.expect("print (Shape*)c_ptr",
+ self.expect("expression (Shape*)c_ptr",
substrs=['AShape'])
- self.expect("print (Shape*)r_ptr",
+ self.expect("expression (Shape*)r_ptr",
substrs=['AShape'])
self.runCmd(
diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-cpp/TestDataFormatterCpp.py b/lldb/test/API/functionalities/data-formatter/data-formatter-cpp/TestDataFormatterCpp.py
index c4d4c465fedb6..fa9a3f5093d05 100644
--- a/lldb/test/API/functionalities/data-formatter/data-formatter-cpp/TestDataFormatterCpp.py
+++ b/lldb/test/API/functionalities/data-formatter/data-formatter-cpp/TestDataFormatterCpp.py
@@ -102,17 +102,17 @@ def cleanup():
# check that rdar://problem/10011145 (Standard summary format for
# char[] doesn't work as the result of "expr".) is solved
- self.expect("p strarr",
+ self.expect("expression strarr",
substrs=['arr = "Hello world!'])
self.expect("frame variable strptr",
substrs=['ptr = "Hello world!"'])
- self.expect("p strptr",
+ self.expect("expression strptr",
substrs=['ptr = "Hello world!"'])
self.expect(
- "p (char*)\"1234567890123456789012345678901234567890123456789012345678901234ABC\"",
+ "expression (char*)\"1234567890123456789012345678901234567890123456789012345678901234ABC\"",
substrs=[
'(char *) $',
' = ptr = ',
diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-ptr-to-array/TestPtrToArrayFormatting.py b/lldb/test/API/functionalities/data-formatter/data-formatter-ptr-to-array/TestPtrToArrayFormatting.py
index e1f10e4b10ee8..b7fbc6f4614e2 100644
--- a/lldb/test/API/functionalities/data-formatter/data-formatter-ptr-to-array/TestPtrToArrayFormatting.py
+++ b/lldb/test/API/functionalities/data-formatter/data-formatter-ptr-to-array/TestPtrToArrayFormatting.py
@@ -45,10 +45,10 @@ def cleanup():
# Execute the cleanup function during test case tear down.
self.addTearDownHook(cleanup)
- self.expect('p *(int (*)[3])foo',
+ self.expect('expression *(int (*)[3])foo',
substrs=['(int[3]) $', '[0] = 1', '[1] = 2', '[2] = 3'])
- self.expect('p *(int (*)[3])foo', matching=False,
+ self.expect('expression *(int (*)[3])foo', matching=False,
substrs=['01 00 00 00 02 00 00 00 03 00 00 00'])
- self.expect('p *(int (*)[3])foo', matching=False,
+ self.expect('expression *(int (*)[3])foo', matching=False,
substrs=['0x000000030000000200000001'])
diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-smart-array/TestDataFormatterSmartArray.py b/lldb/test/API/functionalities/data-formatter/data-formatter-smart-array/TestDataFormatterSmartArray.py
index 77757e05b585a..547a5c14d1602 100644
--- a/lldb/test/API/functionalities/data-formatter/data-formatter-smart-array/TestDataFormatterSmartArray.py
+++ b/lldb/test/API/functionalities/data-formatter/data-formatter-smart-array/TestDataFormatterSmartArray.py
@@ -76,11 +76,11 @@ def cleanup():
substrs=['arr = \"',
'Nested Hello world!'])
- self.expect("p strarr",
+ self.expect("expression strarr",
substrs=['arr = \"',
'Hello world!'])
- self.expect("p other.strarr",
+ self.expect("expression other.strarr",
substrs=['arr = \"',
'Nested Hello world!'])
@@ -96,11 +96,11 @@ def cleanup():
substrs=['ptr = \"',
'Nested Hello world!'])
- self.expect("p strptr",
+ self.expect("expression strptr",
substrs=['ptr = \"',
'Hello world!'])
- self.expect("p other.strptr",
+ self.expect("expression other.strptr",
substrs=['ptr = \"',
'Nested Hello world!'])
@@ -115,11 +115,11 @@ def cleanup():
substrs=['arr = \"',
'Nested Hello world!'])
- self.expect("p strarr",
+ self.expect("expression strarr",
substrs=['arr = \"',
'Hello world!'])
- self.expect("p other.strarr",
+ self.expect("expression other.strarr",
substrs=['arr = \"',
'Nested Hello world!'])
@@ -135,11 +135,11 @@ def cleanup():
substrs=['arr = ',
'Nested Hello world!'])
- self.expect("p strarr",
+ self.expect("expression strarr",
substrs=['arr = \"',
'Hello world!'])
- self.expect("p other.strarr",
+ self.expect("expression other.strarr",
substrs=['arr = ',
'Nested Hello world!'])
@@ -154,11 +154,11 @@ def cleanup():
substrs=['ptr = \"',
'Nested Hello world!'])
- self.expect("p strptr",
+ self.expect("expression strptr",
substrs=['ptr = \"',
'Hello world!'])
- self.expect("p other.strptr",
+ self.expect("expression other.strptr",
substrs=['ptr = \"',
'Nested Hello world!'])
@@ -174,11 +174,11 @@ def cleanup():
substrs=['arr = ',
'Nested Hello world!'])
- self.expect("p strarr",
+ self.expect("expression strarr",
substrs=['arr = \"',
'Hello world!'])
- self.expect("p other.strarr",
+ self.expect("expression other.strarr",
substrs=['arr = ',
'Nested Hello world!'])
@@ -193,11 +193,11 @@ def cleanup():
substrs=['ptr = \"',
'Nested Hello world!'])
- self.expect("p strptr",
+ self.expect("expression strptr",
substrs=['ptr = \"',
'Hello world!'])
- self.expect("p other.strptr",
+ self.expect("expression other.strptr",
substrs=['ptr = \"',
'Nested Hello world!'])
@@ -214,11 +214,11 @@ def cleanup():
substrs=['ptr = \"',
'Nested Hello world!'])
- self.expect("p strptr", matching=False,
+ self.expect("expression strptr", matching=False,
substrs=['ptr = \"',
'Hello world!'])
- self.expect("p other.strptr", matching=False,
+ self.expect("expression other.strptr", matching=False,
substrs=['ptr = \"',
'Nested Hello world!'])
@@ -234,11 +234,11 @@ def cleanup():
substrs=['ptr = ',
'[{N},{e}]'])
- self.expect("p strptr",
+ self.expect("expression strptr",
substrs=['ptr = ',
'[{H},{e}]'])
- self.expect("p other.strptr",
+ self.expect("expression other.strptr",
substrs=['ptr = ',
'[{N},{e}]'])
diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/list/TestDataFormatterGenericList.py b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/list/TestDataFormatterGenericList.py
index ef909e8b6ce9b..45cc53aa1ada0 100644
--- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/list/TestDataFormatterGenericList.py
+++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/list/TestDataFormatterGenericList.py
@@ -73,7 +73,7 @@ def cleanup():
substrs=['size=0',
'{}'])
- self.expect("p numbers_list",
+ self.expect("expression numbers_list",
substrs=['size=0',
'{}'])
@@ -114,7 +114,7 @@ def cleanup():
'[5] =',
'0x0cab0cab'])
- self.expect("p numbers_list",
+ self.expect("expression numbers_list",
substrs=['size=6',
'[0] = ',
'0x12345678',
@@ -186,7 +186,7 @@ def cleanup():
'[2]', 'smart',
'[3]', '!!!'])
- self.expect("p text_list",
+ self.expect("expression text_list",
substrs=['size=4',
'\"goofy\"',
'\"is\"',
diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/multimap/TestDataFormatterGenericMultiMap.py b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/multimap/TestDataFormatterGenericMultiMap.py
index c0a21de3a469b..39031d88480a5 100644
--- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/multimap/TestDataFormatterGenericMultiMap.py
+++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/multimap/TestDataFormatterGenericMultiMap.py
@@ -119,7 +119,7 @@ def cleanup():
self.check("ii", 8)
- self.expect("p ii",
+ self.expect("expression ii",
substrs=[multimap, 'size=8',
'[5] = ',
'first = 5',
@@ -180,7 +180,7 @@ def cleanup():
'[3] = (first = "zero", second = 0)',
])
- self.expect("p si",
+ self.expect("expression si",
substrs=[multimap, 'size=4',
'[0] = (first = "one", second = 1)',
'[1] = (first = "three", second = 3)',
@@ -232,7 +232,7 @@ def cleanup():
])
self.expect(
- "p is",
+ "expression is",
substrs=[
multimap,
'size=4',
@@ -291,7 +291,7 @@ def cleanup():
self.check("ss", 3)
self.expect(
- "p ss",
+ "expression ss",
substrs=[
multimap,
'size=3',
diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/multiset/TestDataFormatterGenericMultiSet.py b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/multiset/TestDataFormatterGenericMultiSet.py
index 55712a8f7a40b..181142f04fccf 100644
--- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/multiset/TestDataFormatterGenericMultiSet.py
+++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/multiset/TestDataFormatterGenericMultiSet.py
@@ -107,7 +107,7 @@ def cleanup():
])
self.check("ss", 4)
self.expect(
- "p ss",
+ "expression ss",
substrs=[
"size=4",
'[0] = "a"',
diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/set/TestDataFormatterGenericSet.py b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/set/TestDataFormatterGenericSet.py
index 280670df48f32..cec447c596bc9 100644
--- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/set/TestDataFormatterGenericSet.py
+++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/set/TestDataFormatterGenericSet.py
@@ -101,7 +101,7 @@ def cleanup():
'[2] = "b"',
'[3] = "c"'])
self.expect(
- "p ss",
+ "expression ss",
substrs=["size=4",
'[0] = "a"',
'[1] = "a very long string is right here"',
@@ -147,4 +147,4 @@ def test_ref_and_ptr_libstdcpp(self):
@add_test_categories(["libc++"])
def test_ref_and_ptr_libcpp(self):
- self.do_test_ref_and_ptr(USE_LIBCPP)
\ No newline at end of file
+ self.do_test_ref_and_ptr(USE_LIBCPP)
diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/map/TestDataFormatterLibccMap.py b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/map/TestDataFormatterLibccMap.py
index 097a1e649d43a..44c807ed1657d 100644
--- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/map/TestDataFormatterLibccMap.py
+++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/map/TestDataFormatterLibccMap.py
@@ -90,7 +90,7 @@ def cleanup():
lldbutil.continue_to_breakpoint(self.process(), bkpt)
- self.expect("p ii",
+ self.expect("expression ii",
substrs=['%s::map' % ns, 'size=8',
'[5] = ',
'first = 5',
@@ -171,7 +171,7 @@ def cleanup():
])
self.expect(
- "p si",
+ "expression si",
substrs=[
'%s::map' % ns,
'size=4',
@@ -225,7 +225,7 @@ def cleanup():
])
self.expect(
- "p is",
+ "expression is",
substrs=[
'%s::map' % ns,
'size=4',
@@ -278,7 +278,7 @@ def cleanup():
])
self.expect(
- "p ss",
+ "expression ss",
substrs=[
'%s::map' % ns,
'size=3',
diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/vector/TestDataFormatterLibcxxVector.py b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/vector/TestDataFormatterLibcxxVector.py
index f478421c3c0e6..f07f1fb97cfbe 100644
--- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/vector/TestDataFormatterLibcxxVector.py
+++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/vector/TestDataFormatterLibcxxVector.py
@@ -88,7 +88,7 @@ def cleanup():
'[3] = 1234',
'}'])
- self.expect("p numbers",
+ self.expect("expression numbers",
substrs=['$', 'size=4',
'[0] = 1',
'[1] = 12',
@@ -135,7 +135,7 @@ def cleanup():
'is',
'smart'])
- self.expect("p strings",
+ self.expect("expression strings",
substrs=['goofy',
'is',
'smart'])
@@ -149,7 +149,7 @@ def cleanup():
'is',
'smart'])
- self.expect("p strings",
+ self.expect("expression strings",
substrs=['vector has 3 items',
'goofy',
'is',
@@ -185,4 +185,4 @@ def test_ref_and_ptr(self):
self.expect("frame variable ptr", substrs=['ptr =', ' size=7'])
- self.expect("p ptr", substrs=['$', 'size=7'])
+ self.expect("expression ptr", substrs=['$', 'size=7'])
diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libstdcpp/map/TestDataFormatterStdMap.py b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libstdcpp/map/TestDataFormatterStdMap.py
index abd1043cf4fcb..9ef3d883683fe 100644
--- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libstdcpp/map/TestDataFormatterStdMap.py
+++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libstdcpp/map/TestDataFormatterStdMap.py
@@ -91,7 +91,7 @@ def cleanup():
'first = 7',
'second = 1'])
- self.expect("p ii",
+ self.expect("expression ii",
substrs=['map has 9 items',
'[5] = ',
'first = 5',
@@ -158,7 +158,7 @@ def cleanup():
])
self.expect(
- "p si",
+ "expression si",
substrs=[
'map has 5 items',
'[0] = (first = "four", second = 4)',
@@ -210,7 +210,7 @@ def cleanup():
])
self.expect(
- "p is",
+ "expression is",
substrs=[
'map has 4 items', '[0] = (first = 1, second = "is")',
'[1] = (first = 2, second = "smart")',
@@ -261,7 +261,7 @@ def cleanup():
])
self.expect(
- "p ss",
+ "expression ss",
substrs=[
'map has 4 items',
'[0] = (first = "a Mac..", second = "..is always a Mac!")',
diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libstdcpp/vector/TestDataFormatterStdVector.py b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libstdcpp/vector/TestDataFormatterStdVector.py
index d40a96ad1a6f9..7ccba5638a517 100644
--- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libstdcpp/vector/TestDataFormatterStdVector.py
+++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libstdcpp/vector/TestDataFormatterStdVector.py
@@ -72,7 +72,7 @@ def cleanup():
'[3] = 1234',
'}'])
- self.expect("p numbers",
+ self.expect("expression numbers",
substrs=['$', 'size=4',
'[0] = 1',
'[1] = 12',
@@ -110,7 +110,7 @@ def cleanup():
'[6] = 1234567',
'}'])
- self.expect("p numbers",
+ self.expect("expression numbers",
substrs=['$', 'size=7',
'[0] = 1',
'[1] = 12',
@@ -164,7 +164,7 @@ def cleanup():
'is',
'smart'])
- self.expect("p strings",
+ self.expect("expression strings",
substrs=['goofy',
'is',
'smart'])
@@ -178,7 +178,7 @@ def cleanup():
'is',
'smart'])
- self.expect("p strings",
+ self.expect("expression strings",
substrs=['vector has 3 items',
'goofy',
'is',
diff --git a/lldb/test/API/functionalities/inferior-assert/TestInferiorAssert.py b/lldb/test/API/functionalities/inferior-assert/TestInferiorAssert.py
index bd4c1d3acf200..f56119cbc12ab 100644
--- a/lldb/test/API/functionalities/inferior-assert/TestInferiorAssert.py
+++ b/lldb/test/API/functionalities/inferior-assert/TestInferiorAssert.py
@@ -240,10 +240,10 @@ def check_expr_in_main(self, thread):
if 'main' == frame.GetFunctionName():
frame_id = frame.GetFrameID()
self.runCmd("frame select " + str(frame_id), RUN_SUCCEEDED)
- self.expect("p argc", substrs=['(int)', ' = 1'])
- self.expect("p hello_world", substrs=['Hello'])
- self.expect("p argv[0]", substrs=['a.out'])
- self.expect("p null_ptr", substrs=['= 0x0'])
+ self.expect("expression argc", substrs=['(int)', ' = 1'])
+ self.expect("expression hello_world", substrs=['Hello'])
+ self.expect("expression argv[0]", substrs=['a.out'])
+ self.expect("expression null_ptr", substrs=['= 0x0'])
return True
return False
diff --git a/lldb/test/API/functionalities/inferior-crashing/TestInferiorCrashing.py b/lldb/test/API/functionalities/inferior-crashing/TestInferiorCrashing.py
index 5c4abff6e0f0d..b63a09d047024 100644
--- a/lldb/test/API/functionalities/inferior-crashing/TestInferiorCrashing.py
+++ b/lldb/test/API/functionalities/inferior-crashing/TestInferiorCrashing.py
@@ -124,8 +124,8 @@ def inferior_crashing_expr(self):
# The lldb expression interpreter should be able to read from addresses
# of the inferior after a crash.
- self.expect("p argc",
+ self.expect("expression argc",
startstr='(int) $0 = 1')
- self.expect("p hello_world",
+ self.expect("expression hello_world",
substrs=['Hello'])
diff --git a/lldb/test/API/functionalities/inferior-crashing/TestInferiorCrashingStep.py b/lldb/test/API/functionalities/inferior-crashing/TestInferiorCrashingStep.py
index 0d992b6be5aeb..4e49caf631f60 100644
--- a/lldb/test/API/functionalities/inferior-crashing/TestInferiorCrashingStep.py
+++ b/lldb/test/API/functionalities/inferior-crashing/TestInferiorCrashingStep.py
@@ -145,9 +145,9 @@ def inferior_crashing_expr(self):
# The lldb expression interpreter should be able to read from addresses
# of the inferior after a crash.
- self.expect("p argc", startstr='(int) $0 = 1')
+ self.expect("expression argc", startstr='(int) $0 = 1')
- self.expect("p hello_world", substrs=['Hello'])
+ self.expect("expression hello_world", substrs=['Hello'])
def inferior_crashing_step(self):
"""Test that lldb functions correctly after stepping through a crash."""
@@ -167,8 +167,8 @@ def inferior_crashing_step(self):
# The lldb expression interpreter should be able to read from addresses
# of the inferior after a crash.
- self.expect("p argv[0]", substrs=['a.out'])
- self.expect("p null_ptr", substrs=['= 0x0'])
+ self.expect("expression argv[0]", substrs=['a.out'])
+ self.expect("expression null_ptr", substrs=['= 0x0'])
# lldb should be able to read from registers from the inferior after
# crashing.
@@ -212,11 +212,11 @@ def inferior_crashing_expr_step_expr(self):
# The lldb expression interpreter should be able to read from addresses
# of the inferior after a crash.
- self.expect("p argv[0]", substrs=['a.out'])
+ self.expect("expression argv[0]", substrs=['a.out'])
self.runCmd("next")
self.check_stop_reason()
# The lldb expression interpreter should be able to read from addresses
# of the inferior after a crash.
- self.expect("p argv[0]", substrs=['a.out'])
+ self.expect("expression argv[0]", substrs=['a.out'])
diff --git a/lldb/test/API/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferior.py b/lldb/test/API/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferior.py
index 0b4dd18844c22..043efcb4b59f2 100644
--- a/lldb/test/API/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferior.py
+++ b/lldb/test/API/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferior.py
@@ -134,5 +134,5 @@ def recursive_inferior_crashing_expr(self):
# The lldb expression interpreter should be able to read from addresses
# of the inferior after a crash.
- self.expect("p i",
+ self.expect("expression i",
startstr='(int) $0 =')
diff --git a/lldb/test/API/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferiorStep.py b/lldb/test/API/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferiorStep.py
index 4d3c23f58d6bf..d14bdc23c5f51 100644
--- a/lldb/test/API/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferiorStep.py
+++ b/lldb/test/API/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferiorStep.py
@@ -68,7 +68,7 @@ def recursive_inferior_crashing_step(self):
# The lldb expression interpreter should be able to read from addresses
# of the inferior after a crash.
- self.expect("p i", substrs=['(int) $0 ='])
+ self.expect("expression i", substrs=['(int) $0 ='])
# lldb should be able to read from registers from the inferior after
# crashing.
@@ -111,12 +111,12 @@ def recursive_inferior_crashing_expr_step_expr(self):
# The lldb expression interpreter should be able to read from addresses
# of the inferior after a crash.
- self.expect("p null", startstr='(char *) $0 = 0x0')
+ self.expect("expression null", startstr='(char *) $0 = 0x0')
self.runCmd("next")
# The lldb expression interpreter should be able to read from addresses
# of the inferior after a step.
- self.expect("p null", startstr='(char *) $1 = 0x0')
+ self.expect("expression null", startstr='(char *) $1 = 0x0')
self.check_stop_reason()
diff --git a/lldb/test/API/functionalities/multiple-slides/TestMultipleSlides.py b/lldb/test/API/functionalities/multiple-slides/TestMultipleSlides.py
index d89cc70a94333..c54c4010cda7b 100644
--- a/lldb/test/API/functionalities/multiple-slides/TestMultipleSlides.py
+++ b/lldb/test/API/functionalities/multiple-slides/TestMultipleSlides.py
@@ -31,8 +31,8 @@ def test_mulitple_slides(self):
# View the first element of `first` and `second` while
# they have no load address set.
- self.expect("p/d ((int*)&first)[0]", substrs=['= 5'])
- self.expect("p/d ((int*)&second)[0]", substrs=['= 6'])
+ self.expect("expression/d ((int*)&first)[0]", substrs=['= 5'])
+ self.expect("expression/d ((int*)&second)[0]", substrs=['= 6'])
self.assertEqual(first_sym.GetStartAddress().GetLoadAddress(target), lldb.LLDB_INVALID_ADDRESS)
self.assertEqual(second_sym.GetStartAddress().GetLoadAddress(target), lldb.LLDB_INVALID_ADDRESS)
@@ -44,8 +44,8 @@ def test_mulitple_slides(self):
# 0x1000 - 0x17ff first[]
# 0x1800 - 0x1fff second[]
target.SetModuleLoadAddress(module, 0)
- self.expect("p/d ((int*)&first)[0]", substrs=['= 5'])
- self.expect("p/d ((int*)&second)[0]", substrs=['= 6'])
+ self.expect("expression/d ((int*)&first)[0]", substrs=['= 5'])
+ self.expect("expression/d ((int*)&second)[0]", substrs=['= 6'])
self.assertEqual(first_sym.GetStartAddress().GetLoadAddress(target),
first_sym.GetStartAddress().GetFileAddress())
self.assertEqual(second_sym.GetStartAddress().GetLoadAddress(target),
@@ -61,8 +61,8 @@ def test_mulitple_slides(self):
# the beginning address of second[] will get a load address
# of 0x1800, instead of 0x17c0 (0x1800-64) as we need to get.
target.SetModuleLoadAddress(module, first_size - 64)
- self.expect("p/d ((int*)&first)[0]", substrs=['= 5'])
- self.expect("p/d ((int*)&second)[0]", substrs=['= 6'])
+ self.expect("expression/d ((int*)&first)[0]", substrs=['= 5'])
+ self.expect("expression/d ((int*)&second)[0]", substrs=['= 6'])
self.assertNotEqual(first_sym.GetStartAddress().GetLoadAddress(target),
first_sym.GetStartAddress().GetFileAddress())
self.assertNotEqual(second_sym.GetStartAddress().GetLoadAddress(target),
@@ -70,8 +70,8 @@ def test_mulitple_slides(self):
# Slide it back to the original vmaddr.
target.SetModuleLoadAddress(module, 0)
- self.expect("p/d ((int*)&first)[0]", substrs=['= 5'])
- self.expect("p/d ((int*)&second)[0]", substrs=['= 6'])
+ self.expect("expression/d ((int*)&first)[0]", substrs=['= 5'])
+ self.expect("expression/d ((int*)&second)[0]", substrs=['= 6'])
self.assertEqual(first_sym.GetStartAddress().GetLoadAddress(target),
first_sym.GetStartAddress().GetFileAddress())
self.assertEqual(second_sym.GetStartAddress().GetLoadAddress(target),
diff --git a/lldb/test/API/functionalities/set-data/TestSetData.py b/lldb/test/API/functionalities/set-data/TestSetData.py
index c2d4ebc0d17d3..a3970a05fd993 100644
--- a/lldb/test/API/functionalities/set-data/TestSetData.py
+++ b/lldb/test/API/functionalities/set-data/TestSetData.py
@@ -24,7 +24,7 @@ def test_set_data(self):
self.runCmd("run", RUN_SUCCEEDED)
- self.expect("p myFoo.x", VARIABLES_DISPLAYED_CORRECTLY,
+ self.expect("expression myFoo.x", VARIABLES_DISPLAYED_CORRECTLY,
substrs=['2'])
process = self.dbg.GetSelectedTarget().GetProcess()
@@ -40,7 +40,7 @@ def test_set_data(self):
self.runCmd("continue")
- self.expect("p myFoo.x", VARIABLES_DISPLAYED_CORRECTLY,
+ self.expect("expression myFoo.x", VARIABLES_DISPLAYED_CORRECTLY,
substrs=['4'])
frame = process.GetSelectedThread().GetFrameAtIndex(0)
diff --git a/lldb/test/API/functionalities/ubsan/user-expression/TestUbsanUserExpression.py b/lldb/test/API/functionalities/ubsan/user-expression/TestUbsanUserExpression.py
index 81f4bdc0b9b83..78795e3928769 100644
--- a/lldb/test/API/functionalities/ubsan/user-expression/TestUbsanUserExpression.py
+++ b/lldb/test/API/functionalities/ubsan/user-expression/TestUbsanUserExpression.py
@@ -38,7 +38,7 @@ def ubsan_tests(self):
self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
substrs=['stopped', 'stop reason = breakpoint'])
- self.expect("p foo()", substrs=["(int) $0 = 42"])
+ self.expect("expression foo()", substrs=["(int) $0 = 42"])
self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
substrs=['stopped', 'stop reason = breakpoint'])
diff --git a/lldb/test/API/lang/c/enum_types/TestEnumTypes.py b/lldb/test/API/lang/c/enum_types/TestEnumTypes.py
index 937c720272f90..8a47574036a6f 100644
--- a/lldb/test/API/lang/c/enum_types/TestEnumTypes.py
+++ b/lldb/test/API/lang/c/enum_types/TestEnumTypes.py
@@ -42,7 +42,7 @@ def test_command_line(self):
# Test the behavior in case have a variable of a type considered
# 'bitfield' by the heuristic, but the value isn't actually fully
# covered by the enumerators.
- self.expect("p (enum bitfield)nonsense", DATA_TYPES_DISPLAYED_CORRECTLY,
+ self.expect("expression (enum bitfield)nonsense", DATA_TYPES_DISPLAYED_CORRECTLY,
patterns=[' = B | C | 0x10$'])
# Break inside the main.
diff --git a/lldb/test/API/lang/c/strings/TestCStrings.py b/lldb/test/API/lang/c/strings/TestCStrings.py
index bf74b47bad6a1..7467844dc8e05 100644
--- a/lldb/test/API/lang/c/strings/TestCStrings.py
+++ b/lldb/test/API/lang/c/strings/TestCStrings.py
@@ -40,14 +40,14 @@ def test_with_run_command(self):
substrs=['[0] = \'h\'',
'[5] = \'\\0\''])
- self.expect("p \"hello\"",
+ self.expect("expression \"hello\"",
substrs=['[6]) $', 'hello'])
- self.expect("p (char*)\"hello\"",
+ self.expect("expression (char*)\"hello\"",
substrs=['(char *) $', ' = 0x',
'hello'])
- self.expect("p (int)strlen(\"\")",
+ self.expect("expression (int)strlen(\"\")",
substrs=['(int) $', ' = 0'])
self.expect("expression !z",
diff --git a/lldb/test/API/lang/cpp/namespace/TestNamespace.py b/lldb/test/API/lang/cpp/namespace/TestNamespace.py
index af6568ccc9297..114d70dc0ec90 100644
--- a/lldb/test/API/lang/cpp/namespace/TestNamespace.py
+++ b/lldb/test/API/lang/cpp/namespace/TestNamespace.py
@@ -220,8 +220,8 @@ def test_with_run_command(self):
# global namespace qualification with function in anonymous namespace
self.expect_expr("myanonfunc(4)", result_value="8")
- self.expect("p myanonfunc",
+ self.expect("expression myanonfunc",
patterns=['\(anonymous namespace\)::myanonfunc\(int\)'])
- self.expect("p variadic_sum", patterns=[
+ self.expect("expression variadic_sum", patterns=[
'\(anonymous namespace\)::variadic_sum\(int, ...\)'])
diff --git a/lldb/test/API/lang/cpp/unique-types4/TestUniqueTypes4.py b/lldb/test/API/lang/cpp/unique-types4/TestUniqueTypes4.py
index ccc38337dd4f3..222f7d8a48d8d 100644
--- a/lldb/test/API/lang/cpp/unique-types4/TestUniqueTypes4.py
+++ b/lldb/test/API/lang/cpp/unique-types4/TestUniqueTypes4.py
@@ -13,12 +13,12 @@ def do_test(self, debug_flags):
self.build(dictionary=debug_flags)
lldbutil.run_to_source_breakpoint(self, "// Set breakpoint here", lldb.SBFileSpec("main.cpp"))
# FIXME: these should successfully print the values
- self.expect("print ns::Foo<double>::value", substrs=["no member named"], error=True)
- self.expect("print ns::Foo<int>::value", substrs=["no member named"], error=True)
- self.expect("print ns::Bar<double>::value", substrs=["no member named"], error=True)
- self.expect("print ns::Bar<int>::value", substrs=["no member named"], error=True)
- self.expect("print ns::FooDouble::value", substrs=["Couldn't lookup symbols"], error=True)
- self.expect("print ns::FooInt::value", substrs=["Couldn't lookup symbols"], error=True)
+ self.expect("expression ns::Foo<double>::value", substrs=["no member named"], error=True)
+ self.expect("expression ns::Foo<int>::value", substrs=["no member named"], error=True)
+ self.expect("expression ns::Bar<double>::value", substrs=["no member named"], error=True)
+ self.expect("expression ns::Bar<int>::value", substrs=["no member named"], error=True)
+ self.expect("expression ns::FooDouble::value", substrs=["Couldn't lookup symbols"], error=True)
+ self.expect("expression ns::FooInt::value", substrs=["Couldn't lookup symbols"], error=True)
@skipIf(compiler=no_match("clang"))
@skipIf(compiler_version=["<", "15.0"])
diff --git a/lldb/test/API/lang/objc/foundation/TestObjCMethodsNSError.py b/lldb/test/API/lang/objc/foundation/TestObjCMethodsNSError.py
index 616557b46423b..ed63894bd310a 100644
--- a/lldb/test/API/lang/objc/foundation/TestObjCMethodsNSError.py
+++ b/lldb/test/API/lang/objc/foundation/TestObjCMethodsNSError.py
@@ -41,6 +41,6 @@ def test_NSError_p(self):
self.target, process, thread, bkpt = lldbutil.run_to_source_breakpoint(
self, '// Set break point at this line',
lldb.SBFileSpec('main.m', False))
- self.expect("p [NSError thisMethodIsntImplemented:0]", error=True, patterns=[
+ self.expect("expression [NSError thisMethodIsntImplemented:0]", error=True, patterns=[
"no known method", "cast the message send to the method's return type"])
self.runCmd("process continue")
diff --git a/lldb/test/API/lang/objc/modules-auto-import/TestModulesAutoImport.py b/lldb/test/API/lang/objc/modules-auto-import/TestModulesAutoImport.py
index ab520f8b76d47..e823457bc4dc8 100644
--- a/lldb/test/API/lang/objc/modules-auto-import/TestModulesAutoImport.py
+++ b/lldb/test/API/lang/objc/modules-auto-import/TestModulesAutoImport.py
@@ -39,5 +39,5 @@ def test_expr(self):
self.runCmd("settings set target.auto-import-clang-modules true")
- self.expect("p getpid()", VARIABLES_DISPLAYED_CORRECTLY,
+ self.expect("expression getpid()", VARIABLES_DISPLAYED_CORRECTLY,
substrs=["pid_t"])
diff --git a/lldb/test/API/lang/objc/modules/TestObjCModules.py b/lldb/test/API/lang/objc/modules/TestObjCModules.py
index a6cb7933765ee..e8b8f19f9507f 100644
--- a/lldb/test/API/lang/objc/modules/TestObjCModules.py
+++ b/lldb/test/API/lang/objc/modules/TestObjCModules.py
@@ -60,7 +60,7 @@ def test_expr(self):
substrs=["NSUInteger", "3"])
self.expect(
- "p *[NSURL URLWithString:@\"http://lldb.llvm.org\"]",
+ "expression *[NSURL URLWithString:@\"http://lldb.llvm.org\"]",
VARIABLES_DISPLAYED_CORRECTLY,
substrs=[
"NSURL",
@@ -68,7 +68,7 @@ def test_expr(self):
"_urlString"])
self.expect(
- "p [NSURL URLWithString:@\"http://lldb.llvm.org\"].scheme",
+ "expression [NSURL URLWithString:@\"http://lldb.llvm.org\"].scheme",
VARIABLES_DISPLAYED_CORRECTLY,
substrs=["http"])
# Test that the NULL macro still works with a loaded module.
diff --git a/lldb/test/API/lang/objc/objc-struct-argument/TestObjCStructArgument.py b/lldb/test/API/lang/objc/objc-struct-argument/TestObjCStructArgument.py
index f29bdf6c64e6a..7371c2dc5910d 100644
--- a/lldb/test/API/lang/objc/objc-struct-argument/TestObjCStructArgument.py
+++ b/lldb/test/API/lang/objc/objc-struct-argument/TestObjCStructArgument.py
@@ -52,7 +52,7 @@ def test_with_python_api(self):
frame = thread_list[0].GetFrameAtIndex(0)
self.assertTrue(frame, "Got a valid frame 0 frame.")
- self.expect("p [summer sumThings:tts]", substrs=['9'])
+ self.expect("expression [summer sumThings:tts]", substrs=['9'])
self.expect(
"po [NSValue valueWithRect:rect]",
diff --git a/lldb/test/API/lang/objc/radar-9691614/TestObjCMethodReturningBOOL.py b/lldb/test/API/lang/objc/radar-9691614/TestObjCMethodReturningBOOL.py
index 3cb783c6ad488..1f2efc801eae9 100644
--- a/lldb/test/API/lang/objc/radar-9691614/TestObjCMethodReturningBOOL.py
+++ b/lldb/test/API/lang/objc/radar-9691614/TestObjCMethodReturningBOOL.py
@@ -43,4 +43,4 @@ def test_method_ret_BOOL(self):
])
# rdar://problem/9691614
- self.runCmd('p (int)[my isValid]')
+ self.runCmd('expression (int)[my isValid]')
diff --git a/lldb/test/API/linux/aarch64/non_address_bit_memory_access/TestAArch64LinuxNonAddressBitMemoryAccess.py b/lldb/test/API/linux/aarch64/non_address_bit_memory_access/TestAArch64LinuxNonAddressBitMemoryAccess.py
index 87953cbad475f..f554d5b39eaf7 100644
--- a/lldb/test/API/linux/aarch64/non_address_bit_memory_access/TestAArch64LinuxNonAddressBitMemoryAccess.py
+++ b/lldb/test/API/linux/aarch64/non_address_bit_memory_access/TestAArch64LinuxNonAddressBitMemoryAccess.py
@@ -153,10 +153,10 @@ def test_non_address_bit_memory_caching(self):
# This should fill the cache by doing a read of buf_with_non_address
# with the non-address bits removed (which is == buf).
- self.runCmd("p buf_with_non_address")
+ self.runCmd("expression buf_with_non_address")
# This will read from the cache since the two pointers point to the
# same place.
- self.runCmd("p buf")
+ self.runCmd("expression buf")
# Open log ignoring utf-8 decode errors
with open(log_file, 'r', errors='ignore') as f:
diff --git a/lldb/test/API/linux/builtin_trap/TestBuiltinTrap.py b/lldb/test/API/linux/builtin_trap/TestBuiltinTrap.py
index ab204344ab84b..a2f66d84fd424 100644
--- a/lldb/test/API/linux/builtin_trap/TestBuiltinTrap.py
+++ b/lldb/test/API/linux/builtin_trap/TestBuiltinTrap.py
@@ -46,4 +46,4 @@ def test_with_run_command(self):
self.runCmd("up", RUN_SUCCEEDED)
# evaluate a local
- self.expect('p foo', substrs=['= 5'])
+ self.expect('expression foo', substrs=['= 5'])
diff --git a/lldb/test/API/lua_api/TestFileHandle.lua b/lldb/test/API/lua_api/TestFileHandle.lua
index be7b570882319..e50a1fb3dc058 100644
--- a/lldb/test/API/lua_api/TestFileHandle.lua
+++ b/lldb/test/API/lua_api/TestFileHandle.lua
@@ -16,7 +16,7 @@ end
function _T:TestLegacyFileOut()
local f = io.open(self.output, 'w')
self.debugger:SetOutputFile(f)
- self:handle_command('p/x 3735928559', false)
+ self:handle_command('expression/x 3735928559', false)
f:close()
f = io.open(self.output, 'r')
diff --git a/lldb/test/API/macosx/early-process-launch/TestEarlyProcessLaunch.py b/lldb/test/API/macosx/early-process-launch/TestEarlyProcessLaunch.py
index 0d579dc6b8faa..ad6663cdeba32 100644
--- a/lldb/test/API/macosx/early-process-launch/TestEarlyProcessLaunch.py
+++ b/lldb/test/API/macosx/early-process-launch/TestEarlyProcessLaunch.py
@@ -40,14 +40,14 @@ def test_early_process_launch(self):
logfile_early = os.path.join(self.getBuildDir(), "types-log-early.txt")
self.addTearDownHook(lambda: self.runCmd("log disable lldb types"))
self.runCmd("log enable -f %s lldb types" % logfile_early)
- self.runCmd("p global = 15")
+ self.runCmd("expression global = 15")
err = process.Continue()
self.assertTrue(err.Success())
logfile_later = os.path.join(self.getBuildDir(), "types-log-later.txt")
self.runCmd("log enable -f %s lldb types" % logfile_later)
- self.runCmd("p global = 25")
+ self.runCmd("expression global = 25")
self.assertTrue(os.path.exists(logfile_early))
self.assertTrue(os.path.exists(logfile_later))
diff --git a/lldb/test/API/macosx/macCatalyst/TestMacCatalyst.py b/lldb/test/API/macosx/macCatalyst/TestMacCatalyst.py
index cbfc1d999eac0..676f584648089 100644
--- a/lldb/test/API/macosx/macCatalyst/TestMacCatalyst.py
+++ b/lldb/test/API/macosx/macCatalyst/TestMacCatalyst.py
@@ -21,7 +21,7 @@ def test_macabi(self):
patterns=[self.getArchitecture() +
r'.*-apple-ios.*-macabi a\.out'])
self.expect("fr v s", substrs=["Hello macCatalyst"])
- self.expect("p s", substrs=["Hello macCatalyst"])
+ self.expect("expression s", substrs=["Hello macCatalyst"])
self.check_debugserver(log)
def check_debugserver(self, log):
diff --git a/lldb/test/API/macosx/macCatalystAppMacOSFramework/TestMacCatalystAppWithMacOSFramework.py b/lldb/test/API/macosx/macCatalystAppMacOSFramework/TestMacCatalystAppWithMacOSFramework.py
index f7948270b2eb3..d3f2083ffc709 100644
--- a/lldb/test/API/macosx/macCatalystAppMacOSFramework/TestMacCatalystAppWithMacOSFramework.py
+++ b/lldb/test/API/macosx/macCatalystAppMacOSFramework/TestMacCatalystAppWithMacOSFramework.py
@@ -24,7 +24,7 @@ def test(self):
patterns=[arch + r'.*-apple-ios.*-macabi a\.out',
arch + r'.*-apple-macosx.* libfoo.dylib[^(]'])
self.expect("fr v s", "Hello macCatalyst")
- self.expect("p s", "Hello macCatalyst")
+ self.expect("expression s", "Hello macCatalyst")
self.check_debugserver(log)
def check_debugserver(self, log):
diff --git a/lldb/test/API/python_api/file_handle/TestFileHandle.py b/lldb/test/API/python_api/file_handle/TestFileHandle.py
index c342047f1627d..89ebeae00e18f 100644
--- a/lldb/test/API/python_api/file_handle/TestFileHandle.py
+++ b/lldb/test/API/python_api/file_handle/TestFileHandle.py
@@ -135,7 +135,7 @@ def test_legacy_file_out_script(self):
def test_legacy_file_out(self):
with open(self.out_filename, 'w') as f:
self.dbg.SetOutputFileHandle(f, False)
- self.handleCmd('p/x 3735928559', collect_result=False, check=False)
+ self.handleCmd('expression/x 3735928559', collect_result=False, check=False)
with open(self.out_filename, 'r') as f:
self.assertIn('deadbeef', f.read())
@@ -359,7 +359,7 @@ def test_binary_inout(self):
def test_string_inout(self):
- inf = io.StringIO("help help\np/x ~0\n")
+ inf = io.StringIO("help help\nexpression/x ~0\n")
outf = io.StringIO()
status = self.dbg.SetOutputFile(lldb.SBFile(outf))
self.assertSuccess(status)
diff --git a/lldb/test/API/types/TestRecursiveTypes.py b/lldb/test/API/types/TestRecursiveTypes.py
index 36900483e7166..c27cf0a4834c4 100644
--- a/lldb/test/API/types/TestRecursiveTypes.py
+++ b/lldb/test/API/types/TestRecursiveTypes.py
@@ -48,5 +48,5 @@ def print_struct(self):
self.runCmd("run", RUN_SUCCEEDED)
- self.runCmd("print tpi")
- self.runCmd("print *tpi")
+ self.runCmd("expression tpi")
+ self.runCmd("expression *tpi")
More information about the lldb-commits
mailing list