Skip to content

Commit fe0dbe0

Browse files
authored
Merge pull request #25 from rvantonder/patch-3
Update brancher output
2 parents cf5743f + 471db24 commit fe0dbe0

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

plugins/bap/utils/ida.py

+9-8
Original file line numberDiff line numberDiff line change
@@ -173,14 +173,15 @@ def dest(ea, flow): # flow denotes whether normal flow is also taken
173173
def pp(l):
174174
return ' '.join('0x%x' % e for e in l)
175175

176-
with open(output_filename, 'w+') as out:
177-
for ea in all_valid_ea():
178-
branch_dests = dest(ea, False)
179-
if len(branch_dests) > 0:
180-
out.write('(0x%x (%s) (%s))\n' % (
181-
ea,
182-
pp(dest(ea, True) - branch_dests),
183-
pp(branch_dests)
176+
with open(output_filename, 'w+') as out:
177+
for ea in all_valid_ea():
178+
branch_dests_false = dest(ea, False)
179+
branch_dests_true = dest(ea,True)
180+
if len(branch_dests_false) > 0 or len(branch_dests_true) > 0:
181+
out.write('(0x%x (%s) (%s))\n' % (
182+
ea,
183+
pp(branch_dests_true - branch_dests_false),
184+
pp(branch_dests_false)
184185
))
185186

186187

0 commit comments

Comments
 (0)