ChorusOS 5.0 Debugging Guide

Starting GDB for System Debugging

Before starting GDB for system debugging, make sure that the debug agent is running on the target and that the debug server is connected to it.

The name of the GDB executable differs according to the target platform and takes the form target-type-chorusos-gdb. Thus, depending on the platform, type one of the following to start GDB:


Note -

By default, the Insight GUI is started when you start GDB. To start GDB without the Insight GUI, you must include the --nw option.


If GDB is not started on the same host as the debug server, and the CHSERVER_HOST is not set or is incorrectly set, set the host with the following command:


(chgdb) set chserver host_name [:slot-id]

where host_name is the name of the host on which the debug server is running and the optional slot-id is the occupied slot.

Connect to the target using the target chorusos target_name command, as indicated in the example below:


(chgdb) target chorusos target_name

When GDB is connected to the target, load the symbols for all the components of your system image as follows:


(chgdb) chload-symbols

Once you have started GDB and connected to the target successfully, the system is stopped, usually in the clock interrupt handler. The debugging session follows the standard GDB debugging process. For more information on this process, see Debugging with GDB.


Caution - Caution -

Using the run command at any point will reboot your ChorusOS system.