Ghidra 11.3.2
Ghidra internal decompiler documentation.
|
Command to generate a feature vector from a function's data-flow and control-flow graphs. More...
#include <signature_ghidra.hh>
Public Member Functions | |
SignaturesAt (bool dbg) | |
Constructor specifying response format. | |
virtual void | rawAction (void) |
Perform the action of the command. | |
![]() | |
GhidraCommand (void) | |
Construct given i/o streams. | |
virtual | ~GhidraCommand (void) |
Destructor. | |
int4 | doit (void) |
Configure and execute the command, then send back results. | |
Private Member Functions | |
virtual void | loadParameters (void) |
Read parameters directing command execution. | |
Private Attributes | |
bool | debug |
True if the command should return verbose feature encodings. | |
Address | addr |
The entry point of the function to generate features for. | |
Additional Inherited Members | |
![]() | |
virtual void | sendResult (void) |
Send results of the command (if any) back to the Ghidra client. | |
![]() | |
istream & | sin |
The input stream from the Ghidra client. | |
ostream & | sout |
The output stream to the Ghidra client. | |
ArchitectureGhidra * | ghidra |
The Architecture on which to perform the command. | |
int4 | status |
Meta-command to system (0=wait for next command, 1=terminate process) | |
Command to generate a feature vector from a function's data-flow and control-flow graphs.
The command expects to receive the entry point address of a function. The function is decompiled using the "normalize" simplification style. Then features are extracted from the resulting data-flow and control-flow graphs of the decompiled function. The features are returned to the Ghidra client. The command can be instantiated in two forms. One form returns a stream-lined encoding of the feature vector for more efficient transfers during normal operation. The other form returns more descriptive meta-data with the features and is suitable for debugging or exploring the feature generation process.
|
privatevirtual |
Read parameters directing command execution.
This method reads an id selecting the Architecture to act on, but it can be overloaded to read any set of data from the Ghidra client to configure how the command is executed. Individual parameters are read using the method protocol.
Reimplemented from ghidra::GhidraCommand.
References addr, ghidra::Address::decode(), ghidra::GhidraCommand::ghidra, ghidra::GhidraCommand::loadParameters(), ghidra::ArchitectureGhidra::readStringStream(), and ghidra::GhidraCommand::sin.
|
virtual |
Perform the action of the command.
Configuration is assumed to have happened, and this object can immediately begin examining and manipulating data under the active Architecture object to perform the command.
Implements ghidra::GhidraCommand.
References addr, ghidra::Architecture::allacts, debug, ghidra::ActionDatabase::getCurrent(), ghidra::ActionDatabase::getCurrentName(), ghidra::Database::getGlobalScope(), ghidra::Address::getShortcut(), ghidra::GhidraCommand::ghidra, ghidra::Funcdata::isProcStarted(), ghidra::Action::perform(), ghidra::Address::printRaw(), ghidra::Scope::queryFunction(), ghidra::Action::reset(), ghidra::ActionDatabase::setCurrent(), ghidra::GhidraCommand::sout, and ghidra::Architecture::symboltab.