Debugging a Program With dbx

Setting Startup Properties

pathmap

By default, dbx looks in the directory in which the program was compiled for the source files associated with the program being debugged. If the source/object files are not there or the machine you are using doesn't use the same pathname, you must inform dbx of their location.

If you move the source/object files, you can add their new location to the search path. The pathmap command creates a mapping from your current view of the file system to the name in the executable image. The mapping is applied to source paths and object file paths.

Common pathmaps should be added to your .dbxrc file.

To establish a new mapping from directory from to directory to type:


(dbx) pathmap [ -c ] fromto

If -c is used, the mapping is applied to the current working directory as well.

The pathmap command is also useful for dealing with automounted and explicit NFS-mounted file systems with different base paths on differing hosts. Use -c when you try to correct problems due to the automounter because current working directories are inaccurate on automounted file systems.

The mapping of /tmp_mnt to / exists by default.

dbxenv

The dbxenv command can be used to either list or set dbx customization variables. Customize your dbxenv setting by placing them in your .dbxrc file. To list variables, type:


dbxenv

You can also set dbx environment variables. See Chapter 2, Customizing dbx" for more information about setting these variables.

alias

You can create your own dbx commands using the kalias or dalias commands.