Skip Navigation Links | |
Exit Print View | |
Oracle Solaris Studio 12.3: Debugging a Program With dbx Oracle Solaris Studio 12.3 Information Library |
Debugging a Core File in the Same Operating Environment
If Your Core File Is Truncated
Debugging a Mismatched Core File
Eliminating Shared Library Problems
Mapping the Compile-time Directory to the Debug-time Directory
Setting dbx Environment Variables
Creating Your Own dbx Commands
Compiling a Program for Debugging
Creating a Separate Debug File
Code Compiled Without the -g Option
Shared Libraries Require the -g Option for Full dbx Support
Killing a Program Without Terminating the Session
Saving and Restoring a Debugging Run
Saving a Series of Debugging Runs as Checkpoints
Saving and Restoring Using replay
4. Viewing and Navigating To Code
5. Controlling Program Execution
6. Setting Breakpoints and Traces
8. Evaluating and Displaying Data
11. Debugging Multithreaded Applications
16. Debugging Fortran Using dbx
17. Debugging a Java Application With dbx
18. Debugging at the Machine-Instruction Level
19. Using dbx With the Korn Shell
When you start dbx, if you do not specify the -S option, dbx looks for the installed startup file, dbxrc, in the directory /installation_directory/lib. (The default installation_directory is /opt/solstudio12.2 on Solaris platforms and /opt/oracle/solstudio12.2 on Linux platforms.) If your Oracle Solaris Studio software is not installed in the default directory, dbx derives the path to the dbxrc file from the path to the dbx executable.
Then dbx searches for a .dbxrc file in the current directory, then in $HOME. You can specify a different startup file than .dbxrc explicitly by specifying the file path using the -s option. For more information, see Using the dbx Initialization File.
A startup file may contain any dbx command, and commonly contains the alias command, dbxenv command, pathmap command, and Korn shell function definitions. However, certain commands require that a program has been loaded or a process has been attached to. All startup files are loaded before the program or process is loaded. The startup file may also source other files using the source or .(period) command. You can also use the startup file to set other dbx options.
As dbx loads program information, it prints a series of messages, such as Reading filename.
Once the program is finished loading, dbx is in a ready state, visiting the “main” block of the program (for C or C++: main(); for Fortran 95: MAIN()). Typically, you set a breakpoint (for example, stop in main) and then issue a run command for a C program.