catch-throw conditions?
Andrew STUBBS
andrew.stubbs@st.com
Fri Feb 22 11:28:00 GMT 2008
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
Andrew
(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:
catch throw
commands
if myerror != 42
continue
end
end
)
More information about the Gdb
mailing list