decompiler 1.0.0
Public Member Functions | Static Public Member Functions | List of all members
ghidra::Override::Record Class Referenceabstract

Abstract class performing an override of p-code on an instruction. More...

#include <override.hh>

Inheritance diagram for ghidra::Override::Record:
ghidra::Override::Branch ghidra::Override::Call ghidra::Override::CallCall ghidra::Override::CallReturn ghidra::Override::CallotherBranch ghidra::Override::CallotherCall ghidra::Override::Return

Public Member Functions

virtual ~Record (void)
 Destructor.
 
virtual void performOverride (const Address &addr, Funcdata &data) const =0
 Perform p-code modifications for the instruction at the given address. More...
 
virtual void encode (Encoder &encoder, const Address &addr) const =0
 Encode this record to stream. More...
 
virtual void printRaw (ostream &s, const Address &addr) const =0
 Print a description of the override as a console message. More...
 

Static Public Member Functions

static Record * allocateFlow (const string &name)
 Return a corresponding flow override record. More...
 
static Record * allocateCallDest (const string &name, const Address &dest)
 Return a corresponding call destination override. More...
 

Detailed Description

Abstract class performing an override of p-code on an instruction.

Instances operate directly on raw p-code emitted for a single instruction, prior to incorporation in the syntax tree.

Member Function Documentation

◆ allocateCallDest()

Override::Record * ghidra::Override::Record::allocateCallDest ( const string &  name,
const Address &  dest 
)
static

Return a corresponding call destination override.

Parameters
nameis the particular call destination override name
destis the new destination address
Returns
a newly allocated destination override record

References ghidra::Override::CallotherCall::NAME, ghidra::Override::CallotherBranch::NAME, and ghidra::Override::CallCall::NAME.

Referenced by ghidra::Override::decode(), and ghidra::Override::insertDestinationOverride().

◆ allocateFlow()

Override::Record * ghidra::Override::Record::allocateFlow ( const string &  name)
static

Return a corresponding flow override record.

Flow records take no additional parameters to construct

Parameters
nameis the particular flow override name
Returns
a newly allocated flow override record

References ghidra::Override::Branch::NAME, ghidra::Override::Call::NAME, ghidra::Override::CallReturn::NAME, and ghidra::Override::Return::NAME.

Referenced by ghidra::Override::decode(), and ghidra::Override::insertFlowOverride().

◆ encode()

virtual void ghidra::Override::Record::encode ( Encoder &  encoder,
const Address &  addr 
) const
pure virtual

Encode this record to stream.

Parameters
encoderis the stream
addris the address of the instruction the override applies to

Implemented in ghidra::Override::Branch, ghidra::Override::Call, ghidra::Override::CallReturn, ghidra::Override::Return, ghidra::Override::CallotherCall, ghidra::Override::CallotherBranch, and ghidra::Override::CallCall.

◆ performOverride()

virtual void ghidra::Override::Record::performOverride ( const Address &  addr,
Funcdata &  data 
) const
pure virtual

Perform p-code modifications for the instruction at the given address.

Parameters
addris the given address of the instruction
datais the function

Implemented in ghidra::Override::Branch, ghidra::Override::Call, ghidra::Override::CallReturn, ghidra::Override::Return, ghidra::Override::CallotherCall, ghidra::Override::CallotherBranch, and ghidra::Override::CallCall.

Referenced by ghidra::FlowInfo::processInstruction().

◆ printRaw()

virtual void ghidra::Override::Record::printRaw ( ostream &  s,
const Address &  addr 
) const
pure virtual

Print a description of the override as a console message.

Parameters
sis the stream to write to
addris the address this override applies to

Implemented in ghidra::Override::Branch, ghidra::Override::Call, ghidra::Override::CallReturn, ghidra::Override::Return, ghidra::Override::CallotherCall, ghidra::Override::CallotherBranch, and ghidra::Override::CallCall.


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