Implement --addresses & --basenames to supplement --list-frameworks #42
+18
−3
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I desired to use this tool in order to aid navigating the shared cache with Hopper. Specifically I wanted to have an address and determine which framework it came from so that I can open that binary up in Hopper alongside the original binary (e.g. in UIKitCore there's a call to some function at
0x180918930
, I wanted to know what function this is, but first I need to figure out which image it's coming from).In order to solve this I implemented
-a/--addresses
which prints out the addresses of each image along with the image name. Along the way I also sorted the image list to be printed in VM address order so that it's a bit easier to navigate visually.I also implemented
--basenames
since most of the time (all of the time?) there aren't any images with colliding base names. This also makes navigating the output of--list-frameworks
a bit easier.P.S. If I'm way off base for making this PR feel free to let me know. Just figured these changes might be helpful to folks outside myself.