emu/debug/debugcpu.cpp,sinclair/spectrum.cpp: Guarded pointer accessors
This commit is contained in:
parent
18e3c764df
commit
c71bbb1c10
@ -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());
|
||||
|
||||
@ -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; }
|
||||
|
||||
Loading…
Reference in New Issue
Block a user