Skip to content

Commit 32a7672

Browse files
committed
[lldb] Fix tagged-pointer info address parsing
1 parent aa33c09 commit 32a7672

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1047,7 +1047,7 @@ class CommandObjectMultiwordObjC_TaggedPointer_Info
10471047
continue;
10481048

10491049
Status error;
1050-
lldb::addr_t arg_addr = OptionArgParser::ToAddress(
1050+
lldb::addr_t arg_addr = OptionArgParser::ToRawAddress(
10511051
&exe_ctx, arg_str, LLDB_INVALID_ADDRESS, &error);
10521052
if (arg_addr == 0 || arg_addr == LLDB_INVALID_ADDRESS || error.Fail()) {
10531053
result.AppendErrorWithFormatv(

lldb/test/API/lang/objc/tagged-pointer/TestTaggedPointerCmd.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,23 @@ class TestTaggedPointerCommand(TestBase):
88
@no_debug_info_test
99
def test(self):
1010
self.build()
11-
lldbutil.run_to_source_breakpoint(
11+
_, _, thread, _ = lldbutil.run_to_source_breakpoint(
1212
self, "// break here", lldb.SBFileSpec("main.m")
1313
)
1414

15+
n1 = thread.GetSelectedFrame().FindVariable("n1")
16+
# breakpoint()
17+
self.expect(
18+
f"lang objc tagged-pointer info {n1.addr}",
19+
substrs=[
20+
f"{n1.addr} is tagged",
21+
"payload = 0x0000000000000012",
22+
"value = 0x0000000000000001",
23+
"info bits = 0x0000000000000002",
24+
"class = __NSCFNumber",
25+
],
26+
)
27+
1528
self.expect(
1629
"lang objc tagged-pointer info bogus",
1730
error=True,

0 commit comments

Comments
 (0)