File tree 3 files changed +10
-8
lines changed
source/Plugins/Language/ObjC
test/API/functionalities/data-formatter/data-formatter-objc
3 files changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -66,8 +66,8 @@ bool lldb_private::formatters::NSError_SummaryProvider(
66
66
lldb::addr_t domain_location = ptr_value + 3 * ptr_size;
67
67
68
68
Status error;
69
- uint64_t code = process_sp->ReadUnsignedIntegerFromMemory (code_location,
70
- ptr_size, 0 , error);
69
+ int64_t code = process_sp->ReadSignedIntegerFromMemory (code_location,
70
+ ptr_size, 0 , error);
71
71
if (error.Fail ())
72
72
return false ;
73
73
@@ -77,7 +77,7 @@ bool lldb_private::formatters::NSError_SummaryProvider(
77
77
return false ;
78
78
79
79
if (!domain_str_value) {
80
- stream.Printf (" domain: nil - code: %" PRIu64 , code);
80
+ stream.Printf (" domain: nil - code: %" PRIi64 , code);
81
81
return true ;
82
82
}
83
83
@@ -98,11 +98,11 @@ bool lldb_private::formatters::NSError_SummaryProvider(
98
98
StreamString domain_str_summary;
99
99
if (NSStringSummaryProvider(*domain_str_sp, domain_str_summary, options) &&
100
100
!domain_str_summary.Empty ()) {
101
- stream.Printf (" domain: %s - code: %" PRIu64 , domain_str_summary.GetData (),
101
+ stream.Printf (" domain: %s - code: %" PRIi64 , domain_str_summary.GetData (),
102
102
code);
103
103
return true ;
104
104
} else {
105
- stream.Printf (" domain: nil - code: %" PRIu64 , code);
105
+ stream.Printf (" domain: nil - code: %" PRIi64 , code);
106
106
return true ;
107
107
}
108
108
}
Original file line number Diff line number Diff line change @@ -23,10 +23,12 @@ def test_nserror_with_run_command_no_const(self):
23
23
self .appkit_tester_impl (self .nserror_data_formatter_commands , False )
24
24
25
25
def nserror_data_formatter_commands (self ):
26
- self .expect ("frame variable nserror" , substrs = ['domain: @"Foobar" - code: 12' ])
26
+ self .expect (
27
+ "frame variable nserror" , substrs = ['domain: @"Foobar" - code: -1234' ]
28
+ )
27
29
28
30
self .expect (
29
- "frame variable nserrorptr" , substrs = ['domain: @"Foobar" - code: 12 ' ]
31
+ "frame variable nserrorptr" , substrs = ['domain: @"Foobar" - code: -1234 ' ]
30
32
)
31
33
32
34
self .expect ("frame variable nserror->_userInfo" , substrs = ["2 key/value pairs" ])
Original file line number Diff line number Diff line change @@ -618,7 +618,7 @@ int main(int argc, const char *argv[]) {
618
618
619
619
NSDictionary *error_userInfo = @{@" a" : @1 , @" b" : @2 };
620
620
NSError *nserror = [[NSError alloc ] initWithDomain: @" Foobar"
621
- code: 12
621
+ code: - 1234
622
622
userInfo: error_userInfo];
623
623
NSError **nserrorptr = &nserror;
624
624
You can’t perform that action at this time.
0 commit comments