User forums > Using Code::Blocks
gdb stop on c++ exceptions
mandrav:
We could do as many hacks as we want to locate the source line of interest but, please, do _not_ display the line indicator (yellow arrow) on the wrong function. That is supposed to show the line that would be executed next, not one (or more) frames back in execution time...
mandrav:
--- Quote from: mandrav on April 24, 2008, 11:34:48 am ---We could do as many hacks as we want to locate the source line of interest but, please, do _not_ display the line indicator (yellow arrow) on the wrong function. That is supposed to show the line that would be executed next, not one (or more) frames back in execution time...
--- End quote ---
Oh well, no need to argue about that. I added two new debugger options:
[*] Catch C++ exceptions, and
[*] When breaking, auto-switch to first frame with valid source info
In r5018 :).
Note that even if auto-switch is off, the debugger will still "focus" on the first valid source line in the stack frame. It's just that the frame won't be switched.
Another note: this auto-switch stuff will work for any reason the debugger would break, not just C++ exceptions ;).
thomas:
Works great most of the time, thank you :) Sometimes, it seems to have no valid frame at all, though I can't reproduce why and when. Other than that: cool, really cool.
Putting the arrow at the previous frame is incorrect behaviour, that's right, but for the particular case of breaking on an exception, it's immensely useful being pointed to "here, there be exception". So since we don't have another marker (like a small flaming "E" or something), I guess that can be excused :)
Navigation
[0] Message Index
[*] Previous page
Go to full version