MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / BasicBlockEdge

Class BasicBlockEdge

python/basicblock.py:36–61  ·  view source on GitHub ↗

``class BasicBlockEdge`` represents the edges that connect basic blocks in graph view. :cvar type: The :py:meth:`enums.BranchType` of the edge; Whether the edge is a true branch, false branch, unconditional, etc. :cvar source: The basic block that the edge originates from. :cvar target: The ba

Source from the content-addressed store, hash-verified

34
35@dataclass(frozen=True)
36class BasicBlockEdge:
37 """
38 ``class BasicBlockEdge`` represents the edges that connect basic blocks in graph view.
39
40 :cvar type: The :py:meth:`enums.BranchType` of the edge; Whether the edge is a true branch, false branch, unconditional, etc.
41 :cvar source: The basic block that the edge originates from.
42 :cvar target: The basic block that the edge is going to.
43 :cvar backedge: Whether this edge targets to a node whose control flow can eventually flow back through the source node of this edge.
44 :Example:
45
46 >>> current_basic_block.outgoing_edges
47 [<TrueBranch: x86_64@0x6>, <FalseBranch: x86_64@0x1f>]
48 """
49 type: BranchType
50 source: 'BasicBlock'
51 target: 'BasicBlock'
52 back_edge: bool
53 fall_through: bool
54
55 def __repr__(self):
56 if self.type == BranchType.UnresolvedBranch:
57 return f"<{self.type.name}>"
58 elif self.target.arch:
59 return f"<{self.type.name}: {self.target.arch.name}@{self.target.start:#x}>"
60 else:
61 return f"<{self.type.name}: {self.target.start:#x}>"
62
63
64class BasicBlock:

Callers 1

_make_edgesMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected