diff options
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; } |