summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/debug
diff options
context:
space:
mode:
author Miodrag Milanovic <mmicko@gmail.com>2016-06-29 08:34:30 +0200
committer Miodrag Milanovic <mmicko@gmail.com>2016-06-29 08:34:30 +0200
commit63f9a01f8c5d43b9cfe68c2d401a84647d19c10e (patch)
treea1f1874aa84850bddbebd2b0e0bfc3e1c77ce8c4 /src/emu/debug
parent1f6f1bfd6cfb748d9c5e159d6bd014bab8d30944 (diff)
Cleanup and version bumpmame0175
Diffstat (limited to 'src/emu/debug')
-rw-r--r--src/emu/debug/debugcmd.cpp38
-rw-r--r--src/emu/debug/debugcmd.h6
-rw-r--r--src/emu/debug/debugcon.h8
-rw-r--r--src/emu/debug/debugcpu.cpp62
-rw-r--r--src/emu/debug/debugcpu.h39
-rw-r--r--src/emu/debug/debughlp.cpp2
6 files changed, 77 insertions, 78 deletions
diff --git a/src/emu/debug/debugcmd.cpp b/src/emu/debug/debugcmd.cpp
index 72865e06680..361f8f14fdf 100644
--- a/src/emu/debug/debugcmd.cpp
+++ b/src/emu/debug/debugcmd.cpp
@@ -94,8 +94,8 @@ UINT64 debugger_commands::cheat_read_extended(const cheat_system *cheatsys, addr
debugger_commands::debugger_commands(running_machine& machine, debugger_cpu& cpu, debugger_console& console)
: m_machine(machine)
- , m_cpu(cpu)
- , m_console(console)
+ , m_cpu(cpu)
+ , m_console(console)
{
m_global_array = auto_alloc_array_clear(m_machine, global_entry, MAX_GLOBALS);
@@ -271,7 +271,7 @@ debugger_commands::debugger_commands(running_machine& machine, debugger_cpu& cpu
/* set up the initial debugscript if specified */
const char* name = m_machine.options().debug_script();
if (name[0] != 0)
- m_cpu.source_script(name);
+ m_cpu.source_script(name);
m_cheat.cpu[0] = m_cheat.cpu[1] = 0;
}
@@ -683,7 +683,7 @@ void debugger_commands::execute_tracelog(int ref, int params, const char *param[
/* then do a printf */
char buffer[1024];
if (mini_printf(buffer, param[0], params - 1, &values[1]))
- m_cpu.get_visible_cpu()->debug()->trace_printf("%s", buffer);
+ m_cpu.get_visible_cpu()->debug()->trace_printf("%s", buffer);
}
@@ -720,7 +720,7 @@ void debugger_commands::execute_step(int ref, int params, const char *param[])
if (!validate_number_parameter(param[0], &steps))
return;
- m_cpu.get_visible_cpu()->debug()->single_step(steps);
+ m_cpu.get_visible_cpu()->debug()->single_step(steps);
}
@@ -735,7 +735,7 @@ void debugger_commands::execute_over(int ref, int params, const char *param[])
if (!validate_number_parameter(param[0], &steps))
return;
- m_cpu.get_visible_cpu()->debug()->single_step_over(steps);
+ m_cpu.get_visible_cpu()->debug()->single_step_over(steps);
}
@@ -745,7 +745,7 @@ void debugger_commands::execute_over(int ref, int params, const char *param[])
void debugger_commands::execute_out(int ref, int params, const char *param[])
{
- m_cpu.get_visible_cpu()->debug()->single_step_out();
+ m_cpu.get_visible_cpu()->debug()->single_step_out();
}
@@ -761,7 +761,7 @@ void debugger_commands::execute_go(int ref, int params, const char *param[])
if (!validate_number_parameter(param[0], &addr))
return;
- m_cpu.get_visible_cpu()->debug()->go(addr);
+ m_cpu.get_visible_cpu()->debug()->go(addr);
}
@@ -772,7 +772,7 @@ void debugger_commands::execute_go(int ref, int params, const char *param[])
void debugger_commands::execute_go_vblank(int ref, int params, const char *param[])
{
- m_cpu.get_visible_cpu()->debug()->go_vblank();
+ m_cpu.get_visible_cpu()->debug()->go_vblank();
}
@@ -788,7 +788,7 @@ void debugger_commands::execute_go_interrupt(int ref, int params, const char *pa
if (!validate_number_parameter(param[0], &irqline))
return;
- m_cpu.get_visible_cpu()->debug()->go_interrupt(irqline);
+ m_cpu.get_visible_cpu()->debug()->go_interrupt(irqline);
}
@@ -804,7 +804,7 @@ void debugger_commands::execute_go_time(int ref, int params, const char *param[]
if (!validate_number_parameter(param[0], &milliseconds))
return;
- m_cpu.get_visible_cpu()->debug()->go_milliseconds(milliseconds);
+ m_cpu.get_visible_cpu()->debug()->go_milliseconds(milliseconds);
}
@@ -814,7 +814,7 @@ void debugger_commands::execute_go_time(int ref, int params, const char *param[]
void debugger_commands::execute_next(int ref, int params, const char *param[])
{
- m_cpu.get_visible_cpu()->debug()->go_next_device();
+ m_cpu.get_visible_cpu()->debug()->go_next_device();
}
@@ -1008,8 +1008,8 @@ void debugger_commands::execute_comment_del(int ref, int params, const char *par
/**
* @fn void execute_comment_list(running_machine &machine, int ref, int params, const char *param[])
* @brief Print current list of comments in debugger
- *
- *
+ *
+ *
*/
void debugger_commands::execute_comment_list(int ref, int params, const char *param[])
@@ -1029,7 +1029,7 @@ void debugger_commands::execute_comment_commit(int ref, int params, const char *
execute_comment_add(ref, params, param);
execute_comment_save(ref, params, param);
}
-
+
/*-------------------------------------------------
execute_comment - add a comment to a line
-------------------------------------------------*/
@@ -1053,7 +1053,7 @@ void debugger_commands::execute_comment_save(int ref, int params, const char *pa
* @todo add shorthand for color modify and save
*
*/
-
+
/*-------------------------------------------------
@@ -1651,7 +1651,7 @@ void debugger_commands::execute_load(int ref, int params, const char *param[])
/* check if end of file has been reached and stop loading if it has */
if (feof(f))
break;
- m_cpu.write_byte(*space, i, byte, true);
+ m_cpu.write_byte(*space, i, byte, true);
}
/* close the file */
fclose(f);
@@ -2513,7 +2513,7 @@ void debugger_commands::execute_traceover(int ref, int params, const char *param
void debugger_commands::execute_traceflush(int ref, int params, const char *param[])
{
- m_cpu.flush_traces();
+ m_cpu.flush_traces();
}
@@ -2733,7 +2733,7 @@ void debugger_commands::execute_snap(int ref, int params, const char *param[])
void debugger_commands::execute_source(int ref, int params, const char *param[])
{
- m_cpu.source_script(param[0]);
+ m_cpu.source_script(param[0]);
}
diff --git a/src/emu/debug/debugcmd.h b/src/emu/debug/debugcmd.h
index b771aa84174..7ecfc87958b 100644
--- a/src/emu/debug/debugcmd.h
+++ b/src/emu/debug/debugcmd.h
@@ -157,9 +157,9 @@ private:
void execute_input(int ref, int params, const char **param);
void execute_dumpkbd(int ref, int params, const char **param);
- running_machine& m_machine;
- debugger_cpu& m_cpu;
- debugger_console& m_console;
+ running_machine& m_machine;
+ debugger_cpu& m_cpu;
+ debugger_console& m_console;
global_entry *m_global_array;
cheat_system m_cheat;
diff --git a/src/emu/debug/debugcon.h b/src/emu/debug/debugcon.h
index 5e04d349454..e6e5145119a 100644
--- a/src/emu/debug/debugcon.h
+++ b/src/emu/debug/debugcon.h
@@ -124,12 +124,12 @@ private:
int maxparams;
};
- running_machine &m_machine;
+ running_machine &m_machine;
- text_buffer *m_console_textbuf;
- text_buffer *m_errorlog_textbuf;
+ text_buffer *m_console_textbuf;
+ text_buffer *m_errorlog_textbuf;
- debug_command *m_commandlist;
+ debug_command *m_commandlist;
};
#endif
diff --git a/src/emu/debug/debugcpu.cpp b/src/emu/debug/debugcpu.cpp
index 021d745d0ec..1bc78847b6b 100644
--- a/src/emu/debug/debugcpu.cpp
+++ b/src/emu/debug/debugcpu.cpp
@@ -36,19 +36,19 @@ const size_t debugger_cpu::NUM_TEMP_VARIABLES = 10;
debugger_cpu::debugger_cpu(running_machine &machine)
: m_machine(machine)
- , m_livecpu(nullptr)
- , m_visiblecpu(nullptr)
- , m_breakcpu(nullptr)
- , m_source_file(nullptr)
- , m_symtable(nullptr)
- , m_execution_state(EXECUTION_STATE_STOPPED)
- , m_bpindex(1)
- , m_wpindex(1)
- , m_rpindex(1)
- , m_wpdata(0)
- , m_wpaddr(0)
+ , m_livecpu(nullptr)
+ , m_visiblecpu(nullptr)
+ , m_breakcpu(nullptr)
+ , m_source_file(nullptr)
+ , m_symtable(nullptr)
+ , m_execution_state(EXECUTION_STATE_STOPPED)
+ , m_bpindex(1)
+ , m_wpindex(1)
+ , m_rpindex(1)
+ , m_wpdata(0)
+ , m_wpaddr(0)
, m_last_periodic_update_time(0)
- , m_comments_loaded(false)
+ , m_comments_loaded(false)
{
screen_device *first_screen = m_machine.first_screen();
@@ -327,7 +327,7 @@ bool debugger_cpu::comment_load(bool is_inline)
{
if(is_inline == false)
m_machine.debugger().console().printf("@%s\n", cputag_name);
-
+
if (!device->debug()->comment_import(*cpunode,is_inline))
throw emu_exception();
}
@@ -392,11 +392,11 @@ UINT8 debugger_cpu::read_byte(address_space &space, offs_t address, int apply_tr
result = 0xff;
}
else if (space.device().memory().read(space.spacenum(), address, 1, custom))
- { /* if there is a custom read handler, and it returns true, use that value */
+ { /* if there is a custom read handler, and it returns true, use that value */
result = custom;
}
else
- { /* otherwise, call the byte reading function for the translated address */
+ { /* otherwise, call the byte reading function for the translated address */
result = space.read_byte(address);
}
@@ -419,7 +419,7 @@ UINT16 debugger_cpu::read_word(address_space &space, offs_t address, int apply_t
UINT16 result;
if (!WORD_ALIGNED(address))
- { /* if this is misaligned read, or if there are no word readers, just read two bytes */
+ { /* if this is misaligned read, or if there are no word readers, just read two bytes */
UINT8 byte0 = read_byte(space, address + 0, apply_translation);
UINT8 byte1 = read_byte(space, address + 1, apply_translation);
@@ -430,7 +430,7 @@ UINT16 debugger_cpu::read_word(address_space &space, offs_t address, int apply_t
result = byte1 | (byte0 << 8);
}
else
- { /* otherwise, this proceeds like the byte case */
+ { /* otherwise, this proceeds like the byte case */
/* all accesses from this point on are for the debugger */
m_debugger_access = true;
@@ -443,11 +443,11 @@ UINT16 debugger_cpu::read_word(address_space &space, offs_t address, int apply_t
result = 0xffff;
}
else if (space.device().memory().read(space.spacenum(), address, 2, custom))
- { /* if there is a custom read handler, and it returns true, use that value */
+ { /* if there is a custom read handler, and it returns true, use that value */
result = custom;
}
else
- { /* otherwise, call the byte reading function for the translated address */
+ { /* otherwise, call the byte reading function for the translated address */
result = space.read_word(address);
}
@@ -472,7 +472,7 @@ UINT32 debugger_cpu::read_dword(address_space &space, offs_t address, int apply_
UINT32 result;
if (!DWORD_ALIGNED(address))
- { /* if this is a misaligned read, or if there are no dword readers, just read two words */
+ { /* if this is a misaligned read, or if there are no dword readers, just read two words */
UINT16 word0 = read_word(space, address + 0, apply_translation);
UINT16 word1 = read_word(space, address + 2, apply_translation);
@@ -483,7 +483,7 @@ UINT32 debugger_cpu::read_dword(address_space &space, offs_t address, int apply_
result = word1 | (word0 << 16);
}
else
- { /* otherwise, this proceeds like the byte case */
+ { /* otherwise, this proceeds like the byte case */
/* all accesses from this point on are for the debugger */
m_debugger_access = true;
@@ -491,15 +491,15 @@ UINT32 debugger_cpu::read_dword(address_space &space, offs_t address, int apply_
UINT64 custom;
if (apply_translation && !translate(space, TRANSLATE_READ_DEBUG, &address))
- { /* translate if necessary; if not mapped, return 0xffffffff */
+ { /* translate if necessary; if not mapped, return 0xffffffff */
result = 0xffffffff;
}
else if (space.device().memory().read(space.spacenum(), address, 4, custom))
- { /* if there is a custom read handler, and it returns true, use that value */
+ { /* if there is a custom read handler, and it returns true, use that value */
result = custom;
}
else
- { /* otherwise, call the byte reading function for the translated address */
+ { /* otherwise, call the byte reading function for the translated address */
result = space.read_dword(address);
}
@@ -524,7 +524,7 @@ UINT64 debugger_cpu::read_qword(address_space &space, offs_t address, int apply_
UINT64 result;
if (!QWORD_ALIGNED(address))
- { /* if this is a misaligned read, or if there are no qword readers, just read two dwords */
+ { /* if this is a misaligned read, or if there are no qword readers, just read two dwords */
UINT32 dword0 = read_dword(space, address + 0, apply_translation);
UINT32 dword1 = read_dword(space, address + 4, apply_translation);
@@ -535,7 +535,7 @@ UINT64 debugger_cpu::read_qword(address_space &space, offs_t address, int apply_
result = dword1 | ((UINT64)dword0 << 32);
}
else
- { /* otherwise, this proceeds like the byte case */
+ { /* otherwise, this proceeds like the byte case */
/* all accesses from this point on are for the debugger */
m_debugger_access = true;
@@ -548,11 +548,11 @@ UINT64 debugger_cpu::read_qword(address_space &space, offs_t address, int apply_
result = ~(UINT64)0;
}
else if (space.device().memory().read(space.spacenum(), address, 8, custom))
- { /* if there is a custom read handler, and it returns true, use that value */
+ { /* if there is a custom read handler, and it returns true, use that value */
result = custom;
}
else
- { /* otherwise, call the byte reading function for the translated address */
+ { /* otherwise, call the byte reading function for the translated address */
result = space.read_qword(address);
}
@@ -1528,13 +1528,13 @@ void debugger_cpu::start_hook(device_t *device, bool stop_on_vblank)
if (m_execution_state != EXECUTION_STATE_STOPPED)
{
if (device == m_visiblecpu && osd_ticks() > m_last_periodic_update_time + osd_ticks_per_second() / 4)
- { // check for periodic updates
+ { // check for periodic updates
m_machine.debug_view().update_all();
m_machine.debug_view().flush_osd_updates();
m_last_periodic_update_time = osd_ticks();
}
else if (device == m_breakcpu)
- { // check for pending breaks
+ { // check for pending breaks
m_execution_state = EXECUTION_STATE_STOPPED;
m_breakcpu = nullptr;
}
@@ -2613,7 +2613,7 @@ bool device_debug::comment_export(xml_data_node &curnode)
//-------------------------------------------------
bool device_debug::comment_import(xml_data_node &cpunode,bool is_inline)
-{
+{
// iterate through nodes
for (xml_data_node *datanode = xml_get_sibling(cpunode.child, "comment"); datanode; datanode = xml_get_sibling(datanode->next, "comment"))
{
diff --git a/src/emu/debug/debugcpu.h b/src/emu/debug/debugcpu.h
index 757fc57649a..7dfebf0cb76 100644
--- a/src/emu/debug/debugcpu.h
+++ b/src/emu/debug/debugcpu.h
@@ -603,36 +603,35 @@ private:
/* internal helpers */
void on_vblank(screen_device &device, bool vblank_state);
- running_machine& m_machine;
+ running_machine& m_machine;
- device_t * m_livecpu;
- device_t * m_visiblecpu;
- device_t * m_breakcpu;
+ device_t * m_livecpu;
+ device_t * m_visiblecpu;
+ device_t * m_breakcpu;
- FILE * m_source_file; // script source file
+ FILE * m_source_file; // script source file
- std::unique_ptr<symbol_table> m_symtable; // global symbol table
+ std::unique_ptr<symbol_table> m_symtable; // global symbol table
- bool m_within_instruction_hook;
- bool m_vblank_occurred;
- bool m_memory_modified;
- bool m_debugger_access;
+ bool m_within_instruction_hook;
+ bool m_vblank_occurred;
+ bool m_memory_modified;
+ bool m_debugger_access;
- int m_execution_state;
- device_t * m_stop_when_not_device; // stop execution when the device ceases to be this
+ int m_execution_state;
+ device_t * m_stop_when_not_device; // stop execution when the device ceases to be this
- UINT32 m_bpindex;
- UINT32 m_wpindex;
- UINT32 m_rpindex;
+ UINT32 m_bpindex;
+ UINT32 m_wpindex;
+ UINT32 m_rpindex;
- UINT64 m_wpdata;
- UINT64 m_wpaddr;
+ UINT64 m_wpdata;
+ UINT64 m_wpaddr;
std::unique_ptr<UINT64[]> m_tempvar;
- osd_ticks_t m_last_periodic_update_time;
+ osd_ticks_t m_last_periodic_update_time;
- bool m_comments_loaded;
+ bool m_comments_loaded;
};
#endif
-
diff --git a/src/emu/debug/debughlp.cpp b/src/emu/debug/debughlp.cpp
index d397c726f15..8d66f59d85a 100644
--- a/src/emu/debug/debughlp.cpp
+++ b/src/emu/debug/debughlp.cpp
@@ -1258,7 +1258,7 @@ static const help_item static_help_list[] =
"\n"
" commit[/*] <address>,<comment>\n"
"\n"
- "Adds a string <comment> to the disassembled code at <address> then saves to file. Basically same as comadd + comsave via a single line.\n"
+ "Adds a string <comment> to the disassembled code at <address> then saves to file. Basically same as comadd + comsave via a single line.\n"
"The shortcut for this command is simply '/*'\n"
"\n"
"Examples:\n"