decompiler
1.0.0
|
A command that can be executed from the command line. More...
#include <interface.hh>
Public Member Functions | |
virtual | ~IfaceCommand (void) |
Destructor. | |
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 | removeWord (void) |
Remove the last token from the associated command line string. | |
const string & | getCommandWord (int4 i) const |
Get the i-th command token. | |
void | addWords (const vector< string > &wordlist) |
Add words to the associated command line string. | |
int4 | numWords (void) const |
Return the number of tokens in the 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... | |
Private Attributes | |
vector< string > | com |
The token sequence associated with the command. | |
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 |
Referenced by ghidra::IfaceStatus::registerCom(), and ghidra::IfaceStatus::restrictCom().
void ghidra::IfaceCommand::commandString | ( | string & | res | ) | const |
Get the complete command line string.
res | is overwritten with the full command line string |
References ghidra::IfaceStatus::wordsToString().
int4 ghidra::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 |
References com.
Referenced by ghidra::compare_ifacecommand().
|
pure virtual |
Create a specialized data object for this command (and its module)
This method is only called once per module
Implemented in ghidra::IfaceBaseCommand, ghidra::IfaceCommandDummy, and ghidra::IfaceDecompCommand.
Referenced by ghidra::IfaceStatus::registerCom().
|
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 ghidra::IfcExecuteTestCommand, ghidra::IfcListTestCommands, ghidra::IfcLoadTestFile, ghidra::IfcAnalyzeRange, ghidra::IfcStructureBlocks, ghidra::IfcPreferSplit, ghidra::IfcPointerSetting, ghidra::IfcReadonly, ghidra::IfcVolatile, ghidra::IfcResetActionstats, ghidra::IfcPrintActionstats, ghidra::IfcCountPcode, ghidra::IfcFixupApply, ghidra::IfcCallOtherFixup, ghidra::IfcCallFixup, ghidra::IfcComment, ghidra::IfcCallGraphList, ghidra::IfcCallGraphLoad, ghidra::IfcCallGraphBuildQuick, ghidra::IfcCallGraphBuild, ghidra::IfcCallGraphDump, ghidra::IfcDuplicateHash, ghidra::IfcCommentInstr, ghidra::IfcGraphDom, ghidra::IfcGraphControlflow, ghidra::IfcGraphDataflow, ghidra::IfcPrintRaw, ghidra::IfcContinue, ghidra::IfcPrintMap, ghidra::IfcPrintLocalrange, ghidra::IfcUnlockPrototype, ghidra::IfcLockPrototype, ghidra::IfcPrintInputsAll, ghidra::IfcPrintInputs, ghidra::IfcGlobalRegisters, ghidra::IfcGlobalify, ghidra::IfcGlobalRemove, ghidra::IfcGlobalAdd, ghidra::IfcDeadcodedelay, ghidra::IfcFlowOverride, ghidra::IfcJumpOverride, ghidra::IfcProtooverride, ghidra::IfcForcegoto, ghidra::IfcForceDatatypeFormat, ghidra::IfcForceFormat, ghidra::IfcTypeVarnode, ghidra::IfcNameVarnode, ghidra::IfcVarnodeCover, ghidra::IfcPrintExtrapop, ghidra::IfcVarnodehighCover, ghidra::IfcPrintCover, ghidra::IfcPrintVarnode, ghidra::IfcIsolate, ghidra::IfcRemove, ghidra::IfcRetype, ghidra::IfcRename, ghidra::IfcPrintParamMeasures, ghidra::IfcPrintHigh, ghidra::IfcPrintSpaces, ghidra::IfcEcho, ghidra::IfcPrintBlocktree, ghidra::IfcClosefile, ghidra::IfcPrintTree, ghidra::IfcOpenfileAppend, ghidra::IfcBreakaction, ghidra::IfcOpenfile, ghidra::IfcBreakstart, ghidra::IfcHistory, ghidra::IfcSettrackedrange, ghidra::IfcQuit, ghidra::IfcSetcontextrange, ghidra::IfcListprototypes, ghidra::IfcListOverride, ghidra::IfcListaction, ghidra::IfcProducePrototypes, ghidra::IfcProduceC, ghidra::IfcPrintCTypes, ghidra::IfcPrintCGlobals, ghidra::IfcPrintCStruct, ghidra::IfcPrintCFlat, ghidra::IfcPrintCXml, ghidra::IfcPrintLanguage, ghidra::IfcDecompile, ghidra::IfcDumpbinary, ghidra::IfcDump, ghidra::IfcPrintdisasm, ghidra::IfcMapunionfacet, ghidra::IfcMapconvert, ghidra::IfcMaplabel, ghidra::IfcMapexternalref, ghidra::IfcMapfunction, ghidra::IfcMaphash, ghidra::IfcMapaddress, ghidra::IfcReadSymbols, ghidra::IfaceCommandDummy, ghidra::IfcCleararch, ghidra::IfcAddrrangeLoad, ghidra::IfcFuncload, ghidra::IfcAdjustVma, ghidra::IfcParseFile, ghidra::IfcParseLine, ghidra::IfcOption, and ghidra::IfcSource.
|
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 ghidra::IfaceBaseCommand, ghidra::IfaceCommandDummy, and ghidra::IfaceDecompCommand.
Referenced by ghidra::IfaceStatus::registerCom().
|
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 ghidra::IfaceBaseCommand, ghidra::IfaceCommandDummy, and ghidra::IfaceDecompCommand.
Referenced by ghidra::IfaceStatus::registerCom().