To build all your components with symbolic debugging information turned on:
Edit the Paths file located in the root of your build directory, created after you run the configure command, and add the following line to the end:
FREMOTEDEB=ON
Other ways can be used to selectively build your components with symbolic debugging information. These are presented below.
To enable symbolic debugging throughout the component directory and its sub-directories:
Edit the Project.tmpl file located in the root of the component source directory, and add the following line to the end:
DEBUG=$(DEBUG_ON)
Change directory to the root of your build directory and remove all the object files and executables:
% make clean |
Rebuild the local Makefile:
% make Makefile |
Rebuild the sub-directory Makefiles:
% make Makefiles |
Finally, rebuild the component:
% make |
To enable symbolic debugging in selected component directories:
Edit the Imakefile within each desired component source directory, and add the following line to the end:
DEBUG=$(DEBUG_ON)
Change directory to the root of your build directory and remove all the object files and executables:
% make clean |
Rebuild the local Makefile:
% make Makefile |
Finally, rebuild the component:
% make |
If you prefer not to modify the Imakefile or Project.tmpl files, there is an alternative way of enabling debugging. You can pass the debug option within the make command itself:
Change to your build directory and remove all the object files and executables:
% make clean |
Rebuild the component with symbolic debugging enabled:
% make MAKE="make DEBUG=-gdwarf-2" |
You can also create a DEBUG environment variable. If you use the C shell:
% setenv DEBUG -gdwarf-2 |
If you use the Bourne shell:
$ DEBUG=-gdwarf-2 $ export DEBUG |
Now call make with the -e option to import environment variables:
% make -e |
Once a component has been compiled in debug mode, rebuild and reboot the system image.