Debugging a Program With dbx

Debugging Without the Presence of .o Files

Programs compiled with -g -c store debugging information for each module in the module's .o file. Auto-Read requires the continued presence of the program and shared library .o files.

In circumstances where it is not feasible to keep program .o files or shared library .o files for modules that you want to debug, compile the program using the compiler -xs option (use this option in addition to -g). You can have some modules compiled with -xs and some without. The -xs option instructs the compiler to have the linker place all of the debugging information in the program executable; therefore the .o files do not have to be present in order to debug those modules.

In dbx 4.0, the debugging information for modules compiled with the -xs option is loaded during dbx startup. For a large program compiled with -xs, this may cause dbx to start slowly.

In dbx 5.0, the loading of debugging information for modules compiled with -xs is also delayed in the same way as the debugging information stored in .o files. However, you can instruct dbx to load the debugging information for modules compiled with -xs during startup. The dbx environment variable delay_xs lets you turn off the delayed loading of debugging information for modules compiled with -xs. To set the environment variable, add this line to your .dbxrc file:

dbxenv delay_xs off