Edward J. Schwartz commited on
Commit
702e074
1 Parent(s): 85a4ca2

Fix bug in training when function is not found

Browse files
Files changed (1) hide show
  1. scripts/gen-training.py +6 -2
scripts/gen-training.py CHANGED
@@ -78,9 +78,13 @@ with open(gname, "r") as f:
78
 
79
  dis = get_dis_from_all_dis(int(addr, 16))
80
  #objs.append((addr, typ, name, dis))
81
- if dis is not None:
 
 
 
82
  dis = dis.decode("utf8")
83
- df = df.append({'Binary': bname, 'Addr': addr, 'Name': name, 'Type': typ, 'Disassembly': dis}, ignore_index=True)
 
84
 
85
  if False:
86
  df.to_csv(oname, index=False)
 
78
 
79
  dis = get_dis_from_all_dis(int(addr, 16))
80
  #objs.append((addr, typ, name, dis))
81
+ if dis is None:
82
+ dis = ""
83
+ typ = "notfound"
84
+ else:
85
  dis = dis.decode("utf8")
86
+
87
+ df = df.append({'Binary': bname, 'Addr': addr, 'Name': name, 'Type': typ, 'Disassembly': dis}, ignore_index=True)
88
 
89
  if False:
90
  df.to_csv(oname, index=False)