
October 13 1995, Draft 1
393
Chapter 7 Software Debugging
However, it is described here to aid users of other source level debuggers which only
have access to transparent–mode commands.
UDB is a window based debugger; however, command line processing is
supported. When in the Main window or the Console window, a command line
sequence begins with an <ESC> character. For example, to issue a “l(fā)atadd” MonTIP
command, use the command sequence “<ESC>ioctl tip latadd label”.
Alternatively, the “l(fā)atadd label” command can be directly entered at the
Console window. If the console is not currently gathering input for an out–standing
standard input request (such as a
scanf()
), the keyboard input is sent to MonTIP for
processing rather than the application or target operating system. It is useful to place a
list of “ioctl tip latadd SYMADD”–type commands in a command file such as la.rc.
The “<ESC>ioctl tip exec la.rc” command can then be used to process the MonTIP
command file. An example la.rc file for use with UDB is shown below:
ioctl tip latclr;
ioctl tip latadd LINE;
ioctl tip latadd ADDR;
ioctl tip latadd SYMADDR;
ioctl tip latadd ASMDATA;
ioctl tip latadd R/_W,6;
ioctl tip latadd *STAT_,6;
ioctl tip lamore 20;
The trace listing produced by commands such as “<ESC>ioctl latd 0, 20” will
appear in the console window along with any other console output information such
as
printf()
output. It is also convenient to use UDB’s macro instruction capability to
bind macros to buttons associated with the console frame. This allows user defined
buttons (left side of frame) to be simply clicked to issue the required MonTIP
command. The macro instructions shown below can be placed in the udb.rc startup
file.
macro m=mcon –f –”echo”
macro m=mcon –f –”trig”
macro m=mcon –f –”sync”
macro m=mcon –f –”la.rc”
macro m=mcon –f –”coff”
macro m=mcon –f –”help”
macro m=mcon –f –”latd”
{lb6} ”{com}stty +echo\r”
{lb7} ”{com}ioctl tip latrig a, ADDR=”
{lb8} ”{com}ioctl tip lasync\r”
{lb9} ”{com}exec la.rc\r”
{lb10} ”{com}ioctl tip lacoff ”
{lb11} ”{com}ioctl tip lahelp\r”
{lb12} ”{com}ioctl tip latd ”
Unprocessed analyzer trace was shown on Figure 7-14. The corresponding pro-
cessed trace is shown on Figure 7-16. Trace information is presented in the console
frame using UDB in a transparent–mode of operation. Although the Console window
is adequate, it is easier to study program execution from the enhanced trace window.
The enhanced trace window is shown on Figure 7-17. This window appears
when the
trace
view–toolbar button (bottom right of window) is selected. The trace
listing window is formatted via the “trcol” command. This command, along with a