Ghidra 11.3.2
Ghidra internal decompiler documentation.
|
An operation that reads from volatile memory. More...
#include <userop.hh>
Public Member Functions | |
VolatileReadOp (const string &nm, Architecture *g, bool functional) | |
Constructor. | |
virtual string | getOperatorName (const PcodeOp *op) const |
Get the symbol representing this operation in decompiled code. | |
virtual Datatype * | getOutputLocal (const PcodeOp *op) const |
Return the output data-type of the user-op if specified. | |
virtual int4 | extractAnnotationSize (const Varnode *vn, const PcodeOp *op) |
Assign a size to an annotation input to this userop. | |
![]() | |
VolatileOp (const string &nm, Architecture *g, uint4 tp, int4 ind) | |
Constructor. | |
virtual void | decode (Decoder &decoder) |
Currently volatile ops only need their name. | |
![]() | |
UserPcodeOp (const string &nm, Architecture *g, uint4 tp, int4 ind) | |
Construct from name and index. | |
const string & | getName (void) const |
Get the low-level name of the p-code op. | |
uint4 | getType (void) const |
Get the encoded class type. | |
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 Datatype * | getInputLocal (const PcodeOp *op, int4 slot) const |
Return the input data-type to the user-op in the given slot. | |
Additional Inherited Members | |
![]() | |
enum | userop_flags { annotation_assignment = 1 , no_operator = 2 , display_string = 4 } |
Enumeration of different boolean properties that can be assigned to a CALLOTHER. More... | |
enum | userop_type { unspecialized = 1 , injected = 2 , volatile_read = 3 , volatile_write = 4 , segment = 5 , jumpassist = 6 , string_data = 7 , datatype = 8 } |
User-op class encoded as an enum. More... | |
![]() | |
static const uint4 | BUILTIN_STRINGDATA = 0x10000000 |
Built-in id for the InternalStringOp. | |
static const uint4 | BUILTIN_VOLATILE_READ = 0x10000001 |
Built-in id for VolatileReadOp. | |
static const uint4 | BUILTIN_VOLATILE_WRITE = 0x10000002 |
Built-in id for VolatileWriteOp. | |
static const uint4 | BUILTIN_MEMCPY = 0x10000003 |
Built-in id for memcpy. | |
static const uint4 | BUILTIN_STRNCPY = 0x10000004 |
Built-in id for strcpy. | |
static const uint4 | BUILTIN_WCSNCPY = 0x10000005 |
Built-in id for wcsncpy. | |
![]() | |
static string | appendSize (const string &base, int4 size) |
Append a suffix to a string encoding a specific size. | |
![]() | |
string | name |
Low-level name of p-code operator. | |
Architecture * | glb |
Architecture owning the user defined op. | |
uint4 | type |
Encoded class type (userop_type) | |
int4 | useropindex |
Index passed in the CALLOTHER op. | |
uint4 | flags |
Boolean attributes of the CALLOTHER. | |
An operation that reads from volatile memory.
This CALLOTHER p-code operation takes as its input parameter, after the constant id, a reference Varnode to the memory being read. The output returned by this operation is the actual value read from memory.
|
virtual |
Assign a size to an annotation input to this userop.
Assuming an annotation refers to a special symbol accessed by this operation, retrieve the size (in bytes) of the symbol, which isn't ordinarily stored as part of the annotation.
Reimplemented from ghidra::UserPcodeOp.
References ghidra::PcodeOp::getOut(), and ghidra::Varnode::getSize().
|
virtual |
Get the symbol representing this operation in decompiled code.
This will return the symbol formally displayed in source code, which can be tailored more than the low-level name
op | is the operation (in context) where a symbol is needed |
Reimplemented from ghidra::UserPcodeOp.
References ghidra::VolatileOp::appendSize(), ghidra::PcodeOp::getOut(), ghidra::Varnode::getSize(), and ghidra::UserPcodeOp::name.
Return the output data-type of the user-op if specified.
op | is the instantiation of the user-op |
Reimplemented from ghidra::UserPcodeOp.
References ghidra::PcodeOp::doesSpecialPropagation(), ghidra::PcodeOp::getAddr(), ghidra::Varnode::getAddr(), ghidra::Database::getGlobalScope(), ghidra::PcodeOp::getIn(), ghidra::PcodeOp::getOut(), ghidra::Varnode::getSize(), ghidra::SymbolEntry::getSizedType(), ghidra::UserPcodeOp::glb, ghidra::Scope::queryProperties(), and ghidra::Architecture::symboltab.