summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/debug/debugcpu.cpp
diff options
context:
space:
mode:
author ajrhacker <ajrhacker@users.noreply.github.com>2017-10-12 14:39:51 -0400
committer R. Belmont <rb6502@users.noreply.github.com>2017-10-12 14:39:51 -0400
commit8113e27292af16a28c00cbee7a712730f06aa301 (patch)
tree3d5528975159c3c00a81585ae0d9c024563b918a /src/emu/debug/debugcpu.cpp
parenta01b133b78166febc35506c3b08d9edccd5859d0 (diff)
device_state_interface: Polymorphism and std::function for entries (nw) (#2690)
* device_state_interface: Polymorphism and std::function for entries (nw) - Create a templated subclass of device_state_entry to provide separate read/write interfaces for registers of varying widths. The efficiency impact of this should be minimal, given that this eliminates the need to make each byte width a subcase for reads and writes. - Create similarly templated "pseudo-register" versions of device_state_entry that provides custom read/write interfaces through std::function. The intent of this is to eventually replace the dummy register + state_export interface hitherto necessary to provide debugger access to bankswitched or computed state registers. - State registers can now be made read-only, and this is automatically done now when state_add is called with a std::function read handler but no write handler. This property is honored by MAME debug expressions. * Add override keyword (nw) * Remove explicit instantiations that were causing linking errors in tools build (nw)
Diffstat (limited to 'src/emu/debug/debugcpu.cpp')
-rw-r--r--src/emu/debug/debugcpu.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/emu/debug/debugcpu.cpp b/src/emu/debug/debugcpu.cpp
index 46ad9e04683..5b41d0f8241 100644
--- a/src/emu/debug/debugcpu.cpp
+++ b/src/emu/debug/debugcpu.cpp
@@ -1560,7 +1560,7 @@ device_debug::device_debug(device_t &device)
for (const auto &entry : m_state->state_entries())
{
strmakelower(tempstr.assign(entry->symbol()));
- m_symtable.add(tempstr.c_str(), (void *)(uintptr_t)entry->index(), get_state, set_state, entry->format_string());
+ m_symtable.add(tempstr.c_str(), (void *)(uintptr_t)entry->index(), get_state, entry->writeable() ? set_state : nullptr, entry->format_string());
}
}