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

A user defined p-code op for assisting the recovery of jump tables. More...

#include <userop.hh>

Inheritance diagram for JumpAssistOp:
UserPcodeOp

Public Member Functions

 JumpAssistOp (Architecture *g)
 Constructor. More...
 
int4 getIndex2Case (void) const
 Get the injection id for index2case.
 
int4 getIndex2Addr (void) const
 Get the injection id for index2addr.
 
int4 getDefaultAddr (void) const
 Get the injection id for defaultaddr.
 
int4 getCalcSize (void) const
 Get the injection id for calcsize.
 
virtual void restoreXml (const Element *el)
 Restore the detailed description from an XML stream. 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.
 
virtual ~UserPcodeOp (void)
 Destructor.
 
virtual string getOperatorName (const PcodeOp *op) const
 Get the symbol representing this operation in decompiled code. More...
 

Private Attributes

int4 index2case
 Id of p-code script performing index2case (== -1 if no script and index==case)
 
int4 index2addr
 Id of p-code script performing index2addr (must be present)
 
int4 defaultaddr
 Id of p-code script performing calculation of default address (must be present)
 
int4 calcsize
 Id of p-code script that calculates number of indices (== -1 if no script)
 

Additional Inherited Members

- 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.
 

Detailed Description

A user defined p-code op for assisting the recovery of jump tables.

An instance of this class refers to p-code script(s) that describe how to parse the jump table from the load image. Possible scripts include:

This class stores injection ids. The scripts themselves are managed by PcodeInjectLibrary.

Constructor & Destructor Documentation

JumpAssistOp::JumpAssistOp ( Architecture g)

Constructor.

Parameters
gis the Architecture owning this set of jump assist scripts

References calcsize, defaultaddr, index2addr, and index2case.

Referenced by UserOpManage::parseJumpAssist().

Member Function Documentation

void JumpAssistOp::restoreXml ( const Element el)
virtual

Restore the detailed description from an XML stream.

The details of how a user defined operation behaves can be dynamically configured from an XML tag.

Parameters
elis the root XML element describing the op

Implements UserPcodeOp.

References calcsize, defaultaddr, InjectPayload::EXECUTABLEPCODE_TYPE, Element::getAttributeValue(), Element::getChildren(), UserPcodeOp::getIndex(), Element::getName(), UserOpManage::getOp(), UserPcodeOp::glb, index2addr, index2case, UserPcodeOp::name, Architecture::pcodeinjectlib, PcodeInjectLibrary::restoreXmlInject(), UserPcodeOp::useropindex, and Architecture::userops.

Referenced by UserOpManage::parseJumpAssist().


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