HP 68000 Series User Manual page 170

Debugger/simulator
Table of Contents

Advertisement

Chapter 4: Viewing Code and Data
Displaying Program Context
generates backtrace information as described in the following paragraphs.
The backtrace window is displayed only in the high-level screen.
Nesting level 0.
Nesting level 1.
Nesting levels 2
through n.
Functions with no
stack frame.
148
Nesting level 0 information is based solely on the
current value of the processor's program counter (PC).
The module and function shown at this level are
selected because the value of the PC falls within their
code spaces.
When program execution breaks on an address that has
an associated public label (for example, a function entry
point), nesting level 1 information is based on the
processor SP. The debugger assumes that the SP is
pointing to the return address because the label is
assumed to be a function entry point and no stack frame
has yet been established. With no stack frame available,
the return address of the calling function is at the top of
the stack. This return address is the address at level 1.
The module and function shown are based on this
address, that is, the address falls within their code
spaces.
When program execution breaks on an address that has
no associated public label, nesting level 1 is based on
the processor's frame pointer (register A6). In this case,
the stack location four bytes above the location pointed
to by register A6 contains the return address of the
calling function. This address is the address shown at
level 1; the module and function shown are based on
this address.
Nesting levels 2 through n are always based on existing
stack frames. A stack frame is generated for each frame
on the stack, based on saved frame pointers. Nesting
levels are generated until backtracing of the stack
encounters a zero frame pointer. This occurs when the
stack frame associated with the compiler startup
routines is encountered.
If a function has no stack frame (due to compiling with
the -O option), the function that called it does not

Advertisement

Table of Contents
loading

This manual is also suitable for:

B1466

Table of Contents