"Clear all breakpoints" code question

Vladimir Prus ghost at cs.msu.su
Tue Nov 29 08:31:08 UTC 2005


Hi Andras,

> If you use the attached version with debug outputs (and enable the 24000
> debug area) you will see:
>
> Quanta: numRows: 6
> Quanta: Removing row: 5
> Quanta: removeBreakpoint: remove row: 5
> Quanta: Removing row: 4 <-- starting from here the breakpoints are not
> really removed!
> Quanta: Removing row: 3
......
> I can reproduce this if I set/clear the breakpoints while the debugger
> is running. So actually, the problem might lie in the
>    if (bp->isPending() && !bp->isDbgProcessing())
> check.
>
> And might workaround seems to not work in every case. :-( Altough the
> above log suggest that all breakpoints were removing, in the GDB
> console I can verify that actually 3 are active. Maybe gdb must be
> stopped before removing the breakpoint? You know that code better, so
> hopefully you can find a real solution.

In fact, gdb *is* stopped before clearing breakpoints. The real problem was 
more compilcated. For all rows, removeBreakpoint was called, and each time it 
correctly issued "del breakpoint" to gdb, and an "info breakpoints" command. 
But when handling reply from "info breakpoints", KDevelop used calls to the 
same "removedBreakpoints" to actually remove the table row, and in some 
cases, instead of removing the row, removeBreakpoints decided to send "del 
breakpoint" command agian, for a breakpoin that's already removed. Which 
caused row to stay until program is stopped next time.

Fixed in revision 483871.


- Volodya






More information about the KDevelop-devel mailing list