mirror of https://github.com/zeldaret/tp.git
speedup tp.py progress
This commit is contained in:
parent
5390dfe55f
commit
bf6c517051
10
tools/tp.py
10
tools/tp.py
|
|
@ -311,15 +311,9 @@ def find_function_ranges(asm_files):
|
|||
first = None
|
||||
last = None
|
||||
for line in file.readlines():
|
||||
line_start = line.find("/* ")
|
||||
line_end = line.find(" */", 3)
|
||||
|
||||
if line_start < 0 or line_end < 0:
|
||||
if not line.startswith('/* '):
|
||||
continue
|
||||
|
||||
line_values = line[line_start+3:line_end].split(" ")
|
||||
assert len(line_values) == 6
|
||||
addr = int(line_values[0], 16)
|
||||
addr = int(line[3:11], 16)
|
||||
if not first:
|
||||
first = addr
|
||||
last = addr + 4
|
||||
|
|
|
|||
Loading…
Reference in New Issue