public interface

ICallGraphManager

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

Class Overview

Interface for the native call graph manager. The relationships in this graph are between a 'caller' instruction and a 'callee' location (see CallGraphTarget). Such relationships are defined by IInstruction#getRoutineCall(long) and IInstruction#getIndirectRoutineCall(long).

Summary

Public Methods
abstract Set<CallGraphTarget> getCallees(long callerInternalAddress)
Get the targets called from a given instruction.
abstract Set<Long> getCallers(CallGraphTarget callee)
Get the addresses calling a given target.
abstract List<CallGraphTarget> getRoutineCallees(INativeMethodItem rtn)
Convenience method to get all the targets called by a routine.
abstract Set<Long> getRoutineCallers(INativeMethodItem rtn)
Convenience method to get all the addresses calling a routine.
abstract void recordCall(long callerInternalAddress, INativeMethodItem calleeExternalRtn)
Records a call between an internal address and an external routine.
abstract void recordCall(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 address.

Public Methods

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 Set<Long> getCallers (CallGraphTarget callee)

Get the addresses calling a given target.

Returns
  • set of callers addresses, null if none

public abstract List<CallGraphTarget> getRoutineCallees (INativeMethodItem rtn)

Convenience method to get all the targets called by a 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

public abstract Set<Long> getRoutineCallers (INativeMethodItem rtn)

Convenience method to get all the addresses calling a routine.

Returns
  • the set of addresses calling the given routine

public abstract void recordCall (long callerInternalAddress, INativeMethodItem calleeExternalRtn)

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

public abstract void recordCall (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 address.