Static Public Member Functions

com.google.security.zynamics.binnavi.API.disassembly.ModuleHelpers Class Reference

List of all members.

Static Public Member Functions

static Set< AddressgetBasicBlockAddresses (final Module module) throws CouldntLoadDataException
static Function getFunction (final Module module, final String name)
static Function getFunction (final Module module, final long address)
static Function getFunction (final Module module, final Address address)

Detailed Description

Offers convenience functions for working with modules. Please note that many convenience functions are just straight-forward implementations of commonly used algorithms and therefore can have significant runtime costs.


Member Function Documentation

static Set<Address> com.google.security.zynamics.binnavi.API.disassembly.ModuleHelpers.getBasicBlockAddresses ( final Module  module  )  throws CouldntLoadDataException [static]

Returns the start addresses of all basic blocks of a module. This function is probably the fastest way for retrieving the basic block addresses of a module.

Parameters:
module The module whose basic block addresses are returned.
Returns:
A set that contains all basic block addresses of the module.
Exceptions:
CouldntLoadDataException Thrown if the basic block addresses could not be determined.
static Function com.google.security.zynamics.binnavi.API.disassembly.ModuleHelpers.getFunction ( final Module  module,
final String  name 
) [static]

Returns the function of a module that has a given name. Please note that function names are not unique and in case of more than one function with the given name it is undefined exactly which of those functions is returned.

This function is guaranteed to work in O(n) where n is the number of functions of the module.

Parameters:
module The module that contains all functions.
name The name of the function to search for.
Returns:
The function that has the given name or null if there is no such function.
static Function com.google.security.zynamics.binnavi.API.disassembly.ModuleHelpers.getFunction ( final Module  module,
final long  address 
) [static]

Returns the function of a module that starts at a given address.

This function is guaranteed to work in O(n) where n is the number of functions of the module.

Parameters:
module The module that contains all functions.
address The address of the function to search for.
Returns:
The function that starts at the given address or null if there is no such function.
static Function com.google.security.zynamics.binnavi.API.disassembly.ModuleHelpers.getFunction ( final Module  module,
final Address  address 
) [static]

Returns the function of a module that starts at a given address.

This function is guaranteed to work in O(n) where n is the number of functions of the module.

Parameters:
module The module that contains all functions.
address The address of the function to search for.
Returns:
The function that starts at the given address or null if there is no such function.