use of com.google.security.zynamics.binnavi.debug.models.breakpoints.BreakpointAddress in project binnavi by google.
the class CBreakpointFunctionsTest method test2DeleteBreakpoints.
@Test
public void test2DeleteBreakpoints() {
final INaviModule mockModule = new MockModule();
final DebugTargetSettings target = new ModuleTargetSettings(mockModule);
final DebuggerProvider debuggerProvider = new DebuggerProvider(target);
final MockDebugger debugger = new MockDebugger(new ModuleTargetSettings(mockModule));
debugger.getBreakpointManager().addBreakpoints(BreakpointType.REGULAR, Sets.newHashSet(new BreakpointAddress(mockModule, new UnrelocatedAddress(new CAddress(0)))));
final Breakpoint breakPoint = debugger.getBreakpointManager().getBreakpoint(BreakpointType.REGULAR, new BreakpointAddress(mockModule, new UnrelocatedAddress(new CAddress(0))));
@SuppressWarnings("unused") final CAddress address = new CAddress(0);
final BaseNode root = new BaseNode();
final BreakpointCondition bpCondition = new BreakpointCondition("foo", root);
breakPoint.setCondition(bpCondition);
breakPoint.setDescription("purzel");
debuggerProvider.addDebugger(debugger);
final CBreakpointTableModel tableModel = new CBreakpointTableModel(debuggerProvider);
final int[] rows = { 0 };
assertEquals(1, tableModel.getRowCount());
CBreakpointRemoveFunctions.deleteBreakpoints(debuggerProvider, rows);
assertEquals(0, tableModel.getRowCount());
}
use of com.google.security.zynamics.binnavi.debug.models.breakpoints.BreakpointAddress in project binnavi by google.
the class MockDebugger method setBreakPoints.
@Override
public void setBreakPoints(final Set<BreakpointAddress> breakpoints, final BreakpointType type) throws DebugExceptionWrapper {
requests += "SET_BREAKPOINTS/";
for (final BreakpointAddress breakpointAddress : breakpoints) {
requests += breakpointAddress.getAddress().getAddress().toHexString();
requests += "/";
requests += type;
}
requests += ";";
processCounter();
}
Aggregations