Spaces:
Sleeping
Sleeping
Commit
·
ecef0e3
1
Parent(s):
dcd8edc
relax parsing slightly
Browse files- normalize.py +5 -1
normalize.py
CHANGED
@@ -14,9 +14,13 @@ def normalize(asm):
|
|
14 |
addr2label = {}
|
15 |
func_cnt, label_cnt = 0, 0
|
16 |
for i, line in enumerate(asm):
|
|
|
17 |
if line.strip() == '' or 'file format elf64-x86-64' in line:
|
18 |
continue
|
19 |
-
|
|
|
|
|
|
|
20 |
if len(line.split('\t')) == 1 and line.endswith(':'):
|
21 |
func = line[line.index('<') + 1 : line.index('>')]
|
22 |
asm_lst.append([f'<func{func_cnt}>:'])
|
|
|
14 |
addr2label = {}
|
15 |
func_cnt, label_cnt = 0, 0
|
16 |
for i, line in enumerate(asm):
|
17 |
+
|
18 |
if line.strip() == '' or 'file format elf64-x86-64' in line:
|
19 |
continue
|
20 |
+
|
21 |
+
if line.startswith('Disassembly of section'):
|
22 |
+
continue
|
23 |
+
|
24 |
if len(line.split('\t')) == 1 and line.endswith(':'):
|
25 |
func = line[line.index('<') + 1 : line.index('>')]
|
26 |
asm_lst.append([f'<func{func_cnt}>:'])
|