My Oracle Support Banner

Solaris Studio Debugger Dbx Stops Catching Exceptions After Fix Command, Works Incorrectly with "try, catch" (Doc ID 1641979.1)

Last updated on MARCH 31, 2019

Applies to:

Oracle Solaris Studio - Version Sun Studio 12 Update 1 and later
Information in this document applies to any platform.


1. The program must be built in its initial form, and then edited, then loaded and run in dbx.

2. Then do the 'fix' command from within dbx to rebuild a.out from the modified test.cpp, then run again (from within dbx).

Here is an example :

After the 'fix' command is used in dbx, and the program is run again, exceptions are no longer caught.

Compile test.cpp as is, producing a.out:

$ CC -g test.cpp

Now, edit test.cpp.

Then, load a.out in dbx and run, then fix test.cpp from within dbx and run again:

$dbx a.out
(dbx) run                                                                    
Running: a.out
(process id 7046)
Resource-intensive calculation...
Exception caught! Error: Did you catch me?
execution completed, exit code is 0
(dbx)  fix test.cpp
fixing "test.cpp" ......
(dbx) run         
Running: a.out
(process id 11531)
refixing "test.cpp" ......
Resource-intensive calculation...
More resource-intensive calculation...
Exception of type <unknown type> is unhandled <====== BUG
stopped in __exdbg_notify_of_throw at 0xff3349bc
0xff3349bc: __exdbg_notify_of_throw       :     retl     
Current function is throwingFunc
    3   void throwingFunc() { throw std::runtime_error( "Did you catch me?" ); }
(dbx) quit

As you can see, after 'fix', the exception is no longer caught.


To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.