]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Have DAP handle multiple breakpoints at same location
authorTom Tromey <tromey@adacore.com>
Tue, 4 Nov 2025 21:07:12 +0000 (14:07 -0700)
committerTom Tromey <tromey@adacore.com>
Fri, 14 Nov 2025 19:21:13 +0000 (12:21 -0700)
commit4cea26197d336ec71e61bf2c705518b8751fc385
tree438abcd9240c91152bb8dea8f4308d79827f3d54
parent20c1b065aaa1854597abc8ef7a229e51bc9f2b2e
Have DAP handle multiple breakpoints at same location

A user pointed out that if multiple breakpoints are set at the same
spot, in DAP mode, then changing the breakpoints won't reset all of
them.

The problem here is that the breakpoint map only stores a single
breakpoint, so if two breakpoints have the same key, only one will be
stored.  Then, when breakpoints are changed, the "missing" breakpoint
will not be deleted.

The fix is to change the map to store a list of breakpoints.

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=33467
Reviewed-By: Ciaran Woodward <ciaranwoodward@xmos.com>
gdb/python/lib/gdb/dap/breakpoint.py
gdb/testsuite/gdb.dap/multi-break.c [new file with mode: 0644]
gdb/testsuite/gdb.dap/multi-break.exp [new file with mode: 0644]