mirror of
https://github.com/holub/mame
synced 2025-05-28 16:43:04 +03:00
Adding "totalcycles" debugger variable
This commit is contained in:
parent
229df6131a
commit
8bfeccfb66
@ -1691,9 +1691,12 @@ device_debug::device_debug(device_t &device)
|
||||
// set up state-related stuff
|
||||
if (m_state != NULL)
|
||||
{
|
||||
// add a global symbol for the current instruction pointer
|
||||
// add global symbol for cycles and totalcycles
|
||||
if (m_exec != NULL)
|
||||
{
|
||||
m_symtable.add("cycles", NULL, get_cycles);
|
||||
m_symtable.add("totalcycles", NULL, get_totalcycles);
|
||||
}
|
||||
|
||||
// add entries to enable/disable unmap reporting for each space
|
||||
if (m_memory != NULL)
|
||||
@ -3082,6 +3085,18 @@ UINT64 device_debug::get_cycles(symbol_table &table, void *ref)
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// get_totalcycles - getter callback for the
|
||||
// 'totalcycles' symbol
|
||||
//-------------------------------------------------
|
||||
|
||||
UINT64 device_debug::get_totalcycles(symbol_table &table, void *ref)
|
||||
{
|
||||
device_t *device = reinterpret_cast<device_t *>(table.globalref());
|
||||
return device->debug()->m_exec->total_cycles();
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// get_logunmap - getter callback for the logumap
|
||||
// symbols
|
||||
|
@ -243,6 +243,7 @@ private:
|
||||
// symbol get/set callbacks
|
||||
static UINT64 get_current_pc(symbol_table &table, void *ref);
|
||||
static UINT64 get_cycles(symbol_table &table, void *ref);
|
||||
static UINT64 get_totalcycles(symbol_table &table, void *ref);
|
||||
static UINT64 get_logunmap(symbol_table &table, void *ref);
|
||||
static void set_logunmap(symbol_table &table, void *ref, UINT64 value);
|
||||
static UINT64 get_state(symbol_table &table, void *ref);
|
||||
|
Loading…
Reference in New Issue
Block a user