Ghidra Decompiler Analysis Engine
|
A command that can be executed from the command line. More...
#include <interface.hh>
Public Member Functions | |
virtual void | setData (IfaceStatus *root, IfaceData *data)=0 |
Associate a specific data object with this command. More... | |
virtual void | execute (istream &s)=0 |
virtual string | getModule (void) const =0 |
Get the formal module name to which this command belongs. More... | |
virtual IfaceData * | createData (void)=0 |
Create a specialized data object for this command (and its module) More... | |
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... | |
A command that can be executed from the command line.
The command has data associated with it (via setData()) and is executed via the execute() method. The command can get additional parameters from the command line by reading the input stream passed to it. The command is associated with a specific sequence of words (tokens) that should appear at the start of the command line.
|
inline |
Add a token to the command line string associated with this command.
temp | is the new token to add |
void IfaceCommand::commandString | ( | string & | res | ) | const |
Get the complete command line string.
res | is overwritten with the full command line string |
int4 IfaceCommand::compare | ( | const IfaceCommand & | op2 | ) | const |
Order two commands by their command line strings.
The commands are ordered lexicographically and alphabetically by the comparing tokens in their respective command line strings
op2 | is the other command to compare with this |
|
pure virtual |
Create a specialized data object for this command (and its module)
This method is only called once per module
Implemented in IfaceBaseCommand, IfaceCodeDataCommand, IfaceCommandDummy, and IfaceDecompCommand.
|
pure virtual |
Execute this command. Additional state can be read from the given command line stream. Otherwise, the command gets its data from its registered IfaceData object
s | is the input stream from the command line |
Implemented in IfcAnalyzeRange, IfcStructureBlocks, IfcPreferSplit, IfcReadonly, IfcVolatile, IfcResetActionstats, IfcPrintActionstats, IfcCountPcode, IfcCallOtherFixup, IfcCallFixup, IfcComment, IfcCallGraphList, IfcCallGraphLoad, IfcCallGraphBuild, IfcCallGraphDump, IfcDuplicateHash, IfcCommentInstr, IfcGraphDom, IfcGraphControlflow, IfcGraphDataflow, IfcPrintRaw, IfcContinue, IfcPrintMap, IfcPrintLocalrange, IfcUnlockPrototype, IfcLockPrototype, IfcPrintInputsAll, IfcPrintInputs, IfcGlobalRegisters, IfcGlobalify, IfcGlobalRemove, IfcGlobalAdd, IfcDeadcodedelay, IfcFlowOverride, IfcJumpOverride, IfcProtooverride, IfcForcegoto, IfcForceDec, IfcForceHex, IfcTypeVarnode, IfcNameVarnode, IfcVarnodeCover, IfcPrintExtrapop, IfcVarnodehighCover, IfcPrintCover, IfcPrintVarnode, IfcRemove, IfcRetype, IfcRename, IfcPrintParamMeasures, IfcPrintHigh, IfcPrintSpaces, IfcEcho, IfcPrintBlocktree, IfcClosefile, IfcPrintTree, IfcOpenfileAppend, IfcBreakaction, IfcOpenfile, IfcBreakstart, IfcHistory, IfcSettrackedrange, IfcQuit, IfcSetcontextrange, IfcListprototypes, IfcListOverride, IfcListaction, IfcProducePrototypes, IfcProduceC, IfcPrintCTypes, IfcPrintCGlobals, IfcPrintCStruct, IfcPrintCFlat, IfcPrintCXml, IfcPrintLanguage, IfcDecompile, IfcCodeDataDumpTargetHits, IfcDumpbinary, IfcCodeDataDumpUnlinked, IfcDump, IfcCodeDataDumpStarts, IfcPrintdisasm, IfcCodeDataDumpCrossRefs, IfcMaplabel, IfcCodeDataDumpModelHits, IfcMapexternalref, IfcCodeDataRun, IfcMapfunction, IfcCodeDataTarget, IfcMaphash, IfcCodeDataInit, IfcMapaddress, IfcReadSymbols, IfcCleararch, IfcAddrrangeLoad, IfaceCommandDummy, IfcFuncload, IfcAdjustVma, IfcParseFile, IfcParseLine, IfcOption, IfcSource, IfcRestore, IfcSave, IfcAddpath, and IfcLoadFile.
|
pure virtual |
Get the formal module name to which this command belongs.
Commands in the same module share data through their registered IfaceData object
Implemented in IfaceBaseCommand, IfaceCodeDataCommand, IfaceCommandDummy, and IfaceDecompCommand.
|
pure virtual |
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 |
Implemented in IfaceBaseCommand, IfaceCodeDataCommand, IfaceCommandDummy, and IfaceDecompCommand.