mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-15 04:31: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
|
# Convert filename to Wine path
|
||||||
filename = get_wine_path(filename)
|
filename = get_wine_path(filename)
|
||||||
|
|
||||||
print('Looking for ' + filename + ' line ' + str(line))
|
#print('Looking for ' + filename + ' line ' + str(line))
|
||||||
|
|
||||||
addr = None
|
addr = None
|
||||||
found = False
|
found = False
|
||||||
|
|
||||||
for i, s in enumerate(line_dump):
|
for i, s in enumerate(line_dump):
|
||||||
if s.startswith(' ' + filename):
|
try:
|
||||||
lines = line_dump[i + 2].split()
|
sourcepath = s.split()[0]
|
||||||
if line == int(lines[0]):
|
if os.path.isfile(sourcepath) and os.path.samefile(sourcepath, filename):
|
||||||
# Found address
|
lines = line_dump[i + 2].split()
|
||||||
addr = int(lines[1], 16)
|
if line == int(lines[0]):
|
||||||
found = True
|
# Found address
|
||||||
break
|
addr = int(lines[1], 16)
|
||||||
|
found = True
|
||||||
|
break
|
||||||
|
except IndexError:
|
||||||
|
pass
|
||||||
|
|
||||||
if found:
|
if found:
|
||||||
# Find size of function
|
# Find size of function
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user