Package ghidra.pcode.emulate
Class BreakTableCallBack
java.lang.Object
ghidra.pcode.emulate.BreakTableCallBack
- All Implemented Interfaces:
BreakTable
A basic instantiation of a breakpoint table
This object allows breakpoints to registered in the table via either
- registerPcodeCallback()
- registerAddressCallback()
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionBreakTableCallBack
(SleighLanguage language) The break table needs a translator object so user-defined pcode ops can be registered against by name. -
Method Summary
Modifier and TypeMethodDescriptionboolean
doAddressBreak
(Address addr) This routine examines the address based container for any breakpoints associated with the given address.boolean
doPcodeOpBreak
(PcodeOpRaw curop) This routine examines the pcode-op based container for any breakpoints associated with the given op.void
registerAddressCallback
(Address addr, BreakCallBack func) 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.void
registerPcodeCallback
(String name, BreakCallBack func) Any time the emulator is about to execute a user-defined pcode op with the given name, the indicated breakpoint is invoked first.void
setEmulate
(Emulate emu) This routine invokes the setEmulate method on each breakpoint currently in the tablevoid
void
Unregister the currently registered PcodeCallback handler for the specified name
-
Field Details
-
DEFAULT_NAME
- See Also:
-
-
Constructor Details
-
BreakTableCallBack
The break table needs a translator object so user-defined pcode ops can be registered against by name.- Parameters:
language
- the language
-
-
Method Details
-
registerPcodeCallback
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:
name
- is the name of the user-defined pcode opfunc
- is the breakpoint object to associate with the pcode op
-
unregisterPcodeCallback
Unregister the currently registered PcodeCallback handler for the specified name- Parameters:
name
- is the name of the user-defined pcode op
-
registerAddressCallback
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:
addr
- is the address associated with the breakpointfunc
- is the breakpoint being registered
-
unregisterAddressCallback
-
setEmulate
This routine invokes the setEmulate method on each breakpoint currently in the table- Specified by:
setEmulate
in interfaceBreakTable
- Parameters:
emu
- is the emulator to be associated with the breakpoints
-
doPcodeOpBreak
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.- Specified by:
doPcodeOpBreak
in interfaceBreakTable
- Parameters:
curop
- is pcode op being checked for breakpoints- Returns:
- true if the breakpoint exists and returns true, otherwise return false
-
doAddressBreak
This routine examines the address based container for any breakpoints associated with the given address. If one is found, its addressCallback method is invoked.- Specified by:
doAddressBreak
in interfaceBreakTable
- Parameters:
addr
- is the address being checked for breakpoints- Returns:
- true if the breakpoint exists and returns true, otherwise return false
-