Ghidra Decompiler Analysis Engine
Public Member Functions | List of all members
BreakTableCallBack Class Reference

A basic instantiation of a breakpoint table. More...

#include <emulate.hh>

Inheritance diagram for BreakTableCallBack:
Inheritance graph
[legend]
Collaboration diagram for BreakTableCallBack:
Collaboration graph
[legend]

Public Member Functions

 BreakTableCallBack (Translate *t)
 Basic breaktable constructor. More...
 
void registerPcodeCallback (const string &nm, BreakCallBack *func)
 Register a pcode based breakpoint. More...
 
void registerAddressCallback (const Address &addr, BreakCallBack *func)
 Register an address based breakpoint. More...
 
virtual void setEmulate (Emulate *emu)
 Associate an emulator with all breakpoints in the table. More...
 
virtual bool doPcodeOpBreak (PcodeOpRaw *curop)
 Invoke any breakpoints for the given pcode op. More...
 
virtual bool doAddressBreak (const Address &addr)
 Invoke any breakpoints for the given address. More...
 

Detailed Description

A basic instantiation of a breakpoint table.

This object allows breakpoints to registered in the table via either

Breakpoints are stored in map containers, and the core BreakTable methods are implemented to search in these containers

Constructor & Destructor Documentation

◆ BreakTableCallBack()

BreakTableCallBack::BreakTableCallBack ( Translate t)
inline

Basic breaktable constructor.

The break table needs a translator object so user-defined pcode ops can be registered against by name.

Parameters
tis the translator object

Member Function Documentation

◆ doAddressBreak()

bool BreakTableCallBack::doAddressBreak ( const Address addr)
virtual

Invoke any breakpoints for the given address.

This routine examines the address based container for any breakpoints associated with the given address. If one is found, its addressCallback method is invoked.

Parameters
addris the address being checked for breakpoints
Returns
true if the breakpoint exists and returns true, otherwise return false

Implements BreakTable.

◆ doPcodeOpBreak()

bool BreakTableCallBack::doPcodeOpBreak ( PcodeOpRaw curop)
virtual

Invoke any breakpoints for the given pcode op.

This routine examines the pcode-op based container for any breakpoints associated with the given op. If one is found, its pcodeCallback method is invoked.

Parameters
curopis pcode op being checked for breakpoints
Returns
true if the breakpoint exists and returns true, otherwise return false

Implements BreakTable.

◆ registerAddressCallback()

void BreakTableCallBack::registerAddressCallback ( const Address addr,
BreakCallBack func 
)

Register an address based breakpoint.

Any time the emulator is about to execute (the pcode translation of) a particular machine instruction at this address, the indicated breakpoint is invoked first. The break table does not assume responsibility for freeing the breakpoint object.

Parameters
addris the address associated with the breakpoint
funcis the breakpoint being registered

◆ registerPcodeCallback()

void BreakTableCallBack::registerPcodeCallback ( const string &  name,
BreakCallBack func 
)

Register a pcode based breakpoint.

Any time the emulator is about to execute a user-defined pcode op with the given name, the indicated breakpoint is invoked first. The break table does not assume responsibility for freeing the breakpoint object.

Parameters
nameis the name of the user-defined pcode op
funcis the breakpoint object to associate with the pcode op

◆ setEmulate()

void BreakTableCallBack::setEmulate ( Emulate emu)
virtual

Associate an emulator with all breakpoints in the table.

This routine invokes the setEmulate method on each breakpoint currently in the table

Parameters
emuis the emulator to be associated with the breakpoints

Implements BreakTable.


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