|Skip Navigation Links|
|Exit Print View|
|Oracle Solaris Studio 12.3: Debugging a Program With dbx Oracle Solaris Studio 12.3 Information Library|
If you move your source files after compiling, or build on one machine and debug on another, or are in one of the other situations described in Finding Source and Object Files, macro skimming might not be able to find include files in the file it is skimming. The solution, as with other cases of files not being found, is to use the pathmap command to help the macro skimmer locate include directories. Imagine, for example, that you compile with the option -I/export/home/proj1/include and have the statement #include "module1/api.h" in your code. Then, if you rename proj1 to proj2, the following pathmap command will help the macro skimmer locate your files:
pathmap /export/home/proj1 /export/home/proj2
The pathmap is not applied to the compilers used to compile the original code.
When you are working with macros, you must reload your application in order to have pathmaps take effect, unlike other situations when a file is not found and you can use the pathmap command to make changes in a pathmapping that are immediately effective.
The pathmap command helps dbx find the correct files when you build on one machine and debug on another. However, system include files such as /usr/include/stdio.h are typically not exported from the build machine, so the macro skimmer is likely to use the files on the debug machine. In some cases, a system include file might not be available on the debug machine. And the value of system-specific and system-dependent macros might not be same on the debug machine as on the build machine.
If the pathmap command does not solve your skimming problems, consider compiling your code with the -g3 option and setting the macro_source dbx environment variable to skim_unless_compiler or compiler.