Ghidra Decompiler Analysis Engine
Public Member Functions | Protected Attributes | List of all members
BreakCallBack Class Reference

A breakpoint object. More...

#include <emulate.hh>

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

Public Member Functions

 BreakCallBack (void)
 Generic breakpoint constructor. More...
 
virtual bool pcodeCallback (PcodeOpRaw *op)
 Call back method for pcode based breakpoints. More...
 
virtual bool addressCallback (const Address &addr)
 Call back method for address based breakpoints. More...
 
void setEmulate (Emulate *emu)
 Associate a particular emulator with this breakpoint. More...
 

Protected Attributes

Emulateemulate
 The emulator currently associated with this breakpoint.
 

Detailed Description

A breakpoint object.

This is a base class for breakpoint objects in an emulator. The breakpoints are implemented as callback method, which is overridden for the particular behavior needed by the emulator. Each derived class must override either

depending on whether the breakpoint is tailored for a particular pcode op or for a machine address.

Constructor & Destructor Documentation

◆ BreakCallBack()

BreakCallBack::BreakCallBack ( void  )
inline

Generic breakpoint constructor.

The base breakpoint needs no initialization parameters, the setEmulate() method must be called before the breakpoint can be invoked

Member Function Documentation

◆ addressCallback()

bool BreakCallBack::addressCallback ( const Address addr)
inlinevirtual

Call back method for address based breakpoints.

This routine is invoked during emulation, if this breakpoint has somehow been associated with this address. The callback can perform any operation on the emulator context it wants. It then returns true if these actions are intended to replace the action of the entire machine instruction at this address. Or it returns false if the machine instruction should still be executed normally.

Parameters
addris the address where the break has occurred
Returns
true if the machine instruction should not be executed

Reimplemented in TerminateCallBack, PrintfCallBack, and PutsCallBack.

◆ pcodeCallback()

bool BreakCallBack::pcodeCallback ( PcodeOpRaw op)
inlinevirtual

Call back method for pcode based breakpoints.

This routine is invoked during emulation, if this breakpoint has somehow been associated with this kind of pcode op. The callback can perform any operation on the emulator context it wants. It then returns true if these actions are intended to replace the action of the pcode op itself. Or it returns false if the pcode op should still have its normal effect on the emulator context.

Parameters
opis the particular pcode operation where the break occurs.
Returns
true if the normal pcode op action should not occur

◆ setEmulate()

void BreakCallBack::setEmulate ( Emulate emu)
inline

Associate a particular emulator with this breakpoint.

Breakpoints can be associated with one emulator at a time.

Parameters
emuis the emulator to associate this breakpoint with

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