Xtrace icon indicating copy to clipboard operation
Xtrace copied to clipboard

awesome tool | made a few changes to get it to work for me

Open Daij-Djan opened this issue 7 years ago • 2 comments

1. change

Extended array of methods best not to touch. Without that, xtrace causes an exception after a while: 'expection' being: _os_unfair_lock_recursive_abort

I added retainWeakReference, _tryRetain, autorelease, isEqual:, hash and I added back the dealloc related methods


see:

            else if ( name[0] == '.' ||
                     [nameStr isEqualToString:@"description"] || [nameStr hasPrefix:@"_description"] ||
                     [nameStr isEqualToString:@"isEqual:"] || [nameStr hasPrefix:@"hash"] ||
                     [nameStr isEqualToString:@"retainWeakReference"] || [nameStr isEqualToString:@"_tryRetain"] || [nameStr isEqualToString:@"retain"] || [nameStr isEqualToString:@"release"] || [nameStr isEqualToString:@"autorelease"] ||
                     [nameStr isEqualToString:@"_isDeallocating"] || [nameStr isEqualToString:@"dealloc"] || [nameStr hasPrefix:@"_dealloc"] )
                ; // best avoided

2. change

Made formatValue function not call isKindOfClass on proxy objects to avoid a crash when proxies implement isKindOfClass

other

  • added #pragma clang diagnostic ignored "-Wignored-attributes" so the NS_RETAINS macro on the templated c function works in all cases
  • had to remove the last pop pragma to make it compile

Daij-Djan avatar May 20 '18 04:05 Daij-Djan

edited changes

Daij-Djan avatar May 21 '18 03:05 Daij-Djan

Hi @Daij-Djan, Thanks for this and the tweet. Any chance you could make it into a PR?

johnno1962 avatar May 21 '18 11:05 johnno1962