diff options
| author | Jordan Wiens <jordan@psifertex.com> | 2017-06-28 22:12:14 -0400 |
|---|---|---|
| committer | Jordan Wiens <jordan@psifertex.com> | 2017-06-28 22:12:14 -0400 |
| commit | 980e2f090fb47f7f71a46b03e8c636819f3214ec (patch) | |
| tree | f981eaf7f74eebc382974def5acc997cc9a215bd /python/function.py | |
| parent | c51f3bed6bdef577253feee0e85a71fda1931bd7 (diff) | |
| parent | d3a401da5af8dd471adf842b63c7368c7f8e87d0 (diff) | |
Merging dev to master for linux demo fix -- will not change personal or
commercial builds
Diffstat (limited to 'python/function.py')
| -rw-r--r-- | python/function.py | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/python/function.py b/python/function.py index 34511cfa..8beebe66 100644 --- a/python/function.py +++ b/python/function.py @@ -948,20 +948,16 @@ class DisassemblyTextLine(object): class FunctionGraphEdge(object): - def __init__(self, branch_type, source, target, points): + def __init__(self, branch_type, source, target, points, back_edge): self.type = BranchType(branch_type) self.source = source self.target = target self.points = points + self.back_edge = back_edge def __repr__(self): return "<%s: %s>" % (self.type.name, repr(self.target)) - @property - def back_edge(self): - """Whether the edge is a back edge (end of a loop)""" - return self.target in self.source.basic_block.dominators - class FunctionGraphBlock(object): def __init__(self, handle): @@ -1074,7 +1070,7 @@ class FunctionGraphBlock(object): points = [] for j in xrange(0, edges[i].pointCount): points.append((edges[i].points[j].x, edges[i].points[j].y)) - result.append(FunctionGraphEdge(branch_type, self, target, points)) + result.append(FunctionGraphEdge(branch_type, self, target, points, edges[i].backEdge)) core.BNFreeFunctionGraphBlockOutgoingEdgeList(edges, count.value) return result |
