public interface

ICallGraphManager

com.pnfsoftware.jeb.core.units.code.asm.analyzer.ICallGraphManager

Class Overview

Interface for the native call graph manager. The graph's edges are between a 'caller' instruction, represented by its address, and a 'callee' location, represented by a CallGraphTarget. Such relationships are defined by IInstruction#getRoutineCall(long) and IInstruction#getIndirectRoutineCall(long).

Summary

Public Methods
abstract Set<INativeMethodItem> getCalleeRoutines(long caller)
Get the routines called by an internal address.
abstract Set<CallGraphTarget> getCallees(long callerInternalAddress)
Get the targets called from a given instruction.
abstract List<CallGraphTarget> getCallees(INativeMethodItem rtn)
Convenience method to get all the targets called by an internal routine.
abstract Set<INativeMethodItem> getCallerRoutines(EntryPointDescription callee)
Get the routines calling an internal address.
abstract Set<Long> getCallers(INativeMethodItem rtn)
Convenience method to get all the addresses calling a routine.
abstract Set<Long> getCallers(CallGraphTarget callee)
Get the addresses calling a given target.
abstract void recordExternalCall(long callerInternalAddress, INativeMethodItem calleeExternalRtn)
Records a call between an internal address and an external routine.
abstract void recordInternalCall(long callerInternalAddress, EntryPointDescription calleeInternalAddress)
Records a call between two internal addresses.
abstract void recordUnresolvedCall(long callerInternalAddress, long calleeDereferencedAddress)
Records an unresolved call, i.e.
abstract void removeCallRelationship(long address)
Remove all registered call relationships (from and to) a given internal address.

Public Methods

public abstract Set<INativeMethodItem> getCalleeRoutines (long caller)

Get the routines called by an internal address.

Returns
  • routines called by the instruction at the given address

public abstract Set<CallGraphTarget> getCallees (long callerInternalAddress)

Get the targets called from a given instruction.

Returns
  • set of called targets, null if none

public abstract List<CallGraphTarget> getCallees (INativeMethodItem rtn)

Convenience method to get all the targets called by an internal routine. A target may appear several times in the result, once for each call from the routine.

Returns
  • the list of targets called by the given routine
Throws
IllegalArgumentException on external routines

public abstract Set<INativeMethodItem> getCallerRoutines (EntryPointDescription callee)

Get the routines calling an internal address.

public abstract Set<Long> getCallers (INativeMethodItem rtn)

Convenience method to get all the addresses calling a routine.

Returns
  • the set of addresses calling the given routine

public abstract Set<Long> getCallers (CallGraphTarget callee)

Get the addresses calling a given target.

Returns
  • set of callers addresses, null if none

public abstract void recordExternalCall (long callerInternalAddress, INativeMethodItem calleeExternalRtn)

Records a call between an internal address and an external routine.

public abstract void recordInternalCall (long callerInternalAddress, EntryPointDescription calleeInternalAddress)

Records a call between two internal addresses.

public abstract void recordUnresolvedCall (long callerInternalAddress, long calleeDereferencedAddress)

Records an unresolved call, i.e. a call for which the final target is unknown, but for which a dereferenced memory address is known.

public abstract void removeCallRelationship (long address)

Remove all registered call relationships (from and to) a given internal address.