diff options
author | 2019-09-10 15:11:00 -0400 | |
---|---|---|
committer | 2019-09-10 15:11:02 -0400 | |
commit | 53df4f447db0408d00bdcbee3105e013bdd19c3a (patch) | |
tree | 0ccccacae81b902088f16cf704345fa53b3b252b /src/osd/modules/debugger/debuggdbstub.cpp | |
parent | e52c9cc290a710c11fef4a08c715e46d04db9f07 (diff) |
Use std::forward_list for breakpoint and registerpoint lists (nw)
Diffstat (limited to 'src/osd/modules/debugger/debuggdbstub.cpp')
-rw-r--r-- | src/osd/modules/debugger/debuggdbstub.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/osd/modules/debugger/debuggdbstub.cpp b/src/osd/modules/debugger/debuggdbstub.cpp index 4028dd3b994..4c7e4e3707e 100644 --- a/src/osd/modules/debugger/debuggdbstub.cpp +++ b/src/osd/modules/debugger/debuggdbstub.cpp @@ -977,13 +977,9 @@ debug_gdbstub::cmd_reply debug_gdbstub::handle_s(const char *buf) //------------------------------------------------------------------------- static bool remove_breakpoint(device_debug *debug, uint64_t address, int /*kind*/) { - device_debug::breakpoint *bp = debug->breakpoint_first(); - while ( bp != nullptr ) - { - if ( bp->address() == address ) - return debug->breakpoint_clear(bp->index()); - bp = bp->next(); - } + const device_debug::breakpoint *bp = debug->breakpoint_find(address); + if (bp != nullptr) + return debug->breakpoint_clear(bp->index()); return false; } |