This section describes the components within the application debugging architecture.
The application debugging architecture has two components:
XRAY Debugger for ChorusOS
Remote debug server (RDBC) rdbc(1CC)
The XRAY Debugger for ChorusOS runs on the host. The remote debug server runs on the target and communicates with XRAY over the Ethernet. This is illustrated in Figure 10-1.
Application debugging is intended to be used for debugging user applications, dynamically loaded actors, as well as certain supervisor actors. It is not possible to debug the Actor Management (AM) or I/O Management components (IOM), the kernel, or the system drivers. Application debugging relies on the RDBC supervisor actor which uses the services of the AM, the IOM, the kernel, and system drivers such as the Ethernet driver. When an application is debugged, only that application is affected. Other applications in the operating system, as well as the operating system itself, will keep running.
To begin an application debugging session, follow these steps:
Ensure that your target is connected to your network.
Prepare the system for symbolic debugging. See "Preparing the System for Symbolic Debugging" for information on how to do this.
Configure and start the XRAY Debugger for ChorusOS. See "Sample XRAY Start-up Script".
The RDBC server can be started automatically or manually:
For RDBC to be started automatically, the conf/sysadm.ini file, read during system initialization by
C_INIT, must contain a command which mounts the NFS root. If this mount command is present, edit
the conf/sysadm.ini file and add the following line after
It is extremely important that RDBC is started after the NFS root is mounted on the target.
RDBC can be started manually, as a normal application, as follows:
% rsh -n name arun rdbc
Running RDBC manually gives you freedom to choose when you want to carry out application debugging, freeing up valuable resources.
To stop RDBC, use the akill command. First identify the actor process ID (aid):
% rsh name aps
Then kill the RDBC process:
% rsh name akill aid
Your XRAY application debug session will be lost if you stop RDBC.
Information about what targets are available to XRAY is held in the file chorusos.brd. There are four columns: the machine names where RDBC executes are specified in the first column, slot numbers are specified in the second column, and the last two columns are for comments. XRAY interprets integer values between 0 and 25 in the second column as slot numbers and larger values as TCP/IP port numbers, and will adapt its connection to the server accordingly. The default TCP/IP port number of RDBC is 2072.
Here is an example chorusos.brd file:
target-i386 2072 "i386" "Application debug of target-i386" target-ppc 2072 "ppc" "Application debug of target-ppc"
The entries specify the application debug of actors running on target-i386 and target-ppc respectively, and require that RDBC be running on both machines.
Two or more RDBC servers can be run on the same target to provide you with a separate console for each program being debugged.
See rdbc(1CC) for more information.
The name and port number specified in chorusos.brd have different meanings:
For application debug, the chorusos.brd file specifies the target name, and the port number corresponds to a UDP/IP port number, 2072 by default.
For system debug, the chorusos.brd file specifies the host name where the RDBS server is running. The port number corresponds to the RDBS slot number in the range 0..25.