
9-12
Debugger
name. This command may display incorrect results when the debugger
is halted inside a function prologue or epilogue.
9.3.3 Info Registers Command
9.3.3.1 sdbug400, zdxbug
To use this command, the %rpc register must be stored on the stack,
even for leaf functions. Otherwise, the compiler returns incorrect values
for the %pc and %rpc registers when traversing the stack. Refer to
Section 3.2, “Compiler Conventions.”
9.3.3.2 zdbug
The code still needs to following the compiler convention, though the
convention has now been changed. Refer to
Section 3.2, “Compiler
Conventions.”
for details.
9.3.4 Breakpoint Command
SDBUG reserves the use of pc value zero. If two breakpoints are
inadvertently set at pc value zero, the debugger will loop while trying to
execute the instruction. If a breakpoint has to be set at pc value zero, set
only one breakpoint at that address.
9.3.5 Print Command
The
print
command is typically used to display the values of variables
and arrays. It may also be used to display the values in any memory
location.
9.3.6 Set Command
The
set
command is used to change the state of the processor or the
debugger. It can be used to change any register value, the value of any
word in any memory, or the value of any variable.
Keep in mind that with the cycle-accurate simulator (ZSIM), the
set
command may not operate correctly if it is used to change the contents
of a register that will be used by an instruction currently in the pipeline—
if the instruction is in a pipeline stage older than Group (G), the
instruction may read the old value. Also, using the ZSIM
set
to modify a