diff options
Diffstat (limited to 'src/emu/debug/points.h')
-rw-r--r-- | src/emu/debug/points.h | 54 |
1 files changed, 46 insertions, 8 deletions
diff --git a/src/emu/debug/points.h b/src/emu/debug/points.h index 84cdad7720b..42abd46398f 100644 --- a/src/emu/debug/points.h +++ b/src/emu/debug/points.h @@ -36,7 +36,7 @@ public: int index, offs_t address, const char *condition = nullptr, - const char *action = nullptr); + std::string_view action = {}); // getters const device_debug *debugInterface() const { return m_debugInterface; } @@ -44,7 +44,7 @@ public: bool enabled() const { return m_enabled; } offs_t address() const { return m_address; } const char *condition() const { return m_condition.original_string(); } - const char *action() const { return m_action.c_str(); } + const std::string &action() const { return m_action; } // setters void setEnabled(bool value) { m_enabled = value; } // FIXME: need to update breakpoint flags but it's a private method @@ -77,7 +77,7 @@ public: offs_t address, offs_t length, const char *condition = nullptr, - const char *action = nullptr); + std::string_view action = {}); ~debug_watchpoint(); // getters @@ -102,8 +102,8 @@ private: void triggered(read_or_write type, offs_t address, u64 data, u64 mem_mask); device_debug * m_debugInterface; // the interface we were created from - memory_passthrough_handler *m_phr; // passthrough handler reference, read access - memory_passthrough_handler *m_phw; // passthrough handler reference, write access + memory_passthrough_handler m_phr; // passthrough handler reference, read access + memory_passthrough_handler m_phw; // passthrough handler reference, write access address_space & m_space; // address space int m_index; // user reported index bool m_enabled; // enabled? @@ -112,7 +112,7 @@ private: offs_t m_length; // length of watch area parsed_expression m_condition; // condition std::string m_action; // action - int m_notifier; // address map change notifier id + util::notifier_subscription m_notifier; // address map change notifier ID offs_t m_start_address[3]; // the start addresses of the checks to install offs_t m_end_address[3]; // the end addresses @@ -128,13 +128,13 @@ class debug_registerpoint public: // construction/destruction - debug_registerpoint(symbol_table &symbols, int index, const char *condition, const char *action = nullptr); + debug_registerpoint(symbol_table &symbols, int index, const char *condition, std::string_view action = {}); // getters int index() const { return m_index; } bool enabled() const { return m_enabled; } const char *condition() const { return m_condition.original_string(); } - const char *action() const { return m_action.c_str(); } + const std::string &action() const { return m_action; } private: // internals @@ -146,4 +146,42 @@ private: std::string m_action; // action }; +// ======================> debug_exceptionpoint + +class debug_exceptionpoint +{ + friend class device_debug; + +public: + // construction/destruction + debug_exceptionpoint( + device_debug* debugInterface, + symbol_table &symbols, + int index, + int type, + const char *condition = nullptr, + std::string_view action = {}); + + // getters + const device_debug *debugInterface() const { return m_debugInterface; } + int index() const { return m_index; } + bool enabled() const { return m_enabled; } + int type() const { return m_type; } + const char *condition() const { return m_condition.original_string(); } + const std::string &action() const { return m_action; } + + // setters + void setEnabled(bool value) { m_enabled = value; } + +private: + // internals + bool hit(int exception); + const device_debug * m_debugInterface; // the interface we were created from + int m_index; // user reported index + bool m_enabled; // enabled? + int m_type; // exception type + parsed_expression m_condition; // condition + std::string m_action; // action +}; + #endif // MAME_EMU_DEBUG_POINTS_H |