Starting the HP Symbolic Debugger [ Symbolic Debugger/iX User's Guide ] MPE/iX 5.0 Documentation
Symbolic Debugger/iX User's Guide
Starting the HP Symbolic Debugger
When using HP Symbolic Debugger, the debugger is the parent process and
the program that you're debugging becomes a child process. The debugger
controls only the child process and can debug only one child process at a
time.
You can use HP Symbolic Debugger with sharable code, but you should be
the only person using it at one time. (If someone else is using it also,
they will encounter the same breakpoints, for example.)
Enter the following command to start the debugger:
[ [-d group[.acct]] ]
[ [-r file ] ]
run xdb.pub.sys [;info="[-p file ] [...]"]
[ [-L ] ]
[ [-S num ] ]
[ [objectfile ] ]
You can run the debugger without options by entering:
xdb objectfile
You can also just type xdb and you will be prompted for the objectfile.
The HP Symbolic Debugger options are described below:
-d group.[acct] This option names an alternate group and (optional) account
containing the source files used to create the objectfile.
Group and accounts are searched in the order that you list
them. The current group and account is used if the file is not
found in the group and account that you enter here. You can
enter more than one -d option.
-p file This option names a playback file created in a previous
debugger session (see the -r option) or one that you created
yourself.
-r file This option names the file to which all debugger commands that
you enter are recorded. You can use this file as a playback
file in subsequent debug sessions (see the -p parameter).
Recording begins as soon as you start the debugger. Any
previous contents of the file are overwritten (no appending
takes place).
-L This option allows you to use the debugger in line mode when
you do not have a terminal that supports memory lock.
-S num This option sets the string-cache size to the number of bytes
specified. The string cache holds data read from the
objectfile. The default is 1024 bytes (1kb). Increasing the
string cache size can improve debugger performance for large
programs.
objectfile This argument names the file that contains the executable code
for the program. If you do not enter this option, you will be
prompted for the objectfile. If this is the first time you are
running the debugger, objectfile will be preprocessed to allow
faster debugger startups in subsequent sessions.
NOTE Equivalent debugger commands exist for the -d, -p, and -r options.
See the dir (directory) and the "Record and Playback Commands"
section in chapter 4, HP Symbolic Debugger Commands.
Once You Start HP Symbolic Debugger...
When you start HP Symbolic Debugger from a terminal that supports
windowing, you see a source window similar to the one shown in Figure
3-1. If this is a large program and it is the first time you've run it
under the debugger, it might take a few moments for the screen to appear.
(The debugger preprocesses a program the first time it is run and
displays the screen in less time during subsequent debugger sessions.)
Figure 3-1. The HP Symbolic Debugger Screen (Source Mode)
NOTE The above screen appears only on terminals that allow memory
locking. If your terminal does not have memory locking, the
debugger displays information one line at a time (line mode).
The screen has three parts, which are described below. This is the
screen you see when debugging in symbolic (source) mode.
Source window The source window is located at the top of the screen, above
the highlighted line. This is the area where you view the
source statements. If your terminal has 24 lines, the top 15
are used for the source window. To alter the number of lines
in the source window, see the section "Changing the Source
Window Size" in this chapter.
Source statements are displayed one window at a time. See the
section "Displaying Lines in the Source Program" for directions
on locating and displaying lines in the source window.
The > prompt in the margin of the source window points to the
current line. When you first start the debugger, this is the
first executable statement. At other times, it is the line
where the debugger is currently paused. Note that the source
window is not limited to viewing the current line, and the >
prompt may not always be visible.
Location window The location window (or location line) is the highlighted line
near the middle of the screen. This line shows you the current
program file and procedure names and the source line number of
the current line (the line currently being viewed in the source
window).
Command window The command window is the area located below the location
window (highlighted line). This window is where the debugger
commands that you enter are displayed. The debugger shows its
own output in this area. The command window also shows output
from the child process (program being debugged) The window
automatically scrolls up when full, but this does not affect
the other windows. A scrolling more feature lets you view
debugger output on window-full at a time.
The debugger prompts you to enter a command by displaying >.
When you enter a command, enter the entire command on one line
(continuation lines are not allowed).
For information about controlling the display of lines in the
command window, see the section "Controlling the Command Window
Display."
At this point, before starting program execution, you might want to set
breakpoints in the program, or change the source window size. The
remaining sections in this chapter describe how you can accomplish these
tasks and others as well (the tasks can also be performed during any
execution pause). The sections are not listed in any particular order.
You need to determine which are relevant to the debugging session at hand
and perform only those.
MPE/iX 5.0 Documentation