Search in sources :

Example 81 with UnrelocatedAddress

use of com.google.security.zynamics.binnavi.disassembly.UnrelocatedAddress in project binnavi by google.

the class CAddressLabel method paint.

@Override
public void paint(final Graphics graphics) {
    CLoadProgressPainter.paint(view, graphics, getWidth(), getHeight(), getBackground());
    if (view.isStared()) {
        graphics.drawImage(starImage, 0, 0, getHeight() - 2, getHeight() - 2, table);
    }
    final UnrelocatedAddress fileAddress = new UnrelocatedAddress(function.getAddress());
    if (CGraphDebugger.hasBreakpoint(debugger.getBreakpointManager(), function.getModule(), fileAddress)) {
        final BreakpointStatus breakpointStatus = CGraphDebugger.getBreakpointStatus(debugger.getBreakpointManager(), function.getModule(), fileAddress);
        final CBreakpointImage img = new CBreakpointImage(getBackground(), BreakpointManager.getBreakpointColor(breakpointStatus));
        final int x = getWidth() - img.getWidth() - 2;
        final int y = (getHeight() / 2) - (img.getHeight() / 2);
        ((Graphics2D) graphics).drawImage(img, null, x, y);
    }
    final boolean isOpen = CWindowManager.instance().isOpen(view);
    graphics.setColor(Color.BLACK);
    graphics.setFont(isOpen ? normalBoldFont : normalFont);
    graphics.drawString(function.getAddress().toHexString(), view.isStared() ? getHeight() : 0, 12);
}
Also used : UnrelocatedAddress(com.google.security.zynamics.binnavi.disassembly.UnrelocatedAddress) BreakpointStatus(com.google.security.zynamics.binnavi.debug.models.breakpoints.enums.BreakpointStatus) Graphics2D(java.awt.Graphics2D)

Aggregations

UnrelocatedAddress (com.google.security.zynamics.binnavi.disassembly.UnrelocatedAddress)81 BreakpointAddress (com.google.security.zynamics.binnavi.debug.models.breakpoints.BreakpointAddress)60 CAddress (com.google.security.zynamics.zylib.disassembly.CAddress)60 Test (org.junit.Test)49 INaviModule (com.google.security.zynamics.binnavi.disassembly.INaviModule)28 MockDebugger (com.google.security.zynamics.binnavi.Debug.Debugger.MockDebugger)15 ModuleTargetSettings (com.google.security.zynamics.binnavi.debug.debugger.ModuleTargetSettings)15 MockModule (com.google.security.zynamics.binnavi.disassembly.Modules.MockModule)13 Address (com.google.security.zynamics.binnavi.API.disassembly.Address)12 ArrayList (java.util.ArrayList)11 TraceList (com.google.security.zynamics.binnavi.debug.models.trace.TraceList)10 INaviInstruction (com.google.security.zynamics.binnavi.disassembly.INaviInstruction)9 HashSet (java.util.HashSet)9 MockSqlProvider (com.google.security.zynamics.binnavi.Database.MockClasses.MockSqlProvider)8 DebugTargetSettings (com.google.security.zynamics.binnavi.debug.debugger.DebugTargetSettings)8 DebuggerProvider (com.google.security.zynamics.binnavi.debug.debugger.DebuggerProvider)8 Breakpoint (com.google.security.zynamics.binnavi.debug.models.breakpoints.Breakpoint)8 FilledList (com.google.security.zynamics.zylib.types.lists.FilledList)8 CBreakpointTableModel (com.google.security.zynamics.binnavi.Gui.Debug.BreakpointTable.CBreakpointTableModel)7 TraceLogger (com.google.security.zynamics.binnavi.debug.models.trace.TraceLogger)7