Package ghidra.program.model.util

# Class AcyclicCallGraphBuilder

java.lang.Object
ghidra.program.model.util.AcyclicCallGraphBuilder

public class AcyclicCallGraphBuilder extends Object
Class to build an DependencyGraph base on a acyclic function call graph. This is useful when you want to process functions "bottom up".

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `AcyclicCallGraphBuilder(Program program, boolean killThunks)`
  Creates a DependencyGraph of all functions in a program based on the call graph.
  `AcyclicCallGraphBuilder(Program program, AddressSetView set, boolean killThunks)`
  Creates a DependencyGraph of all functions in the given addressSet based on the call graph.
  `AcyclicCallGraphBuilder(Program program, Collection<Function> functions, boolean killThunks)`
  Creates a DependencyGraph of all functions in the given set of functions based on the call graph.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `AbstractDependencyGraph<Address>`
  `getDependencyGraph(TaskMonitor monitor)`
  Builds the DependencyGraph for the acyclic call graph represented by this object.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### AcyclicCallGraphBuilder

    public AcyclicCallGraphBuilder(Program program, boolean killThunks)
    Creates a DependencyGraph of all functions in a program based on the call graph.
    Parameters:
      `program` - the program to create an acyclic call graph
      `killThunks` - true if thunked functions should be eliminated from the graph

  - ### AcyclicCallGraphBuilder

    public AcyclicCallGraphBuilder(Program program, AddressSetView set, boolean killThunks)
    Creates a DependencyGraph of all functions in the given addressSet based on the call graph. Calls to or from functions outside the given address set are ignored.
    Parameters:
      `program` - the program to create an acyclic call graph
      `set` - the address to restrict the call graph.
      `killThunks` - true if thunked functions should be eliminated from the graph

  - ### AcyclicCallGraphBuilder

    public AcyclicCallGraphBuilder(Program program, Collection<Function> functions, boolean killThunks)
    Creates a DependencyGraph of all functions in the given set of functions based on the call graph. Calls to or from functions not in the given set are ignored.
    Parameters:
      `program` - the program to create an acyclic call graph
      `functions` - the set of functions to include in the call graph.
      `killThunks` - true if thunked functions should be eliminated from the graph

- ## Method Details

  - ### getDependencyGraph

    public AbstractDependencyGraph<Address> getDependencyGraph(TaskMonitor monitor) throws CancelledException
    Builds the DependencyGraph for the acyclic call graph represented by this object.
    Parameters:
      `monitor` - the taskMonitor to use for reporting progress or cancelling.
    Returns:
      the DependencyGraph for the acyclic call graph represented by this object.
    Throws:
      `CancelledException` - if the monitor was cancelled.