decompiler
1.0.0
|
Check for duplicate hashes in functions: duplicate hash
More...
Public Member Functions | |
virtual void | execute (istream &s) |
virtual void | iterationCallback (Funcdata *fd) |
Perform the per-function aspect of this command. More... | |
Public Member Functions inherited from ghidra::IfaceDecompCommand | |
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... | |
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 ghidra::IfaceCommand | |
virtual | ~IfaceCommand (void) |
Destructor. | |
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... | |
Static Public Member Functions | |
static void | check (Funcdata *fd, ostream &s) |
Check for duplicate hashes in given function. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from ghidra::IfaceDecompCommand | |
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 inherited from ghidra::IfaceDecompCommand | |
IfaceStatus * | status |
The console owning this command. | |
IfaceDecompData * | dcp |
Data common to decompiler commands. | |
Check for duplicate hashes in functions: duplicate hash
All functions in the architecture/program are decompiled, and for each a check is made for Varnode pairs with identical hash values.
|
static |
Check for duplicate hashes in given function.
For each duplicate discovered, a message is written to the provided stream.
fd | is the given function to search |
s | is the stream to write messages to |
References ghidra::Varnode::beginDescend(), ghidra::Funcdata::beginLoc(), ghidra::PcodeOp::code(), ghidra::CPUI_LOAD, ghidra::CPUI_RETURN, ghidra::CPUI_STORE, ghidra::Varnode::endDescend(), ghidra::Funcdata::endLoc(), ghidra::Varnode::getDef(), ghidra::DynamicHash::getHash(), ghidra::DynamicHash::getPositionFromHash(), ghidra::PcodeOp::getSlot(), ghidra::Varnode::getSpace(), ghidra::DynamicHash::getTotalFromHash(), ghidra::AddrSpace::getType(), ghidra::IPTR_INTERNAL, ghidra::Varnode::isAnnotation(), ghidra::Varnode::isConstant(), ghidra::Varnode::isImplied(), ghidra::Varnode::loneDescend(), ghidra::Varnode::printRaw(), ghidra::PcodeOp::printRaw(), and ghidra::DynamicHash::uniqueHash().
|
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 |
Implements ghidra::IfaceCommand.
|
virtual |
Perform the per-function aspect of this command.
fd | is the particular function to operate on |
Reimplemented from ghidra::IfaceDecompCommand.
References ghidra::LowlevelError::explain, ghidra::Funcdata::getName(), ghidra::Funcdata::getSize(), and ghidra::Funcdata::hasNoCode().