To Halt Program Execution On Return To A Stack Level - HP 68000 Series User Manual

Debugger/simulator
Table of Contents

Advertisement

To halt program execution on return to a stack
level
• Select Run Until Stack Level from the Backtrace window pop-up menu.
Or:
1 Set a stack level breakpoint.
2 Run the program.
3 If desired, delete the breakpoint that was just encountered.
Example
Assume that you want to run the program until it returns to the main()
function. You can determine where to set a breakpoint on return to main by
using the stack level information in the backtrace window (you may have to
activate this window in order to see the information in it).
There is a number next to the function main() in the backtrace window. This
is the current stack level of main(). This is the address of the machine level
instruction immediately following the call to initialize_system.
Place the mouse pointer over the line in the backtrace window that lists
"main." Hold the right button and select Run Until Stack Level.
Or, using the command line and assuming main() is at stack level 1, enter:
Breakpoint Instr @1
This command will cause program execution to stop when the program returns
to the function main. The at sign (@) is a debugger operator that causes the
debugger to interpret the number 1 as a stack level.
Executing the Breakpt Instr command causes the debugger to update and
display the Breakpoint window. The breakpoint you just entered is shown in
the Breakpoint window. Now use the appropriate commands to run the
program and delete the breakpoint.
Chapter 3: Loading and Executing Programs
Using Breakpoints
99

Advertisement

Table of Contents
loading

This manual is also suitable for:

B1466

Table of Contents