Advanced Topics
K
A
DAK
159
13.6 Breakpoint Manager
The AMX Breakpoint Manager can be used to improve the operation of the debugger that
you use to test your AMX system. Your use of the Breakpoint Manager is optional; use it
only if it augments your debugger as described below.
If you enjoy the use of an in-circuit emulator or hardware assisted debugger, you will not
need to use the Breakpoint Manager. When breakpoints are encountered, operation of the
target processor is suspended and you get a true snapshot of life in your AMX system at
the time of the breakpoint. Since the processor operation is suspended, no further
processing by the system under test is possible.
If you are using a resident debugger such as Microsoft CodeView or Borland Turbo
Debugger operating on PC AT compatible hardware, then you should use the Breakpoint
Manager to assist the debugger. Debuggers like these use software breakpoints and trace
traps to provide their services. In the debugger's attempt to remain reasonably passive
with respect to the underlying hardware, it leaves itself wide open to difficulties in testing
interrupt driven pre-emptive multitasking applications.
When a breakpoint is encountered, the debugger may not inhibit clock interrupts because
it prefers not to be so intrusive. The implication is that all clock activity continues to
occur while you are stopped at a breakpoint. Consequently, in your AMX system, any
task of higher priority than the one in which the breakpoint occurred may preempt the
debugger and start (or resume) execution. This same effect will be noticed for all
interrupt driven activity involving higher priority tasks.
The Breakpoint Manager resolves this problem. When a breakpoint or debug exception
occurs, the Breakpoint Manager halts all AMX tasks and inhibits AMX clock service
while you are in the debugger.
Unfortunately, the Breakpoint Manager has no easy means of determining when you have
proceeded from a breakpoint. It monitors task switches and clock interrupts to detect an
exit from the debugger. Once the exit has been detected, it removes all AMX tasks from
the halt state and restores AMX clock service.