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

Override a CALL, CALLIND, or RETURN to become a BRANCH or BRANCHIND. More...

#include <override.hh>

Inheritance diagram for ghidra::Override::Branch:
ghidra::Override::Record

Public Member Functions

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 = "branch"
 Name of the branch override record.
 

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

Override a CALL, CALLIND, or RETURN to become a BRANCH or BRANCHIND.

Member Function Documentation

◆ encode()

void ghidra::Override::Branch::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::Branch::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::PcodeOp::code(), ghidra::CPUI_BRANCH, ghidra::CPUI_BRANCHIND, ghidra::CPUI_CALL, ghidra::CPUI_CALLIND, ghidra::CPUI_RETURN, ghidra::Funcdata::findPrimaryBranch(), ghidra::PcodeOp::isDead(), and ghidra::Funcdata::opSetOpcode().

◆ printRaw()

void ghidra::Override::Branch::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: