mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-12 11:11:16 +00:00
better source path resolving
For some reason, nmake compiles produce different symbols. I wonder if this affects the accuracy of the decomp.
This commit is contained in:
parent
fbc382c182
commit
f27efcd419
@ -125,19 +125,23 @@ def get_wine_path(fn):
|
||||
# Convert filename to Wine path
|
||||
filename = get_wine_path(filename)
|
||||
|
||||
print('Looking for ' + filename + ' line ' + str(line))
|
||||
#print('Looking for ' + filename + ' line ' + str(line))
|
||||
|
||||
addr = None
|
||||
found = False
|
||||
|
||||
for i, s in enumerate(line_dump):
|
||||
if s.startswith(' ' + filename):
|
||||
lines = line_dump[i + 2].split()
|
||||
if line == int(lines[0]):
|
||||
# Found address
|
||||
addr = int(lines[1], 16)
|
||||
found = True
|
||||
break
|
||||
try:
|
||||
sourcepath = s.split()[0]
|
||||
if os.path.isfile(sourcepath) and os.path.samefile(sourcepath, filename):
|
||||
lines = line_dump[i + 2].split()
|
||||
if line == int(lines[0]):
|
||||
# Found address
|
||||
addr = int(lines[1], 16)
|
||||
found = True
|
||||
break
|
||||
except IndexError:
|
||||
pass
|
||||
|
||||
if found:
|
||||
# Find size of function
|
||||
|
||||
Loading…
Reference in New Issue
Block a user