decompiler
1.0.0
|
A basic instantiation of a breakpoint table. More...
#include <emulate.hh>
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... | |
Private Attributes | |
Emulate * | emulate |
The emulator associated with this table. | |
Translate * | trans |
The translator. | |
map< Address, BreakCallBack * > | addresscallback |
a container of pcode based breakpoints | |
map< uintb, BreakCallBack * > | pcodecallback |
a container of addressed based breakpoints | |
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
|
inline |
Basic breaktable constructor.
The break table needs a translator object so user-defined pcode ops can be registered against by name.
t | is the translator object |
|
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.
addr | is the address being checked for breakpoints |
Implements BreakTable.
References addresscallback.
|
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.
curop | is pcode op being checked for breakpoints |
Implements BreakTable.
References PcodeOpRaw::getInput(), VarnodeData::offset, and pcodecallback.
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.
addr | is the address associated with the breakpoint |
func | is the breakpoint being registered |
References addresscallback, emulate, and BreakCallBack::setEmulate().
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.
name | is the name of the user-defined pcode op |
func | is the breakpoint object to associate with the pcode op |
References emulate, Translate::getUserOpNames(), pcodecallback, BreakCallBack::setEmulate(), and trans.
|
virtual |
Associate an emulator with all breakpoints in the table.
This routine invokes the setEmulate method on each breakpoint currently in the table
emu | is the emulator to be associated with the breakpoints |
Implements BreakTable.
References addresscallback, emulate, and pcodecallback.