Add function name option for address reversal - #9
Open
leo385 wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Add an explicit
--functionoption for single-address reversal.This allows callers to provide the function name together with
--addressand--class, soFunctionTargetreceives complete metadata even when the backend only exposes a generic symbol such asFUN_005b8f00.This is useful for projects where source mappings already identify the real function name, but Ghidra's decompiler output still uses an autogenerated symbol.
Example
Dry-run output now includes the supplied function name:
Changes
--function FUNCTION_NAMEto thereversecommandFunctionTarget--dry-runoutputWhy
For address-based reversal, the backend may return a generic symbol such as:
while the source project already knows the real target:
Providing the function name explicitly gives the reverser more accurate source context instead of relying only on the backend symbol.
Testing
Targeted CLI test:
Result:
Full CLI test file on Windows:
The remaining failure is an existing Windows-specific YAML path escaping issue in
test_status_no_sessionand is unrelated to this change.