use of com.google.security.zynamics.binnavi.API.debug.BreakpointManager in project binnavi by google.
the class CallResolver method removeBreakpoint.
/**
* Removes a breakpoint from an indirect call.
*
* @param indirectCall The indirect call from which the breakpoint is removed.
*/
private void removeBreakpoint(final IndirectCall indirectCall) {
final Module module = indirectCall.getModule();
final Address address = indirectCall.getAddress();
final BreakpointManager breakpointManager = debugger.getBreakpointManager();
if (breakpointManager.hasBreakpoint(module, address)) {
debugger.getBreakpointManager().removeBreakpoint(indirectCall.getModule(), indirectCall.getAddress());
}
}
use of com.google.security.zynamics.binnavi.API.debug.BreakpointManager in project binnavi by google.
the class VisualCoverage method updatePreviousNode.
/**
* Updates the color of the previously hit node depending on its hit count.
*/
private void updatePreviousNode() {
if ((previousNodeAddress == null) || !myBreakpoints.contains(previousNodeAddress)) {
return;
}
final ViewNode node = nodeMap.get(previousNodeAddress);
final int count = breakpointCounter.get(previousNodeAddress);
if (count < 5) {
node.setColor(COLOR_FEW_HITS);
} else if (count < 10) {
node.setColor(COLOR_SEVERAL_HITS);
} else {
node.setColor(COLOR_MANY_HITS);
// After a breakpoint was hit 10 times we remove it so we do not
// hit it again.
final BreakpointManager breakpointManager = debugger.getBreakpointManager();
if (breakpointManager.hasBreakpoint(null, previousNodeAddress)) {
breakpointManager.removeBreakpoint(null, previousNodeAddress);
myBreakpoints.remove(previousNodeAddress);
}
}
try {
java.lang.Thread.sleep(100);
} catch (final InterruptedException e) {
// restore the interrupted status of the thread.
// http://www.ibm.com/developerworks/java/library/j-jtp05236/index.html
java.lang.Thread.currentThread().interrupt();
}
}
Aggregations