From 3979438e90005451e740e0010a49e69338ce32c4 Mon Sep 17 00:00:00 2001 From: Giovanni Baraldi Date: Wed, 20 Nov 2024 15:28:51 -0600 Subject: [PATCH] Small fix for stitch.py Change-Id: I8435aaeb4452b54e5563bbdb47b269f9d0a97b3a [ROCm/rocprofiler commit: a5192bb9b337a930b0179653ec8785336f92859e] --- projects/rocprofiler/plugin/att/stitch.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/projects/rocprofiler/plugin/att/stitch.py b/projects/rocprofiler/plugin/att/stitch.py index 20845ac040..9a8509bf8a 100644 --- a/projects/rocprofiler/plugin/att/stitch.py +++ b/projects/rocprofiler/plugin/att/stitch.py @@ -146,7 +146,10 @@ class RegisterWatchList: # Matches tokens in reverse order def try_match_swapped(self, i, line, increment): - return self.insts[i + 1].type == self.code[line][1] and self.insts[i].type == self.code[line + 1][1] + try: + return self.insts[i + 1].type == self.code[line][1] and self.insts[i].type == self.code[line + 1][1] + except: + return False # Translates PC values to instructions, for auto captured ISA class PCTranslator: