
October 13 1995, Draft 1
403
Chapter 7 Software Debugging
being used and hence the full 32–bit address value is not observable, even if an
off–chip memory access is performed. (Microcontrollers divide the address space
into regions, only the lower address bits for any particular region may appear on the
microcontroller address bus.) Dealing with these problems can require the user to be
creative when developing alternative triggering logic.
With processors which have on–chip breakpoint control registers, a SYNC
pulse can be generated when a specified data or instruction access occurs. The
analyzer trigger logic can be configured to trigger on the occurrence of the SYNC
pulse. Alternatively, for processors without breakpoint control registers, a simple
arrangement can be used to trigger the analyzer when any execution breakpoint is
taken: When a breakpoint is taken, the illegal opcode trap is taken (trap number zero).
The analyzer should be set to trigger on a read of the first entry in the vector table. The
address is specified by the contents of special register VAB (Vector Area Base).
For convenience, UDB provides a remote method of entering data into the logic
analyzer trigger setup. Using the “trigterm” command shown below, trigger patterns
can be specified for different labels and patterns.
trigterm <term> <label> {<pattern> | <address>}
Normally, one simply specifies a <pattern> for a label. The format of the pattern
is assumed to be hexadecimal unless a base is explicitly specified. However, in the
case where the <label> is ADDR, then an <address> should be provided instead; and
UDB will convert the address, which may be specified as a symbol, into a
hexadecimal string of eight characters.
To further simplify issuing “trigterm” commands, a
Trig
button has been added
to the View, Var and Dasm frames. In the View frame, clicking on a line and then
clicking the
Trig
button will set term A of the ADDR column to the address of the
source line the cursor is currently on. Clicking on a variable and then shift–clicking
the
Trig
button will set term A of the ADDR column to the address of the variable the
cursor is currently on. This only works in the case where the variable is allocated to a
memory location and not held in an on–chip register.
In the Dasm frame, clicking on a line and then clicking the
Trig
button will set
term A of the ADDR column to the address of the disassembly line the cursor is
currently on.
Searching Through Trace Data
The HP16500B logic analyzer provides, via the front panel display, a means of
searching for patterns in the captured trace data. However, without symbolic address
support, and given the fact that raw trace data is not limited to just the execution
stream, it is often more convenient to search for patterns in the processed trace data.
UDB provides support for trace searching with the “trsearchnext” and
“trsearchprev” commands. The command format is shown below: