From 5017feca7e85c1afdffb5604c4b6457ca9d29213 Mon Sep 17 00:00:00 2001 From: disinvite Date: Sun, 5 Nov 2023 21:03:57 -0500 Subject: [PATCH] Big performance gain to reccmp --- tools/reccmp/reccmp.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/reccmp/reccmp.py b/tools/reccmp/reccmp.py index d32b5ad0..41e571ab 100755 --- a/tools/reccmp/reccmp.py +++ b/tools/reccmp/reccmp.py @@ -220,12 +220,14 @@ def get_recompiled_address(self, filename, line): found = False logger.debug('Looking for %s:%d', filename, line) + filename_basename = os.path.basename(filename).lower() for fn in self.lines: # Sometimes a PDB is compiled with a relative path while we always have # an absolute path. Therefore we must try: - if os.path.samefile(fn, filename): + if (os.path.basename(fn).lower() == filename_basename and + os.path.samefile(fn, filename)): filename = fn break except FileNotFoundError as e: