java.lang.Object
com.pnfsoftware.jeb.core.units.code.debug.impl.DebuggerUtil

public class DebuggerUtil extends Object
Utility methods for IDebuggerUnit.
  • Constructor Details

    • DebuggerUtil

      public DebuggerUtil()
  • Method Details

    • readMemoryStringSafe

      public static byte[] readMemoryStringSafe(IDebuggerUnit unit, long address, int length)
      Temporarily disabled. Same as readMemorySafe(IDebuggerUnit, long, int).
    • readMemorySafe

      public static byte[] readMemorySafe(IDebuggerUnit unit, long address, int maxlength)
      Read exact memory data at specified address. The result length can be different from length if some data is not accessible or does not exist.
      Parameters:
      unit - debugger
      address - base address
      maxlength - wanted length (max)
      Returns:
      null on error, else the memory data buffer, whose size will be in [0, length]
    • getPotentialDebuggee

      public static ICodeUnit getPotentialDebuggee(IDebuggerUnit manager, long memoryAddress)
      Retrieve the ICodeUnit that may contains the long memory Address.
      If there is only one potential debuggee, it is returned. Otherwise, it searches for a potential debuggee which manages long memory address (for example INativeCodeUnit).
    • isNativeCodeDebugger

      public static boolean isNativeCodeDebugger(IDebuggerUnit unit)
      Parameters:
      unit -
      Returns:
    • valueEquals

      public static boolean valueEquals(IDebuggerVariable va, IDebuggerVariable vb)
      Fast test equality between two variable values. Faster than using IDebuggerVariable.getTypedValue() because it can bypass some data retrieval.
      Parameters:
      va - first variable
      vb - second variable
      Returns:
      true when variable share the same value