reccmp: support inlined functions that may have been compiled into both files

This commit is contained in:
itsmattkc
2023-06-22 01:05:00 -07:00
parent 66a010a19f
commit 749a1f419b
2 changed files with 13 additions and 4 deletions

View File

@@ -259,6 +259,10 @@ function_count = 0
total_accuracy = 0
htmlinsert = []
# Generate basename of original file, used in locating OFFSET lines
basename = os.path.basename(os.path.splitext(original)[0])
pattern = '// OFFSET:'
for subdir, dirs, files in os.walk(source):
for file in files:
srcfilename = os.path.join(os.path.abspath(subdir), file)
@@ -273,9 +277,14 @@ for subdir, dirs, files in os.walk(source):
if not line:
break
if line.startswith('// OFFSET:'):
par = line[10:].strip().split()
line = line.strip()
if line.startswith(pattern):
par = line[len(pattern):].strip().split()
module = par[0]
if module != basename:
continue
addr = int(par[1], 16)
find_open_bracket = line