Go to main content
Oracle® Developer Studio 12.5: Debugging a Program with dbx

Exit Print View

Updated: June 2016

pathmap Command

The pathmap command maps one path name to another for finding source files and such. The mapping is applied to source paths, object file paths, and the current working directory (if you specify -c). During macro skimming, it is also applied to include directory paths. The pathmap command has the same syntax and functionality in native mode and in Java mode.

The pathmap command is useful for dealing with automounted and explicit NFS mounted filesystems with different paths on differing hosts. Current working directories are inaccurate on automounted filesystems. Specify -c when you are trying to correct problems arising due to the automounter. The pathmap command is also useful if source or build trees are moved.

pathmap /tmp_mnt / exists by default.

The pathmap command is used to find load objects for core files when the dbxenv variable core_lo_pathmap is set to on. Other than this case, the pathmap command has no effect on finding load objects (shared libraries). For more information, see Debugging a Mismatched Core File.


pathmap [ -c ] [ -index ] from to

Establish a new mapping from from to to.

pathmap [ -c ] [ -index ] to

Map all paths to to.


List all existing path mappings (by index).

pathmap -s

The same, but the output can be read by dbx.

pathmap -d from1 from2 ...

Delete the given mappings by path.

pathmap -d index1 index2 ...

Delete the given mappings by index.


from and to are path prefixes. from refers to the path compiled into the executable or object file and to refers to the path at debug time.

from1 is the path of the first mapping to be deleted.

from2 is the path of the last mapping to be deleted.

index specifies the index with which the mapping is to be inserted in the list. If you do not specify an index, the mapping is added to the end of the list.

index1 is the index of the first mapping to be deleted.

index2 is the index of the last mapping to be deleted.

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

If you specify -s, the existing mappings are listed in an output format that dbx can read.

If you specify -d, the specified mappings are deleted.


(dbx) pathmap /export/home/work1 /net/mmm/export/home/work2
  # maps /export/home/work1/abc/test.c to /net/mmm/export/home/work2/abc/test.c
(dbx) pathmap /export/home/newproject
  # maps /export/home/work1/abc/test.c to /export/home/newproject/test.c
(dbx) pathmap
(1) -c /tmp_mnt /
(2) /export/home/work1 /net/mmm/export/home/work2
(3) /export/home/newproject