Ghidra Decompiler Analysis Engine
|
Root class for all decompiler specific commands. More...
#include <ifacedecomp.hh>
Inherits IfaceCommand.
Inherited by IfcAddpath, IfcAddrrangeLoad, IfcAdjustVma, IfcAnalyzeRange, IfcBreakaction, IfcBreakstart, IfcCallFixup, IfcCallGraphBuild, IfcCallGraphDump, IfcCallGraphList, IfcCallGraphLoad, IfcCallOtherFixup, IfcCleararch, IfcComment, IfcCommentInstr, IfcContinue, IfcCountPcode, IfcDeadcodedelay, IfcDecompile, IfcDump, IfcDumpbinary, IfcDuplicateHash, IfcFlowOverride, IfcForceDec, IfcForcegoto, IfcForceHex, IfcFuncload, IfcGlobalAdd, IfcGlobalify, IfcGlobalRegisters, IfcGlobalRemove, IfcGraphControlflow, IfcGraphDataflow, IfcGraphDom, IfcJumpOverride, IfcListaction, IfcListOverride, IfcListprototypes, IfcLoadFile, IfcLockPrototype, IfcMapaddress, IfcMapexternalref, IfcMapfunction, IfcMaphash, IfcMaplabel, IfcNameVarnode, IfcOption, IfcParseFile, IfcParseLine, IfcPreferSplit, IfcPrintActionstats, IfcPrintBlocktree, IfcPrintCFlat, IfcPrintCGlobals, IfcPrintCover, IfcPrintCStruct, IfcPrintCTypes, IfcPrintCXml, IfcPrintdisasm, IfcPrintExtrapop, IfcPrintHigh, IfcPrintInputs, IfcPrintInputsAll, IfcPrintLanguage, IfcPrintLocalrange, IfcPrintMap, IfcPrintParamMeasures, IfcPrintRaw, IfcPrintSpaces, IfcPrintTree, IfcPrintVarnode, IfcProduceC, IfcProducePrototypes, IfcProtooverride, IfcReadonly, IfcReadSymbols, IfcRemove, IfcRename, IfcResetActionstats, IfcRestore, IfcRetype, IfcSave, IfcSetcontextrange, IfcSettrackedrange, IfcSource, IfcStructureBlocks, IfcTypeVarnode, IfcUnlockPrototype, IfcVarnodeCover, IfcVarnodehighCover, and IfcVolatile.
Public Member Functions | |
virtual void | setData (IfaceStatus *root, IfaceData *data) |
Associate a specific data object with this command. More... | |
virtual string | getModule (void) const |
Get the formal module name to which this command belongs. More... | |
virtual IfaceData * | createData (void) |
Create a specialized data object for this command (and its module) More... | |
virtual void | iterationCallback (Funcdata *fd) |
Perform the per-function aspect of this command. More... | |
void | iterateFunctionsAddrOrder (void) |
Iterate command over all functions in all scopes. More... | |
void | iterateFunctionsLeafOrder (void) |
Iterate command over all functions in a call-graph traversal. More... | |
Public Member Functions inherited from IfaceCommand | |
virtual void | execute (istream &s)=0 |
void | addWord (const string &temp) |
Add a token to the command line string associated with this command. More... | |
void | addWords (const vector< string > &wordlist) |
Add words to the associated command line string. | |
void | commandString (string &res) const |
Get the complete command line string. More... | |
int4 | compare (const IfaceCommand &op2) const |
Order two commands by their command line strings. More... | |
Protected Member Functions | |
void | iterateScopesRecursive (Scope *scope) |
Iterate recursively over all functions in given scope. More... | |
void | iterateFunctionsAddrOrder (Scope *scope) |
Iterate over all functions in a given scope. More... | |
Protected Attributes | |
IfaceStatus * | status |
The console owning this command. | |
IfaceDecompData * | dcp |
Data common to decompiler commands. | |
Root class for all decompiler specific commands.
Commands share the data object IfaceDecompData and are capable of iterating over all functions in the program/architecture.
|
inlinevirtual |
Create a specialized data object for this command (and its module)
This method is only called once per module
Implements IfaceCommand.
|
inlinevirtual |
Get the formal module name to which this command belongs.
Commands in the same module share data through their registered IfaceData object
Implements IfaceCommand.
|
protected |
Iterate over all functions in a given scope.
Runs over every function in the scope calling iterationCallback().
scope | is the given scope |
void IfaceDecompCommand::iterateFunctionsAddrOrder | ( | void | ) |
Iterate command over all functions in all scopes.
Scopes are traversed depth-first, then within a scope, functions are traversed in address order.
void IfaceDecompCommand::iterateFunctionsLeafOrder | ( | void | ) |
Iterate command over all functions in a call-graph traversal.
Traversal is based on the current CallGraph for the program. Child functions are traversed before their parents.
|
protected |
Iterate recursively over all functions in given scope.
Runs over every function in the scope, or any sub-scope , calling iterationCallback()
scope | is the given scope |
|
inlinevirtual |
Perform the per-function aspect of this command.
fd | is the particular function to operate on |
Reimplemented in IfcCallGraphList, IfcCallGraphBuild, IfcDuplicateHash, IfcPrintInputsAll, IfcProducePrototypes, and IfcProduceC.
|
inlinevirtual |
Associate a specific data object with this command.
root | is the interface object this command is registered with |
data | is the data object the command should use |
Implements IfaceCommand.