PLBDBUG
The PLBDBUG utility is a character mode source code debugger for Sunbelt PL/B programs. A companion program (DBGIFACE) is a graphical interface to the debugger. Before using PLBDBUG, the user must compile the program(s) to be debugged using the 'S' option to create a debug file. A sample compile statement to create output for PLBDBUG is:
The debug file created has the same name as the object file (PLC) but with an extension of SDB.
The command line formats to load PLBDBUG are as follows:
The [q] option specifies a quiet mode of operation. In this mode the debugger will not give an error when a program or load module is encountered and the '.sdb' debug file cannot be accessed.
PLBDBUG is automatically unloaded when the runtime exits.
Once the program is compiled and the runtime loaded, you are ready to begin debugging. Any program compiled and executed with the debug option causes the debugger to take control. PLBDBUG will first attempt to locate the debug file for the specified program. If not found, a message is displayed on the terminal and the debugger disabled until the next program is entered. If the debug file is found, but was not created at the same time as the program, a message is displayed on the terminal and the debugger disabled until the next program is entered. All breakpoints and tracepoints are cleared after an EXECUTE of another PL/B program.
If the debug file is found and is valid, the debugger screen is displayed and the debugger will wait for a command. The screen is initially divided into three (3) windows with a format similar to the following screen image.
+----------------------------------------------------------------------- TIME1 DIM 11 DATE1 DIM 8 TIME2 DIM 11 +*-------------------------------------------------------------- . Beginning of program .04F0> START CLOCK TIME,TIME104F8 UNPACK TIME1,RHH,DIM1,RMM *--------------------------------------------------------------- . Open or Create card file. .0501 A TRAP PREP IF IO050F A OPEN DISC,"MEELDATA.TXT"051A A READ DISC,ONE;CARDS+----------------------------------------------------------------------- ZERO LESS EOS OVER GREATER PI # 0 > CS = 0 +-----------------------------------------------------------------------
The top window displays the source code with the next executable line highlighted. The small window on the bottom right of the screen displays the current status of all flags, as well as the current function key, the remaining PI count and the call stack level. The rest of the screen accepts commands and display other information. PLBDBUG works equally well if the monitor is in 132 column mode and/or 43 or 50 line mode. The correct number of columns and lines is determined at debugging time and the screen adjusted for proper size.
Numerous commands are available to aid in debugging a PL/B program. Several function keys are also enabled to make debugging the program easier. The available function keys and/or commands are listed below. During the keying of the commands, the keyboard EDIT function is enabled allowing the use of the left arrow, right arrow, home, end, insert and delete functions.
In addition to the graphical interface, the DBGIFACE program also provides remote debugging. This permits a user to run the debugger on a local client machine and debug a program executing on a remote host machine.
To set up remote debugging:
On the host system, define the following environment variable:
On the client system, set the following environment variables:
Start the GUI interface on the client:
When prompted,start the debugger on the host as you normally would:
Click "Ok" to let the GUI interface know the debugger is running.
If the GUI debugger is not able to establish a connection, the character debugger will initialize on the host and the client GUI will terminate.
Keywords on the client must be defined in the User Environment Table but may be in the host INI file.
If the DBG_PORTNUM is not defined on the client, 24240 is assumed.
See Also: PLBDBUG Commands, Utilities
![]() |