Ejemplo n.º 1
0
    @Override
    public void regenerated(final IZyNodeRealizer realizer) {
      // When the realizer of a node was regenerated, all the information
      // from the debugger disappeared from the node. That means we have
      // to re-add them at this point.

      final IDebugger activeDebugger = m_debugPerspective.getCurrentSelectedDebugger();
      final TargetProcessThread currentThread =
          activeDebugger == null ? null : activeDebugger.getProcessManager().getActiveThread();

      if (currentThread != null) {
        final UnrelocatedAddress fileAddress =
            m_debugPerspective
                .getCurrentSelectedDebugger()
                .memoryToFile(currentThread.getCurrentAddress());

        CDebuggerPainter.updateSingleNodeDebuggerHighlighting(
            m_graph, fileAddress, (NaviNode) realizer.getUserData().getNode());
      }

      final INaviViewNode rawNode = (INaviViewNode) realizer.getUserData().getNode().getRawNode();

      if (rawNode instanceof INaviCodeNode) {
        CBreakpointPainter.paintBreakpoints(
            m_manager, (NaviNode) realizer.getUserData().getNode(), (INaviCodeNode) rawNode);
      } else if (rawNode instanceof INaviFunctionNode) {
        CBreakpointPainter.paintBreakpoints(
            m_manager, (NaviNode) realizer.getUserData().getNode(), (INaviFunctionNode) rawNode);
      }
    }
Ejemplo n.º 2
0
  @Override
  public String getAddress(
      final INaviModule module, final UnrelocatedAddress address, final boolean pad) {
    final IDebugger debugger = m_provider.getDebugger(module);

    if ((debugger != null) && m_settings.getDisplaySettings().getShowMemoryAddresses(debugger)) {
      return pad
          ? debugger.fileToMemory(module, address).getAddress().toHexString()
          : debugger
              .fileToMemory(module, address)
              .getAddress()
              .toBigInteger()
              .toString(16)
              .toUpperCase();
    } else {
      return pad
          ? address.getAddress().toHexString()
          : address.getAddress().toBigInteger().toString(16).toUpperCase();
    }
  }