Sun Studio 12: Debugging a Program With dbx

intercept Command

The intercept command throws (C++ exceptions) of the given type (C++ only). It is valid only in native mode.

dbx stops when the type of a thrown exception matches a type on the intercept list unless the type of the exception also matches a type on the excluded list. A thrown exception for which there is no matching catch is called an “unhandled” throw. A thrown exception that doesn’t match the exception specification of the function it is thrown from is called an “unexpected” throw.

Unhandled and unexpected throws are intercepted by default.


intercept -x excluded_typename [, excluded_typename ...]

Add throws of excluded_typename to the excluded list.

intercept -a[ll] -x excluded_typename [, excluded_typename ...]

Add all types except excluded_typename to the intercept list.

intercept -s[et] [intercepted_typename [, intercepted_typename ...]] [-x excluded_typename [, excluded_typename]]

Clear both the intercept list and the excluded list, and set the lists to intercept or exclude only throws of the specified types.


List intercepted types.


included_typename and excluded_typename are exception type specifications such as List <int> or unsigned short.