Using Software Breakpoints - HP 64767 User Manual

Emulation/analysis
Table of Contents

Advertisement

Chapter 6: Using the Emulator

Using Software Breakpoints

Using Software Breakpoints
Software breakpoints provide a way to accurately stop the execution of your
program at selected locations. (Another way is to break user program execution on
the analyzer trigger.)
Note
Version A.04.00 or greater of the HP 64700 system firmware provides support for
permanent as well as temporary breakpoints. If your version of HP 64700 system
firmware is less than A.04.00, only temporary breakpoints are supported.
Software breakpoints are handled by the 80186/188 single byte interrupt (SBI)
facility. When you define or enable a software breakpoint, the emulator will
replace the opcode at the software breakpoint address with a breakpoint interrupt
instruction (INT 3).
When the INT 3 instruction executes, the emulator determines whether the SBI was
generated by an enabled software breakpoint or by a single-byte interrupt
instruction in your target program.
If the SBI was generated by a software breakpoint, execution breaks to the monitor,
and the breakpoint interrupt instruction (INT 3) is replaced by the original opcode.
A subsequent run or step command will execute from this address.
If the SBI was generated by a single-byte interrupt instruction in the target system,
execution still breaks to the monitor, and an "undefined breakpoint" status message
is displayed. To continue with program execution, you must run or step from the
target program's breakpoint interrupt vector address.
A valid user stack must exist to use breakpoints. In other words, SS and SP must
be correctly initialized before a breakpoint is executed.
Execution of the INT 3 instruction will cause an opcode fetch from the address
pointed to by entry 3 (doubleword address at 0CH) in the vector table. Make sure
that this address is mapped as something other than guarded memory.
Note that you must only set software breakpoints at memory locations which
contain instruction opcodes (not operands or data).
In order to successfully set a software breakpoint, the emulator must be able to
write to the memory location specified. Therefore, software breakpoints cannot be
set in target memory while the emulator is reset, and they can never be set in target
150

Advertisement

Table of Contents
loading

This manual is also suitable for:

80186/8/xl/ea/eb

Table of Contents