
D-44
Motorola DSP56000 Family Optimizing C Compiler User’s Manual
For More Information On This Product,
Go to: www.freescale.com
Motorola
Examining the Symbol Table
with “double” format. In such cases, GDB normally works with the virtual format only
(the format that makes sense for your program), but the ‘info registers’ command prints
the data in both formats.
Register values are relative to the selected stack frame (see section Selection). This means
that you get the value that the register would contain if all stack frames farther in were
exited and their saved registers restored. In order to see the real contents of all registers,
you must select the innermost frame (with ‘frame 0’).
Some registers are never saved (typically those numbered zero or one) because they are
used for returning function values; for these registers, relativization makes no difference.
info registers
Print the names and relativized values of all registers.
info registers regname
Print the relativized value of register
regname
.
regname
may be any register name valid
on the machine you are using, with or without the initial ‘$’.
D.9.9.1 Examples
You could print the program counter in hex with
p/x $pc
or print the instruction to be executed next with
x/i $pc
or add four to the stack pointer with
set $sp += 4
The last is a way of removing one word from the stack, on machines where stacks grow
downward in memory (most machines, nowadays). This assumes that the innermost stack
frame is selected. Setting $sp is not allowed when other stack frames are selected.
D.10 Examining the Symbol Table
The commands described in this section allow you to make inquiries for information about
the symbols (names of variables, functions and types) defined in your program. This
information is found by GDB in the symbol table loaded by the ‘symbol-file’ command; it
is inherent in the text of your program and does not change as the program executes. See
Table D-22.
F
Freescale Semiconductor, Inc.
n
.