Chapter 21. Controlling gdb
183
show commands
n
Print ten commands centered on command number
n
.
show co
Print ten commands just after the commands last printed.
21.4. Screen size
Certain commands to gdb may produce large amounts of information output to the screen. To help you
read all of it, gdb pauses and asks you for input at the end of each page of output. Type [RET] when
you want to continue the output, or
q
to discard the remaining output. Also, the screen width setting
determines when to wrap lines of output. Depending on what is being printed, gdb tries to break the
line at a readable place, rather than simply letting it overflow onto the following line.
Normally gdb knows the size of the screen from the terminal driver software. For example, on Unix
gdb uses the termcap data base together with the value of the
TERM
environment variable and the
stty
rows
and
stty cols
settings. If this is not correct, you can override it with the
set height
and
set width
commands:
set height
lpp
show height
set width
cpl
show width
These
set
commands specify a screen height of
lpp
lines and a screen width of
cpl
characters.
The associated
show
commands display the current settings.
If you specify a height of zero lines, gdb does not pause during output no matter how long the
output is. This is useful if output is to a file or to an editor buffer.
Likewise, you can specify
set width 0
to prevent gdb from wrapping its output.
21.5. Numbers
You can always enter numbers in octal, decimal, or hexadecimal in gdb by the usual conventions:
octal numbers begin with
0
, decimal numbers end with
.
, and hexadecimal numbers begin with
0x
.
Numbers that begin with none of these are, by default, entered in base 10; likewise, the default display
for numbers--when no particular format is specified--is base 10. You can change the default base for
both input and output with the
set radix
command.
set input-radix
base
Set the default base for numeric input. Supported choices for
base
are decimal 8, 10, or 16.
base
must itself be specified either unambiguously or using the current default radix; for example, any
of
set radix 012
set radix 10.
set radix 0xa
sets the base to decimal. On the other hand,
set radix 10
leaves the radix unchanged no matter
what it was.
Содержание 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: ......