decompiler 1.0.0
Public Member Functions | Private Attributes | List of all members
InjectedUserOp Class Reference

A user defined operation that is injected with other p-code. More...

#include <userop.hh>

Inheritance diagram for InjectedUserOp:
UserPcodeOp

Public Member Functions

 InjectedUserOp (Architecture *g, const string &nm, int4 ind, int4 injid)
 Constructor.
 
uint4 getInjectId (void) const
 Get the id of the injection object.
 
virtual void decode (Decoder &decoder)
 Restore the detailed description from a stream element. 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...
 

Private Attributes

uint4 injectid
 The id of the injection object (to which this op maps)
 

Additional Inherited Members

- Public Types inherited from UserPcodeOp
enum  userop_flags { annotation_assignment = 1 , no_operator = 2 }
 
- 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

A user defined operation that is injected with other p-code.

The system can configure user defined p-code ops as a hook point within the control-flow where other p-code is injected during analysis. This class maps the raw CALLOTHER p-code op, via its constant id, to its injection object. The injection object is also referenced by an id and is managed by PcodeInjectLibrary.

Member Function Documentation

◆ decode()

void InjectedUserOp::decode ( Decoder decoder)
virtual

Restore the detailed description from a stream element.

The details of how a user defined operation behaves are parsed from the element.

Parameters
decoderis the stream decoder

Implements UserPcodeOp.

References InjectPayload::CALLOTHERFIXUP_TYPE, PcodeInjectLibrary::decodeInject(), PcodeInjectLibrary::getCallOtherTarget(), UserPcodeOp::getIndex(), UserOpManage::getOp(), UserPcodeOp::glb, injectid, UserPcodeOp::name, Architecture::pcodeinjectlib, UserPcodeOp::useropindex, and Architecture::userops.

Referenced by UserOpManage::decodeCallOtherFixup().


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