Debugging a Program With dbx

Command Reference

The fix command takes the following options:


fix [options]
[file1, file2
,...]

-a

Fixes all modified files. 

-f

Forces fixing the file, even if the source was not changed. 

-c

Prints the compilation line, which may include some options added internally for use by dbx.

-g

Strips -O flags from the compilation line and adds the -g flag to it.

-n

Sets a no execution mode. Use this option when you want to list the source files to be fixed without actually fixing them. 

file1, file2,...

Specifies a list of modified source files to fix. 

If fix is invoked with an option other than -a and without a filename argument, only the current modified source file is fixed.


Note -

Sometimes it may be necessary to modify a header (.h) file as well as a source file. To be sure that the modified header file is accessed by all source files in the program that include it, you must give as an argument to the fix command a list of all the source files that include that header file. If you do not include the list of source files, only the primary source file is recompiled and only it includes the modified version of the header file. Other source files in the program continue to include the original version of that header file.



Note -

C++ template definitions cannot be fixed directly. Fix the files with the template instances instead. You can use the -f option to overwrite the date-checking if the template definition file has not changed. dbx looks for template definition .o files in the default repository directory SunWS_cache. The -ptr compiler switch is not supported by the fix command in dbx.


When fix is invoked, the current working directory of the file that was current at the time of compilation is searched before executing the compilation line. There might be problems locating the correct directory due to a change in the file system structure from compilation time to debugging time. To avoid this problem, use the command pathmap, which creates a mapping from one pathname to another. Mapping is applied to source paths and object file paths.