decompiler 1.0.0
Public Member Functions | List of all members
VolatileWriteOp Class Reference

An operation that writes to volatile memory. More...

#include <userop.hh>

Inheritance diagram for VolatileWriteOp:
VolatileOp UserPcodeOp

Public Member Functions

 VolatileWriteOp (Architecture *g, const string &nm, int4 ind, bool functional)
 Constructor.
 
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...
 
- Public Member Functions inherited from VolatileOp
 VolatileOp (Architecture *g, const string &nm, int4 ind)
 Constructor.
 
virtual void decode (Decoder &decoder)
 Currently volatile ops only need their name. More...
 
- Public Member Functions inherited from 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 UserPcodeOp
enum  userop_flags { annotation_assignment = 1 , no_operator = 2 }
 
- Static Protected Member Functions inherited from VolatileOp
static string appendSize (const string &base, int4 size)
 Append a suffix to a string encoding a specific size. More...
 
- Protected Attributes inherited from UserPcodeOp
string name
 Low-level name of p-code operator.
 
int4 useropindex
 Index passed in the CALLOTHER op.
 
Architectureglb
 Architecture owning the user defined op.
 
uint4 flags
 Boolean attributes of the CALLOTHER.
 

Detailed Description

An operation that writes to volatile memory.

This CALLOTHER p-code operation takes as its input parameters:

Member Function Documentation

◆ extractAnnotationSize()

int4 VolatileWriteOp::extractAnnotationSize ( const Varnode vn,
const PcodeOp op 
)
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.

Parameters
vnis the annotation Varnode
opis the specific PcodeOp instance of this userop

Reimplemented from UserPcodeOp.

References PcodeOp::getIn(), and Varnode::getSize().

◆ getOperatorName()

string VolatileWriteOp::getOperatorName ( const PcodeOp op) const
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

Parameters
opis the operation (in context) where a symbol is needed
Returns
the symbol as a string

Reimplemented from UserPcodeOp.

References VolatileOp::appendSize(), PcodeOp::getIn(), Varnode::getSize(), UserPcodeOp::name, and PcodeOp::numInput().


The documentation for this class was generated from the following files: