summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/debug/debugcpu.h
diff options
context:
space:
mode:
author Miodrag Milanovic <mmicko@gmail.com>2016-10-22 13:13:17 +0200
committer Miodrag Milanovic <mmicko@gmail.com>2016-10-22 13:13:17 +0200
commitddb290d5f615019c33c42b8d94e5a5254cabcf33 (patch)
treea70f688b0df3acd19da7b1151e5902e3c6af3fa5 /src/emu/debug/debugcpu.h
parent333bff8de64dfaeb98134000412796b4fdef970b (diff)
NOTICE (TYPE NAME CONSOLIDATION)
Use standard uint64_t, uint32_t, uint16_t or uint8_t instead of UINT64, UINT32, UINT16 or UINT8 also use standard int64_t, int32_t, int16_t or int8_t instead of INT64, INT32, INT16 or INT8
Diffstat (limited to 'src/emu/debug/debugcpu.h')
-rw-r--r--src/emu/debug/debugcpu.h162
1 files changed, 81 insertions, 81 deletions
diff --git a/src/emu/debug/debugcpu.h b/src/emu/debug/debugcpu.h
index 7ec39ba4863..fd403c17a74 100644
--- a/src/emu/debug/debugcpu.h
+++ b/src/emu/debug/debugcpu.h
@@ -22,9 +22,9 @@
// CONSTANTS
//**************************************************************************
-const UINT8 WATCHPOINT_READ = 1;
-const UINT8 WATCHPOINT_WRITE = 2;
-const UINT8 WATCHPOINT_READWRITE = WATCHPOINT_READ | WATCHPOINT_WRITE;
+const uint8_t WATCHPOINT_READ = 1;
+const uint8_t WATCHPOINT_WRITE = 2;
+const uint8_t WATCHPOINT_READWRITE = WATCHPOINT_READ | WATCHPOINT_WRITE;
const int COMMENT_VERSION = 1;
@@ -127,7 +127,7 @@ public:
address_space & m_space; // address space
int m_index; // user reported index
bool m_enabled; // enabled?
- UINT8 m_type; // type (read/write)
+ uint8_t m_type; // type (read/write)
offs_t m_address; // start address
offs_t m_length; // length of watch area
parsed_expression m_condition; // condition
@@ -179,8 +179,8 @@ public:
void interrupt_hook(int irqline);
void exception_hook(int exception);
void instruction_hook(offs_t curpc);
- void memory_read_hook(address_space &space, offs_t address, UINT64 mem_mask);
- void memory_write_hook(address_space &space, offs_t address, UINT64 data, UINT64 mem_mask);
+ void memory_read_hook(address_space &space, offs_t address, uint64_t mem_mask);
+ void memory_write_hook(address_space &space, offs_t address, uint64_t data, uint64_t mem_mask);
// hooks into our operations
void set_instruction_hook(debug_instruction_hook_func hook);
@@ -199,7 +199,7 @@ public:
void go_vblank();
void go_interrupt(int irqline = -1);
void go_exception(int exception);
- void go_milliseconds(UINT64 milliseconds);
+ void go_milliseconds(uint64_t milliseconds);
void go_next_device();
template <typename Format, typename... Params>
@@ -240,11 +240,11 @@ public:
void comment_add(offs_t address, const char *comment, rgb_t color);
bool comment_remove(offs_t addr);
const char *comment_text(offs_t addr) const;
- UINT32 comment_count() const { return m_comment_set.size(); }
- UINT32 comment_change_count() const { return m_comment_change; }
+ uint32_t comment_count() const { return m_comment_set.size(); }
+ uint32_t comment_change_count() const { return m_comment_change; }
bool comment_export(xml_data_node &node);
bool comment_import(xml_data_node &node,bool is_inline);
- UINT32 compute_opcode_crc32(offs_t pc) const;
+ uint32_t compute_opcode_crc32(offs_t pc) const;
// history
offs_t history_pc(int index) const;
@@ -259,7 +259,7 @@ public:
void set_track_mem(bool value) { m_track_mem = value; }
offs_t track_mem_pc_from_space_address_data(const address_spacenum& space,
const offs_t& address,
- const UINT64& data) const;
+ const uint64_t& data) const;
void track_mem_data_clear() { m_track_mem_set.clear(); }
// tracing
@@ -279,24 +279,24 @@ private:
// internal helpers
void prepare_for_step_overout(offs_t pc);
- UINT32 dasm_wrapped(std::string &buffer, offs_t pc);
+ uint32_t dasm_wrapped(std::string &buffer, offs_t pc);
// breakpoint and watchpoint helpers
void breakpoint_update_flags();
void breakpoint_check(offs_t pc);
void watchpoint_update_flags(address_space &space);
- void watchpoint_check(address_space &space, int type, offs_t address, UINT64 value_to_write, UINT64 mem_mask);
+ void watchpoint_check(address_space &space, int type, offs_t address, uint64_t value_to_write, uint64_t mem_mask);
void hotspot_check(address_space &space, offs_t address);
// 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_lastinstructioncycles(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);
- static void set_state(symbol_table &table, void *ref, UINT64 value);
+ static uint64_t get_current_pc(symbol_table &table, void *ref);
+ static uint64_t get_cycles(symbol_table &table, void *ref);
+ static uint64_t get_totalcycles(symbol_table &table, void *ref);
+ static uint64_t get_lastinstructioncycles(symbol_table &table, void *ref);
+ static uint64_t get_logunmap(symbol_table &table, void *ref);
+ static void set_logunmap(symbol_table &table, void *ref, uint64_t value);
+ static uint64_t get_state(symbol_table &table, void *ref);
+ static void set_state(symbol_table &table, void *ref, uint64_t value);
// basic device information
device_t & m_device; // device we are attached to
@@ -306,7 +306,7 @@ private:
device_disasm_interface * m_disasm; // disasm interface, if present
// global state
- UINT32 m_flags; // debugging flags for this CPU
+ uint32_t 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
@@ -320,12 +320,12 @@ private:
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
- UINT64 m_total_cycles; // current total cycles
- UINT64 m_last_total_cycles; // last total cycles
+ uint64_t m_total_cycles; // current total cycles
+ uint64_t m_last_total_cycles; // last total cycles
// history
offs_t m_pc_history[HISTORY_SIZE]; // history of recent PCs
- UINT32 m_pc_history_index; // current history index
+ uint32_t m_pc_history_index; // current history index
// breakpoints and watchpoints
breakpoint * m_bplist; // list of breakpoints
@@ -366,7 +366,7 @@ private:
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
+ uint32_t m_count; // number of hits
};
std::vector<hotspot_entry> m_hotspots; // hotspot list
int m_hotspot_threshhold; // threshhold for the number of hits to print
@@ -375,7 +375,7 @@ private:
class dasm_pc_tag
{
public:
- dasm_pc_tag(const offs_t& address, const UINT32& crc);
+ dasm_pc_tag(const offs_t& address, const uint32_t& crc);
// required to be included in a set
bool operator < (const dasm_pc_tag& rhs) const
@@ -386,7 +386,7 @@ private:
}
offs_t m_address; // Stores [nothing] for a given address & crc32
- UINT32 m_crc;
+ uint32_t m_crc;
};
std::set<dasm_pc_tag> m_track_pc_set;
bool m_track_pc;
@@ -395,13 +395,13 @@ private:
class dasm_comment : public dasm_pc_tag
{
public:
- dasm_comment(offs_t address, UINT32 crc, const char *text, rgb_t color);
+ dasm_comment(offs_t address, uint32_t crc, const char *text, rgb_t color);
std::string m_text; // Stores comment text & color for a given address & crc32
rgb_t m_color;
};
std::set<dasm_comment> m_comment_set; // collection of comments
- UINT32 m_comment_change; // change counter for comments
+ uint32_t m_comment_change; // change counter for comments
// memory tracking
class dasm_memory_access
@@ -409,7 +409,7 @@ private:
public:
dasm_memory_access(const address_spacenum& address_space,
const offs_t& address,
- const UINT64& data,
+ const uint64_t& data,
const offs_t& pc);
// required to be included in a set
@@ -426,31 +426,31 @@ private:
// Stores the PC for a given address, memory region, and data value
address_spacenum m_address_space;
offs_t m_address;
- UINT64 m_data;
+ uint64_t m_data;
mutable offs_t m_pc;
};
std::set<dasm_memory_access> m_track_mem_set;
bool m_track_mem;
// 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_t DEBUG_FLAG_OBSERVING = 0x00000001; // observing this CPU
+ static const uint32_t DEBUG_FLAG_HISTORY = 0x00000002; // tracking this CPU's history
+ static const uint32_t DEBUG_FLAG_TRACING = 0x00000004; // tracing this CPU
+ static const uint32_t DEBUG_FLAG_TRACING_OVER = 0x00000008; // tracing this CPU with step over behavior
+ static const uint32_t DEBUG_FLAG_HOOKED = 0x00000010; // per-instruction callback hook
+ static const uint32_t DEBUG_FLAG_STEPPING = 0x00000020; // CPU is single stepping
+ static const uint32_t DEBUG_FLAG_STEPPING_OVER = 0x00000040; // CPU is stepping over a function
+ static const uint32_t DEBUG_FLAG_STEPPING_OUT = 0x00000080; // CPU is stepping out of a function
+ static const uint32_t DEBUG_FLAG_STOP_PC = 0x00000100; // there is a pending stop at cpu->breakpc
+ static const uint32_t DEBUG_FLAG_STOP_INTERRUPT = 0x00000400; // there is a pending stop on the next interrupt
+ static const uint32_t DEBUG_FLAG_STOP_EXCEPTION = 0x00000800; // there is a pending stop on the next exception
+ static const uint32_t DEBUG_FLAG_STOP_VBLANK = 0x00001000; // there is a pending stop on the next VBLANK
+ static const uint32_t DEBUG_FLAG_STOP_TIME = 0x00002000; // there is a pending stop at cpu->stoptime
+ static const uint32_t DEBUG_FLAG_LIVE_BP = 0x00010000; // there are live breakpoints for this CPU
+
+ static const uint32_t DEBUG_FLAG_STEPPING_ANY = DEBUG_FLAG_STEPPING | DEBUG_FLAG_STEPPING_OVER | DEBUG_FLAG_STEPPING_OUT;
+ static const uint32_t DEBUG_FLAG_TRACING_ANY = DEBUG_FLAG_TRACING | DEBUG_FLAG_TRACING_OVER;
+ static const uint32_t 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;
};
@@ -510,46 +510,46 @@ public:
/* ----- debugger memory accessors ----- */
/* return a byte from the specified memory space */
- UINT8 read_byte(address_space &space, offs_t address, int apply_translation);
+ uint8_t read_byte(address_space &space, offs_t address, int apply_translation);
/* return a word from the specified memory space */
- UINT16 read_word(address_space &space, offs_t address, int apply_translation);
+ uint16_t read_word(address_space &space, offs_t address, int apply_translation);
/* return a dword from the specified memory space */
- UINT32 read_dword(address_space &space, offs_t address, int apply_translation);
+ uint32_t read_dword(address_space &space, offs_t address, int apply_translation);
/* return a qword from the specified memory space */
- UINT64 read_qword(address_space &space, offs_t address, int apply_translation);
+ uint64_t read_qword(address_space &space, offs_t address, int apply_translation);
/* return 1,2,4 or 8 bytes from the specified memory space */
- UINT64 read_memory(address_space &space, offs_t address, int size, int apply_translation);
+ uint64_t read_memory(address_space &space, offs_t address, int size, int apply_translation);
/* write a byte to the specified memory space */
- void write_byte(address_space &space, offs_t address, UINT8 data, int apply_translation);
+ void write_byte(address_space &space, offs_t address, uint8_t data, int apply_translation);
/* write a word to the specified memory space */
- void write_word(address_space &space, offs_t address, UINT16 data, int apply_translation);
+ void write_word(address_space &space, offs_t address, uint16_t data, int apply_translation);
/* write a dword to the specified memory space */
- void write_dword(address_space &space, offs_t address, UINT32 data, int apply_translation);
+ void write_dword(address_space &space, offs_t address, uint32_t data, int apply_translation);
/* write a qword to the specified memory space */
- void write_qword(address_space &space, offs_t address, UINT64 data, int apply_translation);
+ void write_qword(address_space &space, offs_t address, uint64_t data, int apply_translation);
/* write 1,2,4 or 8 bytes to the specified memory space */
- void write_memory(address_space &space, offs_t address, UINT64 data, int size, int apply_translation);
+ void write_memory(address_space &space, offs_t address, uint64_t data, int size, int apply_translation);
/* read 1,2,4 or 8 bytes at the given offset from opcode space */
- UINT64 read_opcode(address_space &space, offs_t offset, int size);
+ uint64_t read_opcode(address_space &space, offs_t offset, int size);
// getters
bool within_instruction_hook() const { return m_within_instruction_hook; }
bool memory_modified() const { return m_memory_modified; }
int execution_state() const { return m_execution_state; }
device_t *live_cpu() { return m_livecpu; }
- UINT32 get_breakpoint_index() { return m_bpindex++; }
- UINT32 get_watchpoint_index() { return m_wpindex++; }
- UINT32 get_registerpoint_index() { return m_rpindex++; }
+ uint32_t get_breakpoint_index() { return m_bpindex++; }
+ uint32_t get_watchpoint_index() { return m_wpindex++; }
+ uint32_t get_registerpoint_index() { return m_rpindex++; }
// setters
void set_visible_cpu(device_t * visiblecpu) { m_visiblecpu = visiblecpu; }
@@ -568,26 +568,26 @@ public:
void ensure_comments_loaded();
void reset_transient_flags();
void process_source_file();
- void watchpoint_check(address_space& space, int type, offs_t address, UINT64 value_to_write, UINT64 mem_mask, device_debug::watchpoint** wplist);
+ void watchpoint_check(address_space& space, int type, offs_t address, uint64_t value_to_write, uint64_t mem_mask, device_debug::watchpoint** wplist);
private:
static const size_t NUM_TEMP_VARIABLES;
/* expression handlers */
- UINT64 expression_read_memory(void *param, const char *name, expression_space space, UINT32 address, int size);
- UINT64 expression_read_program_direct(address_space &space, int opcode, offs_t address, int size);
- UINT64 expression_read_memory_region(const char *rgntag, offs_t address, int size);
- void expression_write_memory(void *param, const char *name, expression_space space, UINT32 address, int size, UINT64 data);
- void expression_write_program_direct(address_space &space, int opcode, offs_t address, int size, UINT64 data);
- void expression_write_memory_region(const char *rgntag, offs_t address, int size, UINT64 data);
+ uint64_t expression_read_memory(void *param, const char *name, expression_space space, uint32_t address, int size);
+ uint64_t expression_read_program_direct(address_space &space, int opcode, offs_t address, int size);
+ uint64_t expression_read_memory_region(const char *rgntag, offs_t address, int size);
+ void expression_write_memory(void *param, const char *name, expression_space space, uint32_t address, int size, uint64_t data);
+ void expression_write_program_direct(address_space &space, int opcode, offs_t address, int size, uint64_t data);
+ void expression_write_memory_region(const char *rgntag, offs_t address, int size, uint64_t data);
expression_error::error_code expression_validate(void *param, const char *name, expression_space space);
device_t* expression_get_device(const char *tag);
/* variable getters/setters */
- UINT64 get_cpunum(symbol_table &table, void *ref);
- UINT64 get_beamx(symbol_table &table, void *ref);
- UINT64 get_beamy(symbol_table &table, void *ref);
- UINT64 get_frame(symbol_table &table, void *ref);
+ uint64_t get_cpunum(symbol_table &table, void *ref);
+ uint64_t get_beamx(symbol_table &table, void *ref);
+ uint64_t get_beamy(symbol_table &table, void *ref);
+ uint64_t get_frame(symbol_table &table, void *ref);
/* internal helpers */
void on_vblank(screen_device &device, bool vblank_state);
@@ -610,13 +610,13 @@ private:
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_t m_bpindex;
+ uint32_t m_wpindex;
+ uint32_t m_rpindex;
- UINT64 m_wpdata;
- UINT64 m_wpaddr;
- std::unique_ptr<UINT64[]> m_tempvar;
+ uint64_t m_wpdata;
+ uint64_t m_wpaddr;
+ std::unique_ptr<uint64_t[]> m_tempvar;
osd_ticks_t m_last_periodic_update_time;