diff --git a/pyocd/coresight/cortex_m.py b/pyocd/coresight/cortex_m.py index 1da3c6801..6ba1300ca 100644 --- a/pyocd/coresight/cortex_m.py +++ b/pyocd/coresight/cortex_m.py @@ -977,7 +977,7 @@ def exception_number_to_name(self, exc_num, name_thread=False): if exc_num == 0 and not name_thread: return None else: - return self.CORE_EXCEPTION[num] + return self.CORE_EXCEPTION[exc_num] else: irq_num = exc_num - len(self.CORE_EXCEPTION) name = None