Search in sources :

Example 26 with BreakpointManager

use of com.google.security.zynamics.binnavi.debug.models.breakpoints.BreakpointManager in project binnavi by google.

the class CBreakpointTableModel method getRelocatedBreakpointAddress.

/**
 * Determines the relocated address of the breakpoint.
 *
 * @param row The row where the relocated breakpoint is shown.
 *
 * @return the relocated address of the breakpoint
 */
private IAddress getRelocatedBreakpointAddress(final int row) {
    final Pair<IDebugger, Integer> breakpoint = CBreakpointTableHelpers.findBreakpoint(m_debuggerProvider, row);
    final BreakpointManager manager = breakpoint.first().getBreakpointManager();
    final int breakpointIndex = breakpoint.second();
    return breakpoint.first().fileToMemory((manager.getBreakpoint(BreakpointType.REGULAR, breakpointIndex).getAddress()).getModule(), manager.getBreakpoint(BreakpointType.REGULAR, breakpointIndex).getAddress().getAddress()).getAddress();
}
Also used : BreakpointManager(com.google.security.zynamics.binnavi.debug.models.breakpoints.BreakpointManager) IDebugger(com.google.security.zynamics.binnavi.debug.debugger.interfaces.IDebugger)

Example 27 with BreakpointManager

use of com.google.security.zynamics.binnavi.debug.models.breakpoints.BreakpointManager in project binnavi by google.

the class CBreakpointTableModel method setValueAt.

@Override
public void setValueAt(final Object value, final int row, final int col) {
    final Pair<IDebugger, Integer> breakpoint = CBreakpointTableHelpers.findBreakpoint(m_debuggerProvider, row);
    final BreakpointManager manager = breakpoint.first().getBreakpointManager();
    final int breakpointIndex = breakpoint.second();
    switch(col) {
        case COLUMN_CONDITION:
            updateCondition(manager, breakpointIndex, value.toString());
            break;
        case COLUMN_DESCRIPTION:
            manager.getBreakpoint(BreakpointType.REGULAR, breakpointIndex).setDescription(value.toString());
            break;
    }
    fireTableCellUpdated(row, col);
}
Also used : BreakpointManager(com.google.security.zynamics.binnavi.debug.models.breakpoints.BreakpointManager) IDebugger(com.google.security.zynamics.binnavi.debug.debugger.interfaces.IDebugger)

Example 28 with BreakpointManager

use of com.google.security.zynamics.binnavi.debug.models.breakpoints.BreakpointManager in project binnavi by google.

the class CBreakpointTable method removeDebuggerListeners.

/**
 * Removes all listeners from a debugger.
 *
 * @param debugger The debugger.
 */
private void removeDebuggerListeners(final IDebugger debugger) {
    final BreakpointManager manager = debugger.getBreakpointManager();
    manager.removeListener(m_breakpointManagerListener);
}
Also used : BreakpointManager(com.google.security.zynamics.binnavi.debug.models.breakpoints.BreakpointManager)

Example 29 with BreakpointManager

use of com.google.security.zynamics.binnavi.debug.models.breakpoints.BreakpointManager in project binnavi by google.

the class CBreakpointTable method addDebuggerListeners.

/**
 * Initializes all listeners for a debugger.
 *
 * @param debugger The new debugger.
 */
private void addDebuggerListeners(final IDebugger debugger) {
    final BreakpointManager manager = debugger.getBreakpointManager();
    manager.addListener(m_breakpointManagerListener);
}
Also used : BreakpointManager(com.google.security.zynamics.binnavi.debug.models.breakpoints.BreakpointManager)

Example 30 with BreakpointManager

use of com.google.security.zynamics.binnavi.debug.models.breakpoints.BreakpointManager in project binnavi by google.

the class CBreakpointTableModel method getBreakpointModuleName.

/**
 * Determines the name of the module where the breakpoint resides.
 *
 * @param row The row where the breakpoint is shown.
 *
 * @return The name of the module where the breakpoint resides.
 */
private String getBreakpointModuleName(final int row) {
    final Pair<IDebugger, Integer> breakpoint = CBreakpointTableHelpers.findBreakpoint(m_debuggerProvider, row);
    final BreakpointManager manager = breakpoint.first().getBreakpointManager();
    final int breakpointIndex = breakpoint.second();
    return (manager.getBreakpoint(BreakpointType.REGULAR, breakpointIndex).getAddress()).getModule().getConfiguration().getName();
}
Also used : BreakpointManager(com.google.security.zynamics.binnavi.debug.models.breakpoints.BreakpointManager) IDebugger(com.google.security.zynamics.binnavi.debug.debugger.interfaces.IDebugger)

Aggregations

BreakpointManager (com.google.security.zynamics.binnavi.debug.models.breakpoints.BreakpointManager)32 IDebugger (com.google.security.zynamics.binnavi.debug.debugger.interfaces.IDebugger)16 BreakpointAddress (com.google.security.zynamics.binnavi.debug.models.breakpoints.BreakpointAddress)11 Breakpoint (com.google.security.zynamics.binnavi.debug.models.breakpoints.Breakpoint)9 RelocatedAddress (com.google.security.zynamics.binnavi.disassembly.RelocatedAddress)7 HashSet (java.util.HashSet)7 CAddress (com.google.security.zynamics.zylib.disassembly.CAddress)4 ProcessManager (com.google.security.zynamics.binnavi.debug.models.processmanager.ProcessManager)3 UnrelocatedAddress (com.google.security.zynamics.binnavi.disassembly.UnrelocatedAddress)3 MemoryModule (com.google.security.zynamics.binnavi.debug.models.processmanager.MemoryModule)2 TargetProcessThread (com.google.security.zynamics.binnavi.debug.models.processmanager.TargetProcessThread)2 RegisterValue (com.google.security.zynamics.binnavi.debug.models.targetinformation.RegisterValue)2 ThreadRegisters (com.google.security.zynamics.binnavi.debug.models.targetinformation.ThreadRegisters)2 INaviFunction (com.google.security.zynamics.binnavi.disassembly.INaviFunction)2 INaviModule (com.google.security.zynamics.binnavi.disassembly.INaviModule)2 Pair (com.google.security.zynamics.zylib.general.Pair)2 ArrayList (java.util.ArrayList)2 Test (org.junit.Test)2 MockDebugger (com.google.security.zynamics.binnavi.Debug.Debugger.MockDebugger)1 MaybeNullException (com.google.security.zynamics.binnavi.Exceptions.MaybeNullException)1