| Age | Commit message (Collapse) | Author |
|
1. Skip displaying the declaration and initialization of the objc_super
struct since that's an artifact of how objc_msgSendSuper is called.
2. Display the message receiver as `super` rather than `&super`
|
|
|
|
objc_opt_self -> [... self], objc_opt_isKindOfClass -> [... isKindOfClass:...], objc_opt_respondsToSelector -> [... respondsToSelector:...]
|
|
|
|
implementation
These are detected by their function names having the characteristic
`-[ClassName methodName:]` format. Calls to functions with this naming
pattern that accept a selector as a second argument are assumed to be
`objc_msgSend` calls that the Objective-C workflow rewrote.
These calls are formatted identically to other `objc_msgSend` calls with
the exception that the selector tokens reference the address of the call
target rather than the selector string, so double-clicking on them takes
you to the fixed destination of the rewritten call.
|
|
This is implemented in the Pseudo C plug-in as it shares 99% of the
logic. The Objective-C support is implemented in a subclass of
`PseudoCFunction`. The handling of instruction types that the
Objective-C representation needs to customize is extracted into virtual
functions that the Objective-C subclass overrides.
This currently supports:
* Rewriting `objc_msgSend` / `objc_msgSendSuper2` with constant
selectors to `[receiver message]` notation.
* Rewriting calls to `objc_alloc` / `objc_alloc_init` / `objc_new` to
the equivalent message send notation.
* Rewriting `objc_retain` / `objc_release` and friends to the
equivalent message send notation.
* Displaying Objective-C class references as their class names rather
than `_OBJC_CLASS_$_` symbol names.
* Displaying Objective-C string literals as `@"..."`.
This works best when used in conjunction with
https://github.com/bdash/bn-objc-extras as the reference counting runtime
calls add so much clutter.
|