emu/debug/debugcpu.cpp,sinclair/spectrum.cpp: Guarded pointer accessors

This commit is contained in:
Andrei Holub authored and Andrei I. Holub committed 2026-05-24 12:52:11 -04:00
1 parent 18e3c764df
commit c71bbb1c10
2 files changed
+7 -2

No files matched your search

+6 -1
View File
@@ -575,7 +575,7 @@ device_debug::device_debug(device_t &device)
}
// Use own table for CPU and the global for others
symbol_table *symtable = m_symtable != nullptr ? m_symtable.get() : &device.machine().debugger().cpu().global_symtable();
symbol_table *symtable = &this->symtable();
// add all registers into it
for (const auto &entry : m_state->state_entries())
@@ -623,6 +623,11 @@ device_debug::~device_debug()
exceptionpoint_clear_all();
}
symbol_table &device_debug::symtable()
{
return m_symtable != nullptr ? *m_symtable : m_device.machine().debugger().cpu().global_symtable();
}
void device_debug::write_tracking(address_space &space, offs_t address, u64 data)
{
dasm_memory_access const newAccess(space.spacenum(), address, data, m_state->pcbase());
+1 -1
View File
@@ -41,7 +41,7 @@ public:
~device_debug();
// getters
symbol_table &symtable() { return *m_symtable; }
symbol_table &symtable();
// commonly-used pass-throughs
int logaddrchars() const { return (m_memory != nullptr && m_memory->has_space(AS_PROGRAM)) ? m_memory->space(AS_PROGRAM).logaddrchars() : 8; }