public class

DebuggerUtil

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

Class Overview

Utility methods for IDebuggerUnit.

Summary

Public Constructors
DebuggerUtil()
Public Methods
static ICodeUnit getPotentialDebuggee(IDebuggerUnit manager, long memoryAddress)
Retrieve the ICodeUnit that may contains the long memory Address.
static boolean isNativeCodeDebugger(IDebuggerUnit unit)
static byte[] readMemorySafe(IDebuggerUnit unit, long address, int maxlength)
Read exact memory data at specified address.
static byte[] readMemoryStringSafe(IDebuggerUnit unit, long address, int length)
Temporarily disabled.
static boolean valueEquals(IDebuggerVariable va, IDebuggerVariable vb)
Fast test equality between two variable values.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public DebuggerUtil ()

Public Methods

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).

public static boolean isNativeCodeDebugger (IDebuggerUnit unit)

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]

public static byte[] readMemoryStringSafe (IDebuggerUnit unit, long address, int length)

Temporarily disabled. Same as readMemorySafe(IDebuggerUnit, long, int).

public static boolean valueEquals (IDebuggerVariable va, IDebuggerVariable vb)

Fast test equality between two variable values. Faster than using getTypedValue() because it can bypass some data retrieval.

Parameters
va first variable
vb second variable
Returns
  • true when variable share the same value