Search in sources :

Example 21 with Breakpoint

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

the class CBreakpointRemoveFunctions method removeAllView.

/**
   * Removes all breakpoints of a given breakpoint manager that belong to a given view.
   * 
   * @param manager The breakpoints manager whose breakpoints are removed.
   * @param view The view that decides what breakpoints are removed.
   */
private static void removeAllView(final BreakpointManager manager, final INaviView view) {
    final Set<BreakpointAddress> addresses = new HashSet<BreakpointAddress>();
    for (int i = 0; i < manager.getNumberOfBreakpoints(BreakpointType.REGULAR); i++) {
        final BreakpointAddress address = manager.getBreakpoint(BreakpointType.REGULAR, i).getAddress();
        if (CViewHelpers.containsAddress(view, address.getAddress())) {
            addresses.add(address);
        }
    }
    CGraphDebugger.removeBreakpoints(addresses, manager);
}
Also used : BreakpointAddress(com.google.security.zynamics.binnavi.debug.models.breakpoints.BreakpointAddress) Breakpoint(com.google.security.zynamics.binnavi.debug.models.breakpoints.Breakpoint) HashSet(java.util.HashSet)

Aggregations

Breakpoint (com.google.security.zynamics.binnavi.debug.models.breakpoints.Breakpoint)21 BreakpointAddress (com.google.security.zynamics.binnavi.debug.models.breakpoints.BreakpointAddress)14 Test (org.junit.Test)12 MockDebugger (com.google.security.zynamics.binnavi.Debug.Debugger.MockDebugger)11 ModuleTargetSettings (com.google.security.zynamics.binnavi.debug.debugger.ModuleTargetSettings)11 DebugTargetSettings (com.google.security.zynamics.binnavi.debug.debugger.DebugTargetSettings)10 DebuggerProvider (com.google.security.zynamics.binnavi.debug.debugger.DebuggerProvider)10 CAddress (com.google.security.zynamics.zylib.disassembly.CAddress)10 BreakpointCondition (com.google.security.zynamics.binnavi.debug.models.breakpoints.BreakpointCondition)8 BreakpointManager (com.google.security.zynamics.binnavi.debug.models.breakpoints.BreakpointManager)8 BaseNode (com.google.security.zynamics.binnavi.debug.models.breakpoints.conditions.BaseNode)8 UnrelocatedAddress (com.google.security.zynamics.binnavi.disassembly.UnrelocatedAddress)8 CBreakpointTableModel (com.google.security.zynamics.binnavi.Gui.Debug.BreakpointTable.CBreakpointTableModel)7 INaviModule (com.google.security.zynamics.binnavi.disassembly.INaviModule)7 MockModule (com.google.security.zynamics.binnavi.disassembly.Modules.MockModule)6 IDebugger (com.google.security.zynamics.binnavi.debug.debugger.interfaces.IDebugger)5 HashSet (java.util.HashSet)5 Pair (com.google.security.zynamics.zylib.general.Pair)3 INaviFunction (com.google.security.zynamics.binnavi.disassembly.INaviFunction)2 MockFunction (com.google.security.zynamics.binnavi.disassembly.MockFunction)2