ChorusOS 5.0 Debugging Guide

Enabling Debugging for Components Built with imake

The following two procedures indicate how to enable symbolic debugging for components that have been built with imake.

To enable symbolic debugging throughout the component directory and its subdirectories
  1. Edit the Project.tmpl file.

    The Project.tmpl file is located in the root of the component directory. Add the following line to the end of the file:

    DEBUG=$(DEBUG_ON)

  2. Remove all the object files and executables.


    $ make clean
    

  3. Rebuild the local Makefile.


    $ make Makefile
    

  4. Rebuild the Makefiles in the subdirectories.


    $ make Makefiles
    

  5. Rebuild the component.


    $ make
    

To enable symbolic debugging in selected component directories
  1. Edit the Imakefile.

    Edit the Imakefile within each desired directory and add the following line to the end:

    DEBUG=$(DEBUG_ON)

  2. Remove all the object files and executables.


    $ make clean
    

  3. Rebuild the local Makefile.


    $ make Makefile
    

  4. Rebuild the component.


    $ make
    

If you prefer not to modify the Imakefile or Project.tmpl files, you can pass the debug option within the make command itself:

  1. Remove all the object files and executables:


    $ make clean
    

  2. Rebuild the component with symbolic debugging enabled:


    $ make DEBUG=-gdwarf-2
    

You can also create a DEBUG environment variable.

Call make with the -e option to import environment variables:


$ make -e

If the component is part of the system image, rebuild and reboot the system image.