decompiler 1.0.0
Public Member Functions | Static Public Attributes | Private Attributes | List of all members
ghidra::Override::CallCall Class Reference

Convert CALL or CALLIND into a CALL with a new destination address. More...

#include <override.hh>

Inheritance diagram for ghidra::Override::CallCall:
ghidra::Override::Record

Public Member Functions

 CallCall (const Address &dest)
 Constructor.
 
virtual void performOverride (const Address &addr, Funcdata &data) const
 Perform p-code modifications for the instruction at the given address. More...
 
virtual void encode (Encoder &encoder, const Address &addr) const
 Encode this record to stream. More...
 
virtual void printRaw (ostream &s, const Address &addr) const
 Print a description of the override as a console message. More...
 
- Public Member Functions inherited from ghidra::Override::Record
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 Attributes

static const string NAME = "call_call"
 Name of the call -> call override record.
 

Private Attributes

Address callAddress
 Address of (new) CALL.
 

Additional Inherited Members

- Static Public Member Functions inherited from ghidra::Override::Record
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

Convert CALL or CALLIND into a CALL with a new destination address.

Member Function Documentation

◆ encode()

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

Encode this record to stream.

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

Implements ghidra::Override::Record.

References ghidra::Encoder::closeElement(), ghidra::Address::encode(), ghidra::Encoder::openElement(), and ghidra::Encoder::writeString().

◆ performOverride()

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

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

Parameters
addris the given address of the instruction
datais the function

Implements ghidra::Override::Record.

References ghidra::CPUI_CALL, ghidra::Funcdata::findPrimaryBranch(), ghidra::PcodeOp::isDead(), ghidra::Funcdata::newCodeRef(), ghidra::Funcdata::opSetInput(), and ghidra::Funcdata::opSetOpcode().

◆ printRaw()

void ghidra::Override::CallCall::printRaw ( ostream &  s,
const Address &  addr 
) const
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

Implements ghidra::Override::Record.


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