
Input and Output Conventions
Motorola
GNU Debugger (GDB)
For More Information On This Product,
Go to: www.freescale.com
D-9
GDB command names may always be abbreviated if the abbreviation is unambiguous.
Sometimes even ambiguous abbreviations are allowed; for example, ‘s’ is specially
defined as equivalent to
step
even though there are other commands whose names start
with ‘s’. Possible command abbreviations are often stated in the documentation of the
individual commands.
A blank line as input to GDB means to repeat the previous command verbatim. Certain
commands do not allow themselves to be repeated this way; these are commands for
which unintentional repetition might cause trouble and which you are unlikely to want to
repeat. Certain others (
list
and ‘x’) act differently when repeated because that is more
useful.
A line of input starting with ‘#’ is a comment; it does nothing. This is useful mainly in
command files (See section Command Files).
GDB indicates its readiness to read a command by printing a string called the prompt. This
string is normally ‘(gdb)’. You can change the prompt string with the ‘set prompt’
command. For instance, when debugging GDB with GDB, it is useful to change the
prompt in one of the GDBs so that you tell which one you are talking to.
set prompt newprompt
Directs GDB to use
newprompt
as its prompt string henceforth.
To exit GDB, use the
quit
command (abbreviated ‘q’). Ctrl-c will not exit from GDB, but
rather will terminate the action of any GDB command that is in progress and return to
GDB command level. It is safe to type Ctrl-c at any time because GDB does not allow it to
take effect until a time when it is safe.
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. Normally GDB knows
the size of the screen from on the termcap data base together with the value of the TERM
environment variable; if this is not correct, you can override it with the ‘set screensize’
command:
set screensize lpp
set screensize lpp cpl
Specify a screen height of lpp lines and (optionally) a width of cpl characters. If you omit
cpl, the width does not change.
If you specify a height of zero lines, GDB will 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.
F
Freescale Semiconductor, Inc.
n
.