summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/debug/debugvw.c
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2011-03-29 15:50:04 +0000
committer Aaron Giles <aaron@aarongiles.com>2011-03-29 15:50:04 +0000
commit2ad50720237fdd19cf5ab45b8cb6bb21119c00b8 (patch)
treedb21eee69668a06abc3f310ebbd51f5dbadf2de7 /src/emu/debug/debugvw.c
parentb72cf3c5702b749c7bf26383ff05a9ab55022d31 (diff)
BIG update.
Remove redundant machine items from address_space and device_t. Neither machine nor m_machine are directly accessible anymore. Instead a new getter machine() is available which returns a machine reference. So: space->machine->xxx ==> space->machine().xxx device->machine->yyy ==> device->machine().yyy Globally changed all running_machine pointers to running_machine references. Any function/method that takes a running_machine takes it as a required parameter (1 or 2 exceptions). Being consistent here gets rid of a lot of odd &machine or *machine, but it does mean a very large bulk change across the project. Structs which have a running_machine * now have that variable renamed to m_machine, and now have a shiny new machine() method that works like the space and device methods above. Since most of these are things that should eventually be devices anyway, consider this a step in that direction. 98% of the update was done with regex searches. The changes are architected such that the compiler will catch the remaining errors: // find things that use an embedded machine directly and replace // with a machine() getter call S: ->machine-> R: ->machine\(\)\. // do the same if via a reference S: \.machine-> R: \.machine\(\)\. // convert function parameters to running_machine & S: running_machine \*machine([^;]) R: running_machine \&machine\1 // replace machine-> with machine. S: machine-> R: machine\. // replace &machine() with machine() S: \&([()->a-z0-9_]+machine\(\)) R: \1 // sanity check: look for this used as a cast (running_machine &) // and change to this: *(running_machine *)
Diffstat (limited to 'src/emu/debug/debugvw.c')
-rw-r--r--src/emu/debug/debugvw.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/emu/debug/debugvw.c b/src/emu/debug/debugvw.c
index 2454644c7ed..9d652f5078d 100644
--- a/src/emu/debug/debugvw.c
+++ b/src/emu/debug/debugvw.c
@@ -147,7 +147,7 @@ void debug_view_source_list::reset()
{
debug_view_source *source = m_head;
m_head = source->m_next;
- auto_free(&m_machine, source);
+ auto_free(m_machine, source);
}
// reset the tail pointer and index
@@ -222,7 +222,7 @@ debug_view::debug_view(running_machine &machine, debug_view_type type, debug_vie
{
// allocate memory for the buffer
m_viewdata_size = m_visible.y * m_visible.x;
- m_viewdata = auto_alloc_array(&machine, debug_view_char, m_viewdata_size);
+ m_viewdata = auto_alloc_array(machine, debug_view_char, m_viewdata_size);
}
@@ -256,8 +256,8 @@ void debug_view::end_update()
if (size > m_viewdata_size)
{
m_viewdata_size = size;
- auto_free(&m_machine, m_viewdata);
- m_viewdata = auto_alloc_array(&m_machine, debug_view_char, m_viewdata_size);
+ auto_free(m_machine, m_viewdata);
+ m_viewdata = auto_alloc_array(m_machine, debug_view_char, m_viewdata_size);
}
// update the view
@@ -450,7 +450,7 @@ debug_view_manager::~debug_view_manager()
{
debug_view *oldhead = m_viewlist;
m_viewlist = oldhead->m_next;
- auto_free(&m_machine, oldhead);
+ auto_free(m_machine, oldhead);
}
}
@@ -464,25 +464,25 @@ debug_view *debug_view_manager::alloc_view(debug_view_type type, debug_view_osd_
switch (type)
{
case DVT_CONSOLE:
- return append(auto_alloc(&m_machine, debug_view_console(m_machine, osdupdate, osdprivate)));
+ return append(auto_alloc(m_machine, debug_view_console(m_machine, osdupdate, osdprivate)));
case DVT_STATE:
- return append(auto_alloc(&m_machine, debug_view_state(m_machine, osdupdate, osdprivate)));
+ return append(auto_alloc(m_machine, debug_view_state(m_machine, osdupdate, osdprivate)));
case DVT_DISASSEMBLY:
- return append(auto_alloc(&m_machine, debug_view_disasm(m_machine, osdupdate, osdprivate)));
+ return append(auto_alloc(m_machine, debug_view_disasm(m_machine, osdupdate, osdprivate)));
case DVT_MEMORY:
- return append(auto_alloc(&m_machine, debug_view_memory(m_machine, osdupdate, osdprivate)));
+ return append(auto_alloc(m_machine, debug_view_memory(m_machine, osdupdate, osdprivate)));
case DVT_LOG:
- return append(auto_alloc(&m_machine, debug_view_log(m_machine, osdupdate, osdprivate)));
+ return append(auto_alloc(m_machine, debug_view_log(m_machine, osdupdate, osdprivate)));
case DVT_TIMERS:
-// return append(auto_alloc(&m_machine, debug_view_timers(m_machine, osdupdate, osdprivate)));
+// return append(auto_alloc(m_machine, debug_view_timers(m_machine, osdupdate, osdprivate)));
case DVT_ALLOCS:
-// return append(auto_alloc(&m_machine, debug_view_allocs(m_machine, osdupdate, osdprivate)));
+// return append(auto_alloc(m_machine, debug_view_allocs(m_machine, osdupdate, osdprivate)));
default:
fatalerror("Attempt to create invalid debug view type %d\n", type);
@@ -502,7 +502,7 @@ void debug_view_manager::free_view(debug_view &view)
if (*viewptr == &view)
{
*viewptr = view.m_next;
- auto_free(&m_machine, &view);
+ auto_free(m_machine, &view);
break;
}
}
@@ -559,7 +559,7 @@ debug_view_expression::debug_view_expression(running_machine &machine)
: m_machine(machine),
m_dirty(true),
m_result(0),
- m_parsed(debug_cpu_get_global_symtable(&machine)),
+ m_parsed(debug_cpu_get_global_symtable(machine)),
m_string("0")
{
}
@@ -581,7 +581,7 @@ debug_view_expression::~debug_view_expression()
void debug_view_expression::set_context(symbol_table *context)
{
- m_parsed.set_symbols((context != NULL) ? context : debug_cpu_get_global_symtable(&m_machine));
+ m_parsed.set_symbols((context != NULL) ? context : debug_cpu_get_global_symtable(m_machine));
m_dirty = true;
}