summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
author Olivier Galibert <galibert@pobox.com>2018-07-09 23:39:29 +0200
committer Olivier Galibert <galibert@pobox.com>2018-07-09 23:39:29 +0200
commitd5d82fa30a13e6d6519a8d300ae7964a37215951 (patch)
tree0360be8fe6fd3739638277749bc4296cfe15f5ac /src
parentbad31ea61c58d6564d3b8df0ac2ea8360d75e184 (diff)
Watchpoint fixes (segfaults, wpclear not clearing) (nw)
Diffstat (limited to 'src')
-rw-r--r--src/emu/debug/debugcpu.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/emu/debug/debugcpu.cpp b/src/emu/debug/debugcpu.cpp
index f0391249faa..36f23a52825 100644
--- a/src/emu/debug/debugcpu.cpp
+++ b/src/emu/debug/debugcpu.cpp
@@ -2885,9 +2885,9 @@ device_debug::watchpoint::watchpoint(device_debug* debugInterface,
m_notifier = m_space.add_change_notifier([this](read_or_write mode) {
if (m_enabled)
{
- if (u32(mode) & u32(read_or_write::READ))
+ if (u32(mode) & u32(m_type) & u32(read_or_write::READ))
m_phr->remove();
- if (u32(mode) & u32(read_or_write::WRITE))
+ if (u32(mode) & u32(m_type) & u32(read_or_write::WRITE))
m_phw->remove();
install(mode);
}
@@ -2896,6 +2896,10 @@ device_debug::watchpoint::watchpoint(device_debug* debugInterface,
device_debug::watchpoint::~watchpoint()
{
+ if (m_phr)
+ m_phr->remove();
+ if (m_phw)
+ m_phw->remove();
m_space.remove_change_notifier(m_notifier);
}