From f3ed31ed60f17605c971411ffc4d384f94ace818 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Fri, 30 Jun 2023 01:08:53 +0200 Subject: [PATCH] reccmp: continue looking when source cannot be found Most often, the reasons is mismatched sources. --- tools/reccmp/reccmp.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tools/reccmp/reccmp.py b/tools/reccmp/reccmp.py index 3cbfb467..f760f60e 100755 --- a/tools/reccmp/reccmp.py +++ b/tools/reccmp/reccmp.py @@ -209,9 +209,12 @@ def get_recompiled_address(self, filename, line): for fn in self.lines: # Sometimes a PDB is compiled with a relative path while we always have # an absolute path. Therefore we must - if os.path.samefile(fn, filename): - filename = fn - break + try: + if os.path.samefile(fn, filename): + filename = fn + break + except FileNotFoundError as e: + continue if filename in self.lines and line in self.lines[fn]: addr = self.lines[fn][line]