Trailing-Edge
-
PDP-10 Archives
-
BB-BT99T-BB_1990
-
10,7/system/debug.hlp
There are 3 other files named debug.hlp in the archive. Click here to see a list.
DEBUG Command
Function
The DEBUG command compiles the specified source files, loads the
resulting .REL files (if necessary), and prepares the loaded
program for debugging. A system debugging program is loaded
first, followed by your program, including local symbols. Upon
completion of loading, the system transfers control to the
debugging program.
The debugging program that is used depends on the first file in
the command string. If this file is a COBOL source file, COBDDT
(the COBOL debugging program) is used. If the file is a FORTRAN
source file, FORDDT is used.
Generally, a program debugged with the DEBUG command requires
more core to execute than the same program compiled with the
EXECUTE command requires. Extra space is occupied by the
debugging program and additional debugging information, such as
local symbols.
Each time the system executes a COMPILE, LOAD, EXECUTE, or DEBUG
command, the system stores the command argument in a temporary
file. When you issue one of these commands without arguments,
the system uses the arguments stored in the temporary file.
EXECUTE runs the COMPIL program before it runs the appropriate
compiler and debugger.
Format
DEBUG file-spec
Where: file-spec is a single file specification or a string of
file specifications, separated by commas.
The following switches can be used to modify the command string:
*Switch Function*
/ALGOL Compiles the file with ALGOL. Assumed for
files with the extension of .ALG.
/BIN Generates a binary file for each file
compiled. The file extension of the output
file is .REL. This is the default action.
/BLISS Compiles the file with BLISS-10. Assumed for
files with the extension of .B10 and .BLI.
/C68 Runs the specified COBOL version.
/C74
/COBOL Compiles the file with COBOL. Assumed for
files with the extension of .CBL.
/COMPILE Forces a compilation of this file even if a
binary file exists with a newer date and time
than the source file. This switch causes an
extra compilation, because compilation is not
normally performed if the binary file is
newer than the source file.
/CREF Produces a cross-referenced listing file on
the disk for each file compiled for later
processing by the CREF program. The file
extension of the output file is .CRF. The
file can then be listed with the CREF
command. However, with COBOL files, the
cross-referenced listing is always appended
to the listing file. You must issue the CREF
command to obtain the listing.
/DDT Loads DDT and disregards the extension of the
first file in the command string. This
switch applies to all subsequent files.
/DEBUG: Passes the specified arguments to FORTRAN.
(arg, arg,...) Refer to the TOPS-10/TOPS-20 FORTRAN Language
Manual.
/DLIST Creates a .LST file in your disk area. You
can list the file on the line printer with
the PRINT command.
/F10 Obsolete
/F40
/F66 Applies FORTRAN-66 rules for DO loops and
EXTERNAL statements.
/FOROTS Obsolete
/FORSE
/FORTRAN Compiles the file with a FORTRAN compiler.
Assumed for files with the extension .F4 and
.FOR and all files with unrecognizable
compiler extensions, if FORTRAN is the
standard compiler. This switch is necessary
if the file has a unrecognizable compiler
extension and FORTRAN is not the standard
compiler or is not the current default.
/FUDGE:file Creates a disk file containing the names of
the .REL files produced by the command
string. When the FUDGE switch is given, PIP
reads this file to generate a library .REL
file. For more information on FUDGE, see the
help file FUDGE. The argument to this switch
is a valid file specification, described in
the help file FISPEC.
/GFLOAT Indicates that double-precision numbers are
to be stored in G-floating format. This
format has an extended exponent range. This
option is available on KL10 processors only.
/K?10 Designates the processor where the program
will execute after it has been loaded. These
switches are necessary for FORTRAN-10
programs because the compiler generates
different codes for different processors.
The default is the processor where your
program is running. The ? can be replaced
by L or S.
/LIBRARY Loads the file in library search mode. This
mode causes a program file in a special
library to be loaded only if one or more of
its declared entry symbols satisfies an
undefined global request in the source file.
The system libraries are always searched.
(See the LINK documentation.) /LIBRARY is the
same as /SEARCH.
/LINK Obsolete
/LIST Generates a disk listing file for each file
compiled. The file extension of the output
file is .LST. These files can be listed
later with the PRINT command. If the line
printer is being spooled for this job, the
listing files are written on device LPT: and
are automatically spooled when you log out.
/LMAP Produces a loader map during the loading
process that contains the local symbols.
/LOADER Obsolete
/MACRO Assembles the file with MACRO. Assumed for
files with the .MAC extension.
/MACY11 Assembles the file with MACY11. Assumed for
files with the .P11 extension. This switch
is not supported.
/MANTIS Compiles the file with the MANTIS debugging
information. This switch affects FORTRAN-40
programs only. This switch is not supported.
/MAP:file Produces a loader map during loading. The
file name can be specified. If the file is
not specified, the default is MAP.MAP.
/NEW Runs the appropriate language compiler from
the experimental system library (device NEW:)
area [1,5]. If the compiler does not exist
on device NEW:, COMPIL tries to obtain it
from device SYS:.
/NOBIN Does not generate binary files. Binary files
are generated unless you give this switch.
This switch, when combined with the /LIST or
/CREF switch, is useful when compiling
programs solely for the purpose of generating
a listing.
/NOCOMPILE Complement to the /COMPILE switch, this
switch does not force a compilation on a
source file whose date is not as recent as
the date on the binary file. This switch
differs from the /REL switch, in that it
turns off all compilation, even if the source
file is newer than the .REL file. /NOCOMPILE
is the default action.
/NODEBUG Does not pass arguments that were previously
specified to FORTRAN.
/NOLIST Does not generate listing files. This is the
default action.
/NOMANTIS Compiles the file without the MANTIS
debugging information. This switch affects
FORTRAN-40 programs only. This switch is not
supported.
/NOOPTIMIZE Does not optimize the object source code for
FORTRAN programs.
/NOSEARCH Loads all routines of the file whether the
routines are referenced or not. Because this
is the default action, this switch is used
only to turn off library search mode
(/LIBRARY). The /NOSEARCH default is to
search the system libraries.
/OLD Runs the appropriate language compiler from
the system library of old programs (device
OLD:), which resides on disk area [1,3]. If
the compiler does not exist on device OLD:,
COMPIL tries to obtain it from device SYS:.
/OPTIMIZE Optimizes the object source code for FORTRAN
programs.
/PAL10 Assembles the file with PAL10. Assumed for
files with the .PAL extension.
/PASCAL Compiles the file with Pascal. Assumed for
files with the .PAS extension.
/REL Uses the existing .REL files although newer
source files might be present.
/SAVE Saves the core image of the loaded program.
/SEARCH Loads the files in library search mode. The
action is identical to that of the /LIBRARY
switch.
/SELF Runs the appropriate language compiler from
device DSK: instead of from the system
library (device SYS:). This switch is useful
if you keep a private copy of a compiler in
your own disk area.
/SNOBOL Compiles the file with SNOBOL. Assumed for
files with the .SNO extension. This switch
is not supported.
/SSAVE Saves the core image of the loaded program in
a sharable executable file.
/SYS Runs the appropriate language processor from
the system library (device SYS:) area of
[1,4]. This is the default action.
Restriction
A language processor appearing more than once within a single
command string cannot specify more than one disk area. For
example, the following is invalid:
.DEBUG MAIN.MAC/SELF,PART1.MAC/OLD
However, the following is valid:
.COMPILE MAIN.MAC/SELF
.COMPILE PART1.MAC/OLD
.DEBUG /REL MAIN,PART1
Characteristics
Places your terminal at user level.
Runs the appropriate processor, LINK, and the debugger,
destroying your core image.
Example
The following example shows how the DEBUG and DDT commands are
used. Begin by writing a simple program with a spelling
(syntactical) error.
.TYPE TEST.MAC<RET>
TITLE TEST SIMPLE PROGRAM
SEARCH MACTEN,UUOSYM
HIMSG: ASCIZ \HI THERE - THIS IS A SIMPLE TEST PROGRAM!
\
TEST: JCLF
RESET
OUTSTR HIMSG
MONRT.
END TEST
Use DEBUG to compile and load the program:
.DEBUG TEST.MAC<RET>
MACRO: TEST
LINK: LOADING
?LNKUGS 1 UNDEFINED GLOBAL SYMBOL
JCLF 0
[LNKDEB DDT EXECUTION]
DDT
^Z
Loading showed that the program contained an error, which is then
corrected by using the SOS editor to replace "JCLF" with the
correct "JFCL".
.SOS TEST.MAC<RET>
EDIT: TEST.MAC
*SJCLF<ESC>JFCL<ESC>.<ESC><RET>
600 TEST: JFCL
*ES<RET>
[DSKC:TEST.MAC]
After correcting the file, reload the program, again using DEBUG.
.DEBUG TEST.MAC<RET>
MACRO: TEST
LINK: LOADING
[LNKDEB DDT EXECUTION]
DDT
^Z
The debugger successfully loaded the program; no errors were
detected. The new TEST.REL file automatically supersedes the old
.REL file. Next, save the core image of the loaded program, and
begin execution.
.SAVE TEST<RET>
TEST SAVED
.START<RET>
HI THERE - THIS IS A SIMPLE TEST PROGRAM!
The program ran successfully. However, when you try to run the
program again with the CONTINUE command, the command fails. No
provision has been made for rerunning the program.
.CONTINUE<RET>
?ILLEGAL UUO AT USER PC 013303
Start the debugger, using the DDT command:
.DDT<RET>
DDT
13303/ 0 ^
TEST+3/ MONRT.<LF>
PAT. ./ O JRST TEST<RET>
^Z
While running DDT, alter the core image of the program: since
the error was reported at address 13303 (octal), examine that
address. Then type an uparrow (^) to see the previous line,
which is the last line of program code. Then type a line-feed
(<LF>) to see the next line. "PAT.." is on the next line. Here,
insert the call "JRST TEST," then exit DDT.
Next, START the program:
.START<RET>
HI THERE - THIS IS A SIMPLE TEST PROGRAM!
Then CONTINUE the program. The execution is successful.
.CONTINUE<RET>
HI THERE - THIS IS A SIMPLE TEST PROGRAM!
Finally, edit the file with the changes made to the core image:
.SOS TEST.MAC<RET>
EDIT:TEST.MAC
*P^:*<RET>
100 TITLE TEST SIMPLE PROGRAM
200 SEARCH MACTEN,UUOSYM
300
400 HIMSG: ASCIZ \HI THERE - THIS IS A SIMPLE TEST PROGRAM!
500 \
600 TEST: JFCL
700 RESET
800 OUTSTR HIMSG
900 MONRT.
1000
1100 END TEST
*I950<RET>
950 JRST TEST
*ES<RET>
[DSKC:TEST.MAC]
Load the program, begin execution, and run the program again:
.LOAD TEST.MAC<RET>
LINK: LOADING
EXIT
.START<RET>
HI THERE - THIS IS A SIMPLE TEST PROGRAM!
.CONTINUE<RET>
HI THERE - THIS IS A SIMPLE TEST PROGRAM!
.
Execution is successful.