decompiler
1.0.0
|
A user defined p-code op that has a dynamically defined procedure. More...
#include <userop.hh>
Public Member Functions | |
TermPatternOp (Architecture *g, const string &nm, int4 ind) | |
Constructor. | |
virtual int4 | getNumVariableTerms (void) const =0 |
Get the number of input Varnodes expected. | |
virtual bool | unify (Funcdata &data, PcodeOp *op, vector< Varnode *> &bindlist) const =0 |
Gather the formal input Varnode objects given the root PcodeOp. More... | |
virtual uintb | execute (const vector< uintb > &input) const =0 |
Compute the output value of this operation, given constant inputs. More... | |
Public Member Functions inherited from ghidra::UserPcodeOp | |
UserPcodeOp (Architecture *g, const string &nm, int4 ind) | |
Construct from name and index. | |
const string & | getName (void) const |
Get the low-level name of the p-code op. | |
int4 | getIndex (void) const |
Get the constant id of the op. | |
uint4 | getDisplay (void) const |
Get display type (0=functional) | |
virtual | ~UserPcodeOp (void) |
Destructor. | |
virtual string | getOperatorName (const PcodeOp *op) const |
Get the symbol representing this operation in decompiled code. More... | |
virtual int4 | extractAnnotationSize (const Varnode *vn, const PcodeOp *op) |
Assign a size to an annotation input to this userop. More... | |
virtual void | decode (Decoder &decoder)=0 |
Restore the detailed description from a stream element. More... | |
Additional Inherited Members | |
Public Types inherited from ghidra::UserPcodeOp | |
enum | userop_flags { annotation_assignment = 1, no_operator = 2 } |
Enumeration of different boolean properties that can be assigned to a CALLOTHER. More... | |
Protected Attributes inherited from ghidra::UserPcodeOp | |
string | name |
Low-level name of p-code operator. | |
int4 | useropindex |
Index passed in the CALLOTHER op. | |
Architecture * | glb |
Architecture owning the user defined op. | |
uint4 | flags |
Boolean attributes of the CALLOTHER. | |
A user defined p-code op that has a dynamically defined procedure.
The behavior of this op on constant inputs can be dynamically defined. This class defines a unify() method that picks out the input varnodes to the operation, given the root PcodeOp. The input varnodes would generally just be the input varnodes to the raw CALLOTHER after the constant id, but skipping, reordering, or other tree traversal is possible.
This class also defines an execute() method that computes the output given constant inputs (matching the format determined by unify()).
|
pure virtual |
Compute the output value of this operation, given constant inputs.
input | is the ordered list of constant inputs |
Implemented in ghidra::SegmentOp.
|
pure virtual |
Gather the formal input Varnode objects given the root PcodeOp.
data | is the function being analyzed |
op | is the root operation |
bindlist | will hold the ordered list of input Varnodes |
Implemented in ghidra::SegmentOp.