summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/cpu/ns32000
diff options
context:
space:
mode:
author Patrick Mackinlay <pmackinlay@hotmail.com>2024-03-11 13:02:41 +0700
committer Patrick Mackinlay <pmackinlay@hotmail.com>2024-03-11 13:02:41 +0700
commit30cd73d2bbdd87b24640c8c0e8b8f3bdb13488b1 (patch)
treecd88c1f4c0e728ef8640ddcdb80cd8ec555a74d2 /src/devices/cpu/ns32000
parent8dbb5b3da26e6d858f7594c46563e390181bf574 (diff)
ns32000: hook exceptions in debugger prior to entry
* handle unexpected double memory abort
Diffstat (limited to 'src/devices/cpu/ns32000')
-rw-r--r--src/devices/cpu/ns32000/ns32000.cpp19
1 files changed, 15 insertions, 4 deletions
diff --git a/src/devices/cpu/ns32000/ns32000.cpp b/src/devices/cpu/ns32000/ns32000.cpp
index 6fef593dfd8..123353299fb 100644
--- a/src/devices/cpu/ns32000/ns32000.cpp
+++ b/src/devices/cpu/ns32000/ns32000.cpp
@@ -812,6 +812,9 @@ template <int HighBits, int Width> void ns32000_device<HighBits, Width>::flags(u
template <int HighBits, int Width> void ns32000_device<HighBits, Width>::interrupt(unsigned const trap)
{
+ if (machine().debug_enabled() && (trap > ABT))
+ debug()->exception_hook(trap);
+
unsigned offset = trap * 4;
switch (trap)
@@ -901,9 +904,6 @@ template <int HighBits, int Width> void ns32000_device<HighBits, Width>::interru
m_sequential = false;
m_icount -= top(SIZE_W, m_sp0) * 2 + top(SIZE_W, m_intbase + offset) + top(SIZE_D, m_sp0) + top(SIZE_D, m_mod);
-
- if (machine().debug_enabled() && (trap > ABT))
- debug()->exception_hook(trap);
}
template <int HighBits, int Width> void ns32000_device<HighBits, Width>::lpr(unsigned reg, addr_mode const mode, bool user, unsigned &tex)
@@ -3615,7 +3615,18 @@ template <int HighBits, int Width> void ns32000_device<HighBits, Width>::execute
}
catch (ns32000_abort const &)
{
- interrupt(ABT);
+ try
+ {
+ interrupt(ABT);
+ }
+ catch (ns32000_abort const &)
+ {
+ // this shouldn't happen; probably indicates supervisor stack overflow (stuck interrupt?)
+ if (machine().debug_enabled())
+ machine().debug_break();
+ else
+ fatalerror("abort during abort entry 0x%08x\n", m_pc);
+ }
}
}
}