summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/debug/debugcpu.cpp
diff options
context:
space:
mode:
author AJR <ajrhacker@users.noreply.github.com>2016-06-24 22:34:13 -0400
committer AJR <ajrhacker@users.noreply.github.com>2016-06-24 22:34:13 -0400
commit38c4b762f03769155fb8f8d2ce7c9dd47ece5f46 (patch)
treeda1ed7105cd7d23f65cd8370d849be64922d2259 /src/emu/debug/debugcpu.cpp
parent9fccecfcf393e8d23e307e3a1a1fc590829b2136 (diff)
Move disasm overrides into interface, reducing driver-debugger dependencies (nw)
Diffstat (limited to 'src/emu/debug/debugcpu.cpp')
-rw-r--r--src/emu/debug/debugcpu.cpp15
1 files changed, 5 insertions, 10 deletions
diff --git a/src/emu/debug/debugcpu.cpp b/src/emu/debug/debugcpu.cpp
index 021d745d0ec..9dcb1ee68f5 100644
--- a/src/emu/debug/debugcpu.cpp
+++ b/src/emu/debug/debugcpu.cpp
@@ -1631,7 +1631,6 @@ device_debug::device_debug(device_t &device)
, m_flags(0)
, m_symtable(&device, device.machine().debugger().cpu().get_global_symtable())
, m_instrhook(nullptr)
- , m_dasm_override(nullptr)
, m_stepaddr(0)
, m_stepsleft(0)
, m_stopaddr(0)
@@ -1984,20 +1983,16 @@ void device_debug::set_instruction_hook(debug_instruction_hook_func hook)
offs_t device_debug::disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram) const
{
- offs_t result = 0;
-
- // check for disassembler override
- if (m_dasm_override != nullptr)
- result = (*m_dasm_override)(m_device, buffer, pc, oprom, opram, 0);
+ if (m_disasm == nullptr)
+ return 0;
// if we have a disassembler, run it
- if (result == 0 && m_disasm != nullptr)
- result = m_disasm->disassemble(buffer, pc, oprom, opram, 0);
+ offs_t result = m_disasm->disassemble(buffer, pc, oprom, opram, 0);
// make sure we get good results
- assert((result & DASMFLAG_LENGTHMASK) != 0 || m_disasm == nullptr);
+ assert((result & DASMFLAG_LENGTHMASK) != 0);
#ifdef MAME_DEBUG
- if (m_memory != nullptr && m_disasm != nullptr)
+ if (m_memory != nullptr)
{
address_space &space = m_memory->space(AS_PROGRAM);
int bytes = space.address_to_byte(result & DASMFLAG_LENGTHMASK);