summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/debug/debugcpu.h
diff options
context:
space:
mode:
author AJR <ajrhacker@users.noreply.github.com>2019-09-10 15:11:00 -0400
committer AJR <ajrhacker@users.noreply.github.com>2019-09-10 15:11:02 -0400
commit53df4f447db0408d00bdcbee3105e013bdd19c3a (patch)
tree0ccccacae81b902088f16cf704345fa53b3b252b /src/emu/debug/debugcpu.h
parente52c9cc290a710c11fef4a08c715e46d04db9f07 (diff)
Use std::forward_list for breakpoint and registerpoint lists (nw)
Diffstat (limited to 'src/emu/debug/debugcpu.h')
-rw-r--r--src/emu/debug/debugcpu.h13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/emu/debug/debugcpu.h b/src/emu/debug/debugcpu.h
index 0feeee51386..26653eb2baa 100644
--- a/src/emu/debug/debugcpu.h
+++ b/src/emu/debug/debugcpu.h
@@ -57,7 +57,6 @@ public:
// getters
const device_debug *debugInterface() const { return m_debugInterface; }
- breakpoint *next() const { return m_next; }
int index() const { return m_index; }
bool enabled() const { return m_enabled; }
offs_t address() const { return m_address; }
@@ -71,7 +70,6 @@ public:
// internals
bool hit(offs_t pc);
const device_debug * m_debugInterface; // the interface we were created from
- breakpoint * m_next; // next in the list
int m_index; // user reported index
bool m_enabled; // enabled?
offs_t m_address; // execution address
@@ -147,7 +145,6 @@ public:
registerpoint(symbol_table &symbols, int index, const char *condition, const char *action = nullptr);
// getters
- registerpoint *next() const { return m_next; }
int index() const { return m_index; }
bool enabled() const { return m_enabled; }
const char *condition() const { return m_condition.original_string(); }
@@ -157,7 +154,6 @@ public:
// internals
bool hit();
- registerpoint * m_next; // next in the list
int m_index; // user reported index
bool m_enabled; // enabled?
parsed_expression m_condition; // condition
@@ -217,7 +213,8 @@ public:
}
// breakpoints
- breakpoint *breakpoint_first() const { return m_bplist; }
+ const std::forward_list<breakpoint> &breakpoint_list() const { return m_bplist; }
+ const breakpoint *breakpoint_find(offs_t address) const;
int breakpoint_set(offs_t address, const char *condition = nullptr, const char *action = nullptr);
bool breakpoint_clear(int index);
void breakpoint_clear_all();
@@ -237,7 +234,7 @@ public:
watchpoint *triggered_watchpoint(void) { watchpoint *ret = m_triggered_watchpoint; m_triggered_watchpoint = nullptr; return ret; }
// registerpoints
- registerpoint *registerpoint_first() const { return m_rplist; }
+ const std::forward_list<registerpoint> &registerpoint_list() const { return m_rplist; }
int registerpoint_set(const char *condition, const char *action = nullptr);
bool registerpoint_clear(int index);
void registerpoint_clear_all();
@@ -340,9 +337,9 @@ private:
u32 m_pc_history_index; // current history index
// breakpoints and watchpoints
- breakpoint * m_bplist; // list of breakpoints
+ std::forward_list<breakpoint> m_bplist; // list of breakpoints
std::vector<std::vector<std::unique_ptr<watchpoint>>> m_wplist; // watchpoint lists for each address space
- registerpoint * m_rplist; // list of registerpoints
+ std::forward_list<registerpoint> m_rplist; // list of registerpoints
breakpoint * m_triggered_breakpoint; // latest breakpoint that was triggered
watchpoint * m_triggered_watchpoint; // latest watchpoint that was triggered