use of com.google.security.zynamics.binnavi.debug.models.breakpoints.BreakpointManager in project binnavi by google.
the class CFunctionViewsModel method delete.
@Override
public void delete() {
m_module.removeListener(m_moduleListener);
if (m_activeDebugger != null) {
final BreakpointManager manager = m_activeDebugger.getBreakpointManager();
manager.removeListener(m_breakpointManagerListener);
}
if (m_module.isLoaded()) {
for (final IFlowgraphView view : m_module.getContent().getViewContainer().getNativeFlowgraphViews()) {
view.removeListener(m_viewListener);
}
for (final INaviFunction function : m_module.getContent().getFunctionContainer().getFunctions()) {
function.removeListener(m_viewListener);
}
}
}
use of com.google.security.zynamics.binnavi.debug.models.breakpoints.BreakpointManager in project binnavi by google.
the class CCodeNodeUpdater method generateContent.
@Override
public void generateContent(final IZyNodeRealizer realizer, final ZyLabelContent content) {
ZyCodeNodeBuilder.buildContent(content, codeNode, graph.getSettings(), nodeModifier);
for (final INaviInstruction instruction : codeNode.getInstructions()) {
final INaviModule module = instruction.getModule();
if ((provider != null) && (provider.getDebugger(module) != null) && graph.getSettings().getDisplaySettings().getShowMemoryAddresses(provider.getDebugger(module))) {
final int line = CCodeNodeHelpers.instructionToLine(codeNode, instruction);
if (line != -1) {
final ZyLineContent lineContent = this.realizer.getNodeContent().getLineContent(line);
// TODO(timkornau) x64
lineContent.setTextColor(0, 8, Color.RED);
}
}
}
// Set highlighting for breakpoints and the instruction pointer.
final INaviInstruction instruction = codeNode.getInstructions().iterator().next();
if (instruction != null) {
final INaviModule module = instruction.getModule();
final IDebugger debugger = provider.getDebugger(module);
if (debugger == null) {
return;
}
final BreakpointManager manager = debugger.getBreakpointManager();
CBreakpointPainter.paintBreakpoints(manager, node, codeNode);
if (debugger.getProcessManager().getActiveThread() != null) {
final RelocatedAddress instructionPointer = debugger.getProcessManager().getActiveThread().getCurrentAddress();
final MemoryModule memoryModule = debugger.getProcessManager().getModule(instructionPointer);
final UnrelocatedAddress unrelocatedIP = new DefaultAddressConverter(memoryModule.getBaseAddress().getAddress(), module.getConfiguration().getFileBase()).memoryToFile(instructionPointer);
CDebuggerPainter.updateSingleNodeDebuggerHighlighting(graph, unrelocatedIP, node);
}
}
}
Aggregations