return false;
}
+ if (!tagged_ptr_vendor->IsPossibleTaggedPointer(arg_addr)) {
+ result.GetOutputStream().Format("{0:x16} is not tagged\n", arg_addr);
+ continue;
+ }
+
auto descriptor_sp = tagged_ptr_vendor->GetClassDescriptor(arg_addr);
if (!descriptor_sp) {
result.AppendErrorWithFormatv(
- "could not get class descriptor for {0:x}\n", arg_addr);
+ "could not get class descriptor for {0:x16}\n", arg_addr);
result.SetStatus(lldb::eReturnStatusFailed);
return false;
}
&payload)) {
result.GetOutputStream().Format(
"{0:x} is tagged\n"
- "\tpayload = {1:x}\n"
- "\tvalue = {2:x}\n"
- "\tinfo bits = {3:x}\n"
+ "\tpayload = {1:x16}\n"
+ "\tvalue = {2:x16}\n"
+ "\tinfo bits = {3:x16}\n"
"\tclass = {4}\n",
arg_addr, payload, value_bits, info_bits,
descriptor_sp->GetClassName().AsCString("<unknown>"));
} else {
- result.GetOutputStream().Format("{0:x16} is not tagged\n",
- (uint64_t)arg_addr);
+ result.GetOutputStream().Format("{0:x16} is not tagged\n", arg_addr);
}
}
mydir = TestBase.compute_mydir(__file__)
+ @no_debug_info_test
def test(self):
self.build()
lldbutil.run_to_source_breakpoint(self,"// break here", lldb.SBFileSpec("main.m"))
self.expect("lang objc tagged-pointer info 0x0", error=True,
patterns=["could not convert '0x0' to a valid address"])
- self.expect("lang objc tagged-pointer info 0xffffffff", error=True,
- patterns=["could not get class descriptor for 0xffffffff"])
+ self.expect("lang objc tagged-pointer info 0x00000001",
+ patterns=["0x0000000000000001 is not tagged"])
#import <Foundation/Foundation.h>
int main() {
id n1 = [NSNumber numberWithInt:1];
- printf("%x", n1); // break here
+ printf("%x\n", n1); // break here
return 0;
}