The debug command enables POSIX programs which can be started from within a shell to be debugged.
Syntax
Format 1: | debug[ -e] program[ arguments]... |
Format 2: | debug[ -p] pid |
The program to be debugged is loaded in the task generated from within the shell by means of a fork (fork task). Once the program has been loaded, but before the first command is executed, control is passed to the user on BS2000 command level. The process ID of the fork task is displayed as a prompt (see also Example 1 below).
program is loaded without its external symbols dictionary.
Name of the program to be debugged. The program must be executable.
program arguments.
The program running in the fork task with process ID pid is stopped. The user is given control on BS2000 command level. The process ID of the interrupted fork task is displayed as a prompt (see also Example 2).
Interrupts the program in the task with process ID pid.
Process ID of the task that is to be stopped. |
Example 1
The example below illustrates what happens up to the point where the program to be debugged is loaded. When the prompt pid/ appears, the program is ready to start as it would be after a /LOAD-PROGRAM command. AID commands can be used to influence how debugging is to proceed. The program starts again after the /RESUME-PROGRAM command in the fork task.
|
Example 2
This example illustrates what happens when a program executing in a fork task is interrupted. When the pid/ prompt appears, the program has been interrupted as when K2 is pressed. AID commands can be used to influence how debugging is to proceed. The program starts again after the RESUME-PROGRAM command in the interrupted fork task.
|