-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor jumpengine handling to own pkg
- Loading branch information
Showing
8 changed files
with
155 additions
and
83 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package arch | ||
|
||
// JumpEngine contains jump engine related helper. | ||
type JumpEngine interface { | ||
// AddJumpEngine adds a jump engine function address to the list of jump engines. | ||
AddJumpEngine(address uint16) | ||
// GetContextDataReferences parse all instructions of the function context until the jump | ||
// and returns data references that could point to the function table. | ||
GetContextDataReferences(dis Disasm, offsets []Offset, addresses []uint16) ([]uint16, error) | ||
// GetFunctionTableReference detects a jump engine function context and its function table. | ||
GetFunctionTableReference(context uint16, dataReferences []uint16) | ||
// HandleJumpEngineDestination processes a newly detected jump engine destination. | ||
HandleJumpEngineDestination(dis Disasm, caller, destination uint16) error | ||
// HandleJumpEngineCallers processes all callers of a newly detected jump engine function. | ||
HandleJumpEngineCallers(dis Disasm, context uint16) error | ||
// JumpContextInfo builds the list of instructions of the current function context. | ||
JumpContextInfo(dis Disasm, jumpAddress uint16, offsetInfo Offset) ([]Offset, []uint16) | ||
// ScanForNewJumpEngineEntry scans all jump engine calls for an unprocessed entry in the function address table that | ||
// follows the call. It returns whether a new address to parse was added. | ||
ScanForNewJumpEngineEntry(dis Disasm) (bool, error) | ||
} |
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.