56
Chapter 8. Examining the Stack
For example:
(gdb) up
#1
0x22f0 in main (argc=1, argv=0xf7fffbf4, env=0xf7fffbfc)
at env.c:10
10
read_input_file (argv[i]);
After such a printout, the
list
command with no arguments prints ten lines centered on the point
of execution in the frame. You can also edit the program at the point of execution with your favorite
editing program by typing
edit
. Refer to Section 9.1
Printing source lines
for details.
up-silently
n
down-silently
n
These two commands are variants of
up
and
down
, respectively; they differ in that they do their
work silently, without causing display of the new frame. They are intended primarily for use in
gdb command scripts, where the output might be unnecessary and distracting.
8.4. Information about a frame
There are several other commands to print information about the selected stack frame.
frame
f
When used without any argument, this command does not change which frame is selected, but
prints a brief description of the currently selected stack frame. It can be abbreviated
f
. With an
argument, this command is used to select a stack frame. Refer to Section 8.3
Selecting a frame
.
info frame
info f
This command prints a verbose description of the selected stack frame, including:
•
the address of the frame
•
the address of the next frame down (called by this frame)
•
the address of the next frame up (caller of this frame)
•
the language in which the source code corresponding to this frame is written
•
the address of the frame’s arguments
•
the address of the frame’s local variables
•
the program counter saved in it (the address of execution in the caller frame)
•
which registers were saved in the frame
The verbose description is useful when something has gone wrong that has made the stack format
fail to fit the usual conventions.
Содержание ENTERPRISE LINUX 4 - DEVELOPER TOOLS GUIDE
Страница 1: ...Red Hat Enterprise Linux 4 Debugging with gdb ...
Страница 12: ...2 Chapter 1 Debugging with gdb ...
Страница 28: ...18 Chapter 4 Getting In and Out of gdb ...
Страница 34: ...24 Chapter 5 gdb Commands ...
Страница 44: ...34 Chapter 6 Running Programs Under gdb ...
Страница 68: ...58 Chapter 8 Examining the Stack ...
Страница 98: ...88 Chapter 10 Examining Data ...
Страница 112: ...102 Chapter 12 Tracepoints ...
Страница 118: ...108 Chapter 13 Debugging Programs That Use Overlays ...
Страница 138: ...128 Chapter 14 Using gdb with Different Languages ...
Страница 144: ...134 Chapter 15 Examining the Symbol Table ...
Страница 170: ...160 Chapter 19 Debugging remote programs ...
Страница 198: ...188 Chapter 21 Controlling gdb ...
Страница 204: ...194 Chapter 22 Canned Sequences of Commands ...
Страница 206: ...196 Chapter 23 Command Interpreters ...
Страница 216: ...206 Chapter 25 Using gdb under gnu Emacs ...
Страница 296: ...286 Chapter 27 gdb Annotations ...
Страница 300: ...290 Chapter 28 Reporting Bugs in gdb ...
Страница 322: ...312 Chapter 30 Using History Interactively ...
Страница 362: ...352 Appendix D gdb Remote Serial Protocol ...
Страница 380: ...370 Appendix F GNU GENERAL PUBLIC LICENSE ...
Страница 386: ...376 Appendix G GNU Free Documentation License ...
Страница 410: ......