Class BreakCallBack

java.lang.Object
ghidra.pcode.emulate.BreakCallBack

public class BreakCallBack extends Object
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

  • pcodeCallback()
  • addressCallback()
depending on whether the breakpoint is tailored for a particular pcode op or for a machine address.
  • Field Details

    • emulate

      protected Emulate emulate
  • Constructor Details

    • BreakCallBack

      public BreakCallBack()
  • Method Details

    • pcodeCallback

      public boolean pcodeCallback(PcodeOpRaw op)
      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 \b true if these actions are intended to replace the action of the pcode op itself. Or it returns \b false if the pcode op should still have its normal effect on the emulator context.
      Parameters:
      op - is the particular pcode operation where the break occurs.
      Returns:
      \b true if the normal pcode op action should not occur
    • addressCallback

      public boolean addressCallback(Address addr)
      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:
      addr - is the address where the break has occurred
      Returns:
      true if the machine instruction should not be executed
    • setEmulate

      public void setEmulate(Emulate emu)