From c4b4555b8035ee1bec7f241de20d847805e3ff33 Mon Sep 17 00:00:00 2001 From: itsmattkc <34096995+itsmattkc@users.noreply.github.com> Date: Wed, 21 Jun 2023 17:01:48 -0700 Subject: [PATCH] reccmp: revert using debug offsets --- tools/reccmp/reccmp.py | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/tools/reccmp/reccmp.py b/tools/reccmp/reccmp.py index 02189dfe..36f917fa 100755 --- a/tools/reccmp/reccmp.py +++ b/tools/reccmp/reccmp.py @@ -118,14 +118,23 @@ def __init__(self, pdb, file): if current_section == 'SYMBOLS' and 'S_GPROC32' in line: addr = int(line[26:34], 16) - debug_offs = line_dump[i + 2] - debug_start = int(debug_offs[22:30], 16) - debug_end = int(debug_offs[43:], 16) + info = RecompiledInfo() info.addr = addr + recompfile.imagebase + recompfile.textvirt - info.start = debug_start - info.size = debug_end - debug_start + + use_dbg_offs = False + if use_dbg_offs: + debug_offs = line_dump[i + 2] + debug_start = int(debug_offs[22:30], 16) + debug_end = int(debug_offs[43:], 16) + + info.start = debug_start + info.size = debug_end - debug_start + else: + info.start = 0 + info.size = int(line[41:49], 16) + info.name = line[77:] self.funcs[addr] = info