This is the mail archive of the
mailing list for the GDB project.
Re: catch-throw conditions?
Craig Miller wrote:
Does anyone know if there is a way to set a condition on breakpoints
created using the "catch throw" command? Specifically to be able to
only cause a break when a specific C++ Exception is thrown?
In general, conditions work like this (not that the help command will
tell you so):
catch throw if myerror == 42
I'm not sure where the exception flavour is kept though.
Hope that helps
(Actually, on the GDB I have the conditions do not show on info break,
and I don't have any C++ code handy to test, so it might be broken. If
the condition doesn't work then try this:
if myerror != 42