next up previous
Next: About this document Up: Prospero Resource Manager Previous: Task migration

Debugging PRM applications

By specifying debugging options, PRM tasks can be started under a debugger. A debugging setup consists of a command interface at the front end and task-monitors at the back end. The interactive front end enables the user to monitor and control program execution. At the back end each target task is controlled by a separate task-monitor that is co-located with the target. Task-monitors receive debugging commands from the front end and apply them to the target task. In this release, the Gnu Debugger (gdb) has been adapted to function as the task-monitor and interact with the front end. Use of gdb gives the task-monitor all the features of a traditional debugger.

An additional feature of the PRM debugger is playback debugging using traces. Instrumented communication functions enable the communication activity of the program to be captured in trace files. Using the information from these trace files, to programs can be replayed to exactly recreate the sequence of events in a program's history.

Debugging options must be specified in the job configuration file. To startup a task under the task-monitor, set the rd attribute in your job configuration file to true

        rd = true

Similarly, rt = true writes message traces to a tracefile, rl = true logs contents of messages to a logfile and rf = filename sets the name of the tracefile to filename. For any of these options and to take effect, the job manager must be invoked with the -r option. Also note that tracing/logging are effective only for PVM's communication functions. If tracing is in effect and a trace file name is not specified in the job configuration file, the name of the trace and log files default to task_pid.trc and task_pid.log respectively.

When invoked under a task-monitor, a task is not started until the gdb command run is issued by the user. Each time the task stops at a breakpoint, the task-monitor prints a prompt to stdout and expects a debugging command from the user. The prompt indicates the task id of the task that is being controlled. In addition to all gdb commands, the new commands _setmon, _all, and replay can also be issued to the front end as described below.

When two or more tasks are running under task-monitors, the front-end designates one of the task-monitors as 'current task-monitor'. This task-monitor receives command inputs and has the capability of printing to the terminal (through the term_iotask). To change the current task-monitor, use the _setmon command. For example, the command

        _setmon 3
makes task-monitor 3 the current task-monitor.

To apply the same debugging command to every task-monitor, prefix the command with an _all. For example,

        _all break 100
broadcasts the break 100 command to all task-monitors. Note that _all quit cannot be used. Quit each task-monitor separately.

When used in conjunction with tracing and logging, the "replay" command sets/toggles the replay mode.

        replay on | off

If replay is on, task-monitor will force the task to obtain intertask-communication messages from the trace and log files, enabling a task to be replayed in isolation. Note that when replay mode is toggled, the task must be rerun from the beggining toggle to take effect.



next up previous
Next: About this document Up: Prospero Resource Manager Previous: Task migration



Santosh Rao
Tue Feb 13 13:59:23 PST 1996