Oracle® Solaris Studio 12.4: Debugging a Program With dbx

Exit Print View

Updated: January 2015
 
 

How Fix and Continue Operates

Before using the fix command you must edit the source. After saving changes, issue the fix command. For information on the fix command, see fix Command.

Once you have invoked the fix command, dbx calls the compiler with the appropriate compiler options. The modified files are compiled and shared object (.so) files are created. Semantic tests are done by comparing the old and new files.

The new object file is linked to your running process using the runtime linker. If the function on top of the stack is being fixed, the new stopped-in function is the beginning of the same line in the new function. All the breakpoints in the old file are moved to the new file.

You can use fix and continue on files that have been compiled with or without debugging information, but for files originally compiled without debugging information,the functionality of the fix command and the cont command have some limitations. See the -g option description in fix Command for more information.

You can fix shared objects (.so) files, but they must be opened in a special mode. You can use either RTLD_NOW|RTLD_GLOBAL or RTLD_LAZY|RTLD_GLOBAL in the call to the dlopen function.

The precompiled headers feature of the Oracle Solaris Studio C and C++ compilers requires that the compiler options be the same when recompiling. Because the fix command changes the compiler options slightly, do not use the fix command on object files that were created using precompiled headers.