angr.angrdb.serializers.callgraph

class angr.angrdb.serializers.callgraph.CallGraphSerializer

Bases: object

Serialize/unserialize the callgraph of a function manager (a networkx.MultiDiGraph whose nodes are function addresses).

The graph is stored as a JSON document with the exact node set as well as all edges, including their keys and data dicts, so that edge multiplicity and edge data round-trip exactly.

static dump(session, db_kb, callgraph)
Parameters:
  • session

  • db_kb (DbKnowledgeBase) – The database object for KnowledgeBase.

  • callgraph (MultiDiGraph) – The callgraph to dump.

Return type:

None

static load(session, db_kb)
Parameters:
  • session

  • db_kb (DbKnowledgeBase) – The database object for KnowledgeBase.

Return type:

MultiDiGraph | None

Returns:

The loaded callgraph, or None if no callgraph is stored in the database (e.g., for databases created before callgraph serialization was introduced).