diff options
Diffstat (limited to 'src/emu/debug/debugcpu.h')
-rw-r--r-- | src/emu/debug/debugcpu.h | 168 |
1 files changed, 84 insertions, 84 deletions
diff --git a/src/emu/debug/debugcpu.h b/src/emu/debug/debugcpu.h index 1805b8101d4..6ec0a080bb0 100644 --- a/src/emu/debug/debugcpu.h +++ b/src/emu/debug/debugcpu.h @@ -49,11 +49,11 @@ // CONSTANTS //************************************************************************** -const UINT8 WATCHPOINT_READ = 1; -const UINT8 WATCHPOINT_WRITE = 2; -const UINT8 WATCHPOINT_READWRITE = WATCHPOINT_READ | WATCHPOINT_WRITE; +const UINT8 WATCHPOINT_READ = 1; +const UINT8 WATCHPOINT_WRITE = 2; +const UINT8 WATCHPOINT_READWRITE = WATCHPOINT_READ | WATCHPOINT_WRITE; -const int COMMENT_VERSION = 1; +const int COMMENT_VERSION = 1; @@ -93,12 +93,12 @@ public: // internals bool hit(offs_t pc); - breakpoint * m_next; // next in the list - int m_index; // user reported index - UINT8 m_enabled; // enabled? - offs_t m_address; // execution address - parsed_expression m_condition; // condition - astring m_action; // action + breakpoint * m_next; // next in the list + int m_index; // user reported index + UINT8 m_enabled; // enabled? + offs_t m_address; // execution address + parsed_expression m_condition; // condition + astring m_action; // action }; // watchpoint class @@ -125,15 +125,15 @@ public: // internals bool hit(int type, offs_t address, int size); - watchpoint * m_next; // next in the list - address_space & m_space; // address space - int m_index; // user reported index - bool m_enabled; // enabled? - UINT8 m_type; // type (read/write) - offs_t m_address; // start address - offs_t m_length; // length of watch area - parsed_expression m_condition; // condition - astring m_action; // action + watchpoint * m_next; // next in the list + address_space & m_space; // address space + int m_index; // user reported index + bool m_enabled; // enabled? + UINT8 m_type; // type (read/write) + offs_t m_address; // start address + offs_t m_length; // length of watch area + parsed_expression m_condition; // condition + astring m_action; // action }; public: @@ -250,39 +250,39 @@ private: static void set_state(symbol_table &table, void *ref, UINT64 value); // basic device information - device_t & m_device; // device we are attached to - device_execute_interface *m_exec; // execute interface, if present - device_memory_interface *m_memory; // memory interface, if present - device_state_interface *m_state; // state interface, if present - device_disasm_interface *m_disasm; // disasm interface, if present + device_t & m_device; // device we are attached to + device_execute_interface *m_exec; // execute interface, if present + device_memory_interface *m_memory; // memory interface, if present + device_state_interface *m_state; // state interface, if present + device_disasm_interface *m_disasm; // disasm interface, if present // global state - UINT32 m_flags; // debugging flags for this CPU - symbol_table m_symtable; // symbol table for expression evaluation - debug_instruction_hook_func m_instrhook; // per-instruction callback hook + UINT32 m_flags; // debugging flags for this CPU + symbol_table m_symtable; // symbol table for expression evaluation + debug_instruction_hook_func m_instrhook; // per-instruction callback hook // disassembly - dasm_override_func m_dasm_override; // pointer to provided override function - UINT8 m_opwidth; // width of an opcode + dasm_override_func m_dasm_override; // pointer to provided override function + UINT8 m_opwidth; // width of an opcode // stepping information - offs_t m_stepaddr; // step target address for DEBUG_FLAG_STEPPING_OVER - int m_stepsleft; // number of steps left until done + offs_t m_stepaddr; // step target address for DEBUG_FLAG_STEPPING_OVER + int m_stepsleft; // number of steps left until done // execution information - offs_t m_stopaddr; // stop address for DEBUG_FLAG_STOP_PC - attotime m_stoptime; // stop time for DEBUG_FLAG_STOP_TIME - int m_stopirq; // stop IRQ number for DEBUG_FLAG_STOP_INTERRUPT - int m_stopexception; // stop exception number for DEBUG_FLAG_STOP_EXCEPTION - attotime m_endexectime; // ending time of the current execution + offs_t m_stopaddr; // stop address for DEBUG_FLAG_STOP_PC + attotime m_stoptime; // stop time for DEBUG_FLAG_STOP_TIME + int m_stopirq; // stop IRQ number for DEBUG_FLAG_STOP_INTERRUPT + int m_stopexception; // stop exception number for DEBUG_FLAG_STOP_EXCEPTION + attotime m_endexectime; // ending time of the current execution // history - offs_t m_pc_history[HISTORY_SIZE]; // history of recent PCs - UINT32 m_pc_history_index; // current history index + offs_t m_pc_history[HISTORY_SIZE]; // history of recent PCs + UINT32 m_pc_history_index; // current history index // breakpoints and watchpoints - breakpoint * m_bplist; // list of breakpoints - watchpoint * m_wplist[ADDRESS_SPACES]; // watchpoint lists for each address space + breakpoint * m_bplist; // list of breakpoints + watchpoint * m_wplist[ADDRESS_SPACES]; // watchpoint lists for each address space // tracing class tracer @@ -298,30 +298,30 @@ private: private: static const int TRACE_LOOPS = 64; - device_debug & m_debug; // reference to our owner - FILE & m_file; // tracing file for this CPU - astring m_action; // action to perform during a trace - offs_t m_history[TRACE_LOOPS]; // history of recent PCs - int m_loops; // number of instructions in a loop - int m_nextdex; // next index - bool m_trace_over; // true if we're tracing over - offs_t m_trace_over_target; // target for tracing over - // (0 = not tracing over, - // ~0 = not currently tracing over) + device_debug & m_debug; // reference to our owner + FILE & m_file; // tracing file for this CPU + astring m_action; // action to perform during a trace + offs_t m_history[TRACE_LOOPS]; // history of recent PCs + int m_loops; // number of instructions in a loop + int m_nextdex; // next index + bool m_trace_over; // true if we're tracing over + offs_t m_trace_over_target; // target for tracing over + // (0 = not tracing over, + // ~0 = not currently tracing over) }; - tracer * m_trace; // tracer state + tracer * m_trace; // tracer state // hotspots struct hotspot_entry { - offs_t m_access; // access address - offs_t m_pc; // PC of the access - address_space * m_space; // space where the access occurred - UINT32 m_count; // number of hits + offs_t m_access; // access address + offs_t m_pc; // PC of the access + address_space * m_space; // space where the access occurred + UINT32 m_count; // number of hits }; - hotspot_entry * m_hotspots; // hotspot list - int m_hotspot_count; // number of hotspots - int m_hotspot_threshhold; // threshhold for the number of hits to print + hotspot_entry * m_hotspots; // hotspot list + int m_hotspot_count; // number of hotspots + int m_hotspot_threshhold; // threshhold for the number of hits to print // comments class dasm_comment @@ -331,34 +331,34 @@ private: dasm_comment *next() const { return m_next; } - dasm_comment * m_next; // next comment in the list - offs_t m_address; // address in question - rgb_t m_color; // color to use - UINT32 m_crc; // CRC of code - astring m_text; // text + dasm_comment * m_next; // next comment in the list + offs_t m_address; // address in question + rgb_t m_color; // color to use + UINT32 m_crc; // CRC of code + astring m_text; // text }; - simple_list<dasm_comment> m_comment_list; // list of comments - UINT32 m_comment_change; // change counter for comments + simple_list<dasm_comment> m_comment_list; // list of comments + UINT32 m_comment_change; // change counter for comments // internal flag values - static const UINT32 DEBUG_FLAG_OBSERVING = 0x00000001; // observing this CPU - static const UINT32 DEBUG_FLAG_HISTORY = 0x00000002; // tracking this CPU's history - static const UINT32 DEBUG_FLAG_TRACING = 0x00000004; // tracing this CPU - static const UINT32 DEBUG_FLAG_TRACING_OVER = 0x00000008; // tracing this CPU with step over behavior - static const UINT32 DEBUG_FLAG_HOOKED = 0x00000010; // per-instruction callback hook - static const UINT32 DEBUG_FLAG_STEPPING = 0x00000020; // CPU is single stepping - static const UINT32 DEBUG_FLAG_STEPPING_OVER = 0x00000040; // CPU is stepping over a function - static const UINT32 DEBUG_FLAG_STEPPING_OUT = 0x00000080; // CPU is stepping out of a function - static const UINT32 DEBUG_FLAG_STOP_PC = 0x00000100; // there is a pending stop at cpu->breakpc - static const UINT32 DEBUG_FLAG_STOP_INTERRUPT = 0x00000400; // there is a pending stop on the next interrupt - static const UINT32 DEBUG_FLAG_STOP_EXCEPTION = 0x00000800; // there is a pending stop on the next exception - static const UINT32 DEBUG_FLAG_STOP_VBLANK = 0x00001000; // there is a pending stop on the next VBLANK - static const UINT32 DEBUG_FLAG_STOP_TIME = 0x00002000; // there is a pending stop at cpu->stoptime - static const UINT32 DEBUG_FLAG_LIVE_BP = 0x00010000; // there are live breakpoints for this CPU - - static const UINT32 DEBUG_FLAG_STEPPING_ANY = DEBUG_FLAG_STEPPING | DEBUG_FLAG_STEPPING_OVER | DEBUG_FLAG_STEPPING_OUT; - static const UINT32 DEBUG_FLAG_TRACING_ANY = DEBUG_FLAG_TRACING | DEBUG_FLAG_TRACING_OVER; - static const UINT32 DEBUG_FLAG_TRANSIENT = DEBUG_FLAG_STEPPING_ANY | DEBUG_FLAG_STOP_PC | + static const UINT32 DEBUG_FLAG_OBSERVING = 0x00000001; // observing this CPU + static const UINT32 DEBUG_FLAG_HISTORY = 0x00000002; // tracking this CPU's history + static const UINT32 DEBUG_FLAG_TRACING = 0x00000004; // tracing this CPU + static const UINT32 DEBUG_FLAG_TRACING_OVER = 0x00000008; // tracing this CPU with step over behavior + static const UINT32 DEBUG_FLAG_HOOKED = 0x00000010; // per-instruction callback hook + static const UINT32 DEBUG_FLAG_STEPPING = 0x00000020; // CPU is single stepping + static const UINT32 DEBUG_FLAG_STEPPING_OVER = 0x00000040; // CPU is stepping over a function + static const UINT32 DEBUG_FLAG_STEPPING_OUT = 0x00000080; // CPU is stepping out of a function + static const UINT32 DEBUG_FLAG_STOP_PC = 0x00000100; // there is a pending stop at cpu->breakpc + static const UINT32 DEBUG_FLAG_STOP_INTERRUPT = 0x00000400; // there is a pending stop on the next interrupt + static const UINT32 DEBUG_FLAG_STOP_EXCEPTION = 0x00000800; // there is a pending stop on the next exception + static const UINT32 DEBUG_FLAG_STOP_VBLANK = 0x00001000; // there is a pending stop on the next VBLANK + static const UINT32 DEBUG_FLAG_STOP_TIME = 0x00002000; // there is a pending stop at cpu->stoptime + static const UINT32 DEBUG_FLAG_LIVE_BP = 0x00010000; // there are live breakpoints for this CPU + + static const UINT32 DEBUG_FLAG_STEPPING_ANY = DEBUG_FLAG_STEPPING | DEBUG_FLAG_STEPPING_OVER | DEBUG_FLAG_STEPPING_OUT; + static const UINT32 DEBUG_FLAG_TRACING_ANY = DEBUG_FLAG_TRACING | DEBUG_FLAG_TRACING_OVER; + static const UINT32 DEBUG_FLAG_TRANSIENT = DEBUG_FLAG_STEPPING_ANY | DEBUG_FLAG_STOP_PC | DEBUG_FLAG_STOP_INTERRUPT | DEBUG_FLAG_STOP_EXCEPTION | DEBUG_FLAG_STOP_VBLANK | DEBUG_FLAG_STOP_TIME; }; @@ -388,7 +388,7 @@ device_t *debug_cpu_get_visible_cpu(running_machine &machine); int debug_cpu_within_instruction_hook(running_machine &machine); /* return TRUE if the current execution state is stopped */ -int debug_cpu_is_stopped(running_machine &machine); +int debug_cpu_is_stopped(running_machine &machine); |