Static Public Member Functions

# BinNavi.API.disassembly.FlowGraphHelpers Class Reference

Offers convenience functions for working with flow graphs. More...

List of all members.

## Static Public Member Functions
static Instruction | getInstruction (final FlowGraph flowgraph, final Address address)
| Finds an instruction with a given address.
static Instruction | getInstruction (final FlowGraph graph, final long address)
| Finds an instruction with a given address.

## Detailed Description

Offers convenience functions for working with flow graphs. 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 Instruction BinNavi.API.disassembly.FlowGraphHelpers.getInstruction | ( | final FlowGraph | flowgraph,
|  | final Address | address |
| ) |  |  | `[static]`

Returns the instruction of a flow graph that starts at a given address. Since addresses do not uniquely identify instructions it is possible that there is more than one instruction with the given address in the graph. In case of multiple instructions that start at the given address it is undefined exactly which of those instructions is returned.

This function is guaranteed to work in O(m + n) where m is the number of nodes in the graph and n is the number of instructions in the graph.

Parameters:

  | flowgraph | The graph to search through.
  | address | The address to search for.

Returns:
  The instruction that starts at the given address or null if there is no such instruction.

static Instruction BinNavi.API.disassembly.FlowGraphHelpers.getInstruction | ( | final FlowGraph | graph,
|  | final long | address |
| ) |  |  | `[static]`

Returns the instruction of a flowgraph that starts at a given address. Since addresses do not uniquely identify instructions it is possible that there is more than one instruction with the given address in the graph. In case of multiple instructions that start at the given address it is undefined exactly which of those instructions is returned.

This function is guaranteed to work in O(m + n) where m is the number of nodes in the graph and n is the number of instructions in the graph.

Parameters:

  | graph | The graph to search through.
  | address | The address to search for.

Returns:
  The instruction that starts at the given address or null if there is no such instruction.