Sun Studio 12: Debugging a Program With dbx

Navigating To a File

You can navigate to any file dbx recognizes as part of the program (even if a module or file was not compiled with the -g option). To navigate to a file:


(dbx) file filename

Using the file command without arguments echoes the file name of the file you are currently navigating.


(dbx) file

dbx displays the file from its first line unless you specify a line number.


(dbx) file filename ; list line_number

For information on setting a stop at breakpoint at a line of source code, see Setting a stop Breakpoint at a Line of Source Code.