Files
2024-02-19 00:21:47 -05:00

624 lines
26 KiB
HTML

<HTML>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!-- Created on November, 11 2002 by texi2html 1.64 -->
<!--
Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)
Karl Berry <karl@freefriends.org>
Olaf Bachmann <obachman@mathematik.uni-kl.de>
and many others.
Maintained by: Olaf Bachmann <obachman@mathematik.uni-kl.de>
Send bugs and suggestions to <texi2html@mathematik.uni-kl.de>
-->
<HEAD>
<TITLE>Debugging with GDB: Controlling GDB</TITLE>
<META NAME="description" CONTENT="Debugging with GDB: Controlling GDB">
<META NAME="keywords" CONTENT="Debugging with GDB: Controlling GDB">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<META NAME="Generator" CONTENT="texi2html 1.64">
</HEAD>
<BODY LANG="" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080" ALINK="#FF0000">
<A NAME="SEC184"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC183"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_20.html#SEC185"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_3.html#SEC6"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb.html#SEC_Top"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_21.html#SEC192"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_35.html#SEC643">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H1> 19. Controlling GDB </H1>
<!--docid::SEC184::-->
<P>
You can alter the way GDB interacts with you by using the
<CODE>set</CODE> command. For commands controlling how GDB displays
data, see <A HREF="gdb_9.html#SEC60">Print settings</A>. Other settings are
described here.
</P><P>
<BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="gdb_20.html#SEC185">19.1 Prompt</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="gdb_20.html#SEC186">19.2 Command editing</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="gdb_20.html#SEC187">19.3 Command history</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="gdb_20.html#SEC188">19.4 Screen size</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="gdb_20.html#SEC189">19.5 Numbers</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="gdb_20.html#SEC190">19.6 Optional warnings and messages</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="gdb_20.html#SEC191">19.7 Optional messages about internal happenings</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
</TABLE></BLOCKQUOTE>
<P>
<A NAME="Prompt"></A>
<HR SIZE="6">
<A NAME="SEC185"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_20.html#SEC184"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_20.html#SEC186"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_20.html#SEC184"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_20.html#SEC184"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_21.html#SEC192"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_35.html#SEC643">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H2> 19.1 Prompt </H2>
<!--docid::SEC185::-->
<P>
<A NAME="IDX805"></A>
</P><P>
GDB indicates its readiness to read a command by printing a string
called the <EM>prompt</EM>. This string is normally <SAMP>`(gdb)'</SAMP>. You
can change the prompt string with the <CODE>set prompt</CODE> command. For
instance, when debugging GDB with GDB, it is useful to change
the prompt in one of the GDB sessions so that you can always tell
which one you are talking to.
</P><P>
<EM>Note:</EM> <CODE>set prompt</CODE> does not add a space for you after the
prompt you set. This allows you to set a prompt which ends in a space
or a prompt that does not.
</P><P>
<DL COMPACT>
<A NAME="IDX806"></A>
<DT><CODE>set prompt <VAR>newprompt</VAR></CODE>
<DD>Directs GDB to use <VAR>newprompt</VAR> as its prompt string henceforth.
<P>
<A NAME="IDX807"></A>
<DT><CODE>show prompt</CODE>
<DD>Prints a line of the form: <SAMP>`Gdb's prompt is: <VAR>your-prompt</VAR>'</SAMP>
</DL>
<P>
<A NAME="Editing"></A>
<HR SIZE="6">
<A NAME="SEC186"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_20.html#SEC185"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_20.html#SEC187"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_20.html#SEC187"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_20.html#SEC184"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_21.html#SEC192"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_35.html#SEC643">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H2> 19.2 Command editing </H2>
<!--docid::SEC186::-->
<P>
GDB reads its input commands via the <EM>readline</EM> interface. This
GNU library provides consistent behavior for programs which provide a
command line interface to the user. Advantages are GNU Emacs-style
or <EM>vi</EM>-style inline editing of commands, <CODE>csh</CODE>-like history
substitution, and a storage and recall of command history across
debugging sessions.
</P><P>
You may control the behavior of command line editing in GDB with the
command <CODE>set</CODE>.
</P><P>
<DL COMPACT>
<A NAME="IDX808"></A>
<A NAME="IDX809"></A>
<DT><CODE>set editing</CODE>
<DD><DT><CODE>set editing on</CODE>
<DD>Enable command line editing (enabled by default).
<P>
<DT><CODE>set editing off</CODE>
<DD>Disable command line editing.
<P>
<A NAME="IDX810"></A>
<DT><CODE>show editing</CODE>
<DD>Show whether command line editing is enabled.
</DL>
<P>
<A NAME="History"></A>
<HR SIZE="6">
<A NAME="SEC187"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_20.html#SEC186"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_20.html#SEC188"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_20.html#SEC188"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_20.html#SEC184"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_21.html#SEC192"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_35.html#SEC643">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H2> 19.3 Command history </H2>
<!--docid::SEC187::-->
<P>
GDB can keep track of the commands you type during your
debugging sessions, so that you can be certain of precisely what
happened. Use these commands to manage the GDB command
history facility.
</P><P>
<DL COMPACT>
<A NAME="IDX811"></A>
<A NAME="IDX812"></A>
<A NAME="IDX813"></A>
<A NAME="IDX814"></A>
<DT><CODE>set history filename <VAR>fname</VAR></CODE>
<DD>Set the name of the GDB command history file to <VAR>fname</VAR>.
This is the file where GDB reads an initial command history
list, and where it writes the command history from this session when it
exits. You can access this list through history expansion or through
the history command editing characters listed below. This file defaults
to the value of the environment variable <CODE>GDBHISTFILE</CODE>, or to
<TT>`./.gdb_history'</TT> (<TT>`./_gdb_history'</TT> on MS-DOS) if this variable
is not set.
<P>
<A NAME="IDX815"></A>
<A NAME="IDX816"></A>
<DT><CODE>set history save</CODE>
<DD><DT><CODE>set history save on</CODE>
<DD>Record command history in a file, whose name may be specified with the
<CODE>set history filename</CODE> command. By default, this option is disabled.
<P>
<DT><CODE>set history save off</CODE>
<DD>Stop recording command history in a file.
<P>
<A NAME="IDX817"></A>
<A NAME="IDX818"></A>
<DT><CODE>set history size <VAR>size</VAR></CODE>
<DD>Set the number of commands which GDB keeps in its history list.
This defaults to the value of the environment variable
<CODE>HISTSIZE</CODE>, or to 256 if this variable is not set.
</DL>
<P>
<A NAME="IDX819"></A>
History expansion assigns special meaning to the character <KBD>!</KBD>.
</P><P>
Since <KBD>!</KBD> is also the logical not operator in C, history expansion
is off by default. If you decide to enable history expansion with the
<CODE>set history expansion on</CODE> command, you may sometimes need to
follow <KBD>!</KBD> (when it is used as logical not, in an expression) with
a space or a tab to prevent it from being expanded. The readline
history facilities do not attempt substitution on the strings
<KBD>!=</KBD> and <KBD>!(</KBD>, even when history expansion is enabled.
</P><P>
The commands to control history expansion are:
</P><P>
<DL COMPACT>
<A NAME="IDX820"></A>
<DT><CODE>set history expansion on</CODE>
<DD><DT><CODE>set history expansion</CODE>
<DD>Enable history expansion. History expansion is off by default.
<P>
<DT><CODE>set history expansion off</CODE>
<DD>Disable history expansion.
<P>
The readline code comes with more complete documentation of
editing and history expansion features. Users unfamiliar with GNU Emacs
or <CODE>vi</CODE> may wish to read it.
</P><P>
<A NAME="IDX821"></A>
<DT><CODE>show history</CODE>
<DD><DT><CODE>show history filename</CODE>
<DD><DT><CODE>show history save</CODE>
<DD><DT><CODE>show history size</CODE>
<DD><DT><CODE>show history expansion</CODE>
<DD>These commands display the state of the GDB history parameters.
<CODE>show history</CODE> by itself displays all four states.
</DL>
<P>
<DL COMPACT>
<A NAME="IDX822"></A>
<DT><CODE>show commands</CODE>
<DD>Display the last ten commands in the command history.
<P>
<DT><CODE>show commands <VAR>n</VAR></CODE>
<DD>Print ten commands centered on command number <VAR>n</VAR>.
<P>
<DT><CODE>show commands +</CODE>
<DD>Print ten commands just after the commands last printed.
</DL>
<P>
<A NAME="Screen Size"></A>
<HR SIZE="6">
<A NAME="SEC188"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_20.html#SEC187"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_20.html#SEC189"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_20.html#SEC189"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_20.html#SEC184"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_21.html#SEC192"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_35.html#SEC643">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H2> 19.4 Screen size </H2>
<!--docid::SEC188::-->
<P>
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 <KBD>RET</KBD> when you want to continue the output, or <KBD>q</KBD>
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.
</P><P>
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 <CODE>TERM</CODE> environment variable and the
<CODE>stty rows</CODE> and <CODE>stty cols</CODE> settings. If this is not correct,
you can override it with the <CODE>set height</CODE> and <CODE>set
width</CODE> commands:
</P><P>
<DL COMPACT>
<A NAME="IDX823"></A>
<A NAME="IDX824"></A>
<A NAME="IDX825"></A>
<A NAME="IDX826"></A>
<DT><CODE>set height <VAR>lpp</VAR></CODE>
<DD><DT><CODE>show height</CODE>
<DD><DT><CODE>set width <VAR>cpl</VAR></CODE>
<DD><DT><CODE>show width</CODE>
<DD>These <CODE>set</CODE> commands specify a screen height of <VAR>lpp</VAR> lines and
a screen width of <VAR>cpl</VAR> characters. The associated <CODE>show</CODE>
commands display the current settings.
<P>
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.
</P><P>
Likewise, you can specify <SAMP>`set width 0'</SAMP> to prevent GDB
from wrapping its output.
</DL>
<P>
<A NAME="Numbers"></A>
<HR SIZE="6">
<A NAME="SEC189"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_20.html#SEC188"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_20.html#SEC190"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_20.html#SEC190"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_20.html#SEC184"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_21.html#SEC192"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_35.html#SEC643">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H2> 19.5 Numbers </H2>
<!--docid::SEC189::-->
<P>
You can always enter numbers in octal, decimal, or hexadecimal in
GDB by the usual conventions: octal numbers begin with
<SAMP>`0'</SAMP>, decimal numbers end with <SAMP>`.'</SAMP>, and hexadecimal numbers
begin with <SAMP>`0x'</SAMP>. 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 <CODE>set
radix</CODE> command.
</P><P>
<DL COMPACT>
<A NAME="IDX827"></A>
<DT><CODE>set input-radix <VAR>base</VAR></CODE>
<DD>Set the default base for numeric input. Supported choices
for <VAR>base</VAR> are decimal 8, 10, or 16. <VAR>base</VAR> must itself be
specified either unambiguously or using the current default radix; for
example, any of
<P>
<TABLE><tr><td>&nbsp;</td><td class=smallexample><FONT SIZE=-1><pre>set radix 012
set radix 10.
set radix 0xa
</FONT></pre></td></tr></table></P><P>
sets the base to decimal. On the other hand, <SAMP>`set radix 10'</SAMP>
leaves the radix unchanged no matter what it was.
</P><P>
<A NAME="IDX828"></A>
<DT><CODE>set output-radix <VAR>base</VAR></CODE>
<DD>Set the default base for numeric display. Supported choices
for <VAR>base</VAR> are decimal 8, 10, or 16. <VAR>base</VAR> must itself be
specified either unambiguously or using the current default radix.
<P>
<A NAME="IDX829"></A>
<DT><CODE>show input-radix</CODE>
<DD>Display the current default base for numeric input.
<P>
<A NAME="IDX830"></A>
<DT><CODE>show output-radix</CODE>
<DD>Display the current default base for numeric display.
</DL>
<P>
<A NAME="Messages/Warnings"></A>
<HR SIZE="6">
<A NAME="SEC190"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_20.html#SEC189"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_20.html#SEC191"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_20.html#SEC191"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_20.html#SEC184"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_21.html#SEC192"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_35.html#SEC643">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H2> 19.6 Optional warnings and messages </H2>
<!--docid::SEC190::-->
<P>
By default, GDB is silent about its inner workings. If you are
running on a slow machine, you may want to use the <CODE>set verbose</CODE>
command. This makes GDB tell you when it does a lengthy
internal operation, so you will not think it has crashed.
</P><P>
Currently, the messages controlled by <CODE>set verbose</CODE> are those
which announce that the symbol table for a source file is being read;
see <CODE>symbol-file</CODE> in <A HREF="gdb_16.html#SEC128">Commands to specify files</A>.
</P><P>
<DL COMPACT>
<A NAME="IDX831"></A>
<DT><CODE>set verbose on</CODE>
<DD>Enables GDB output of certain informational messages.
<P>
<DT><CODE>set verbose off</CODE>
<DD>Disables GDB output of certain informational messages.
<P>
<A NAME="IDX832"></A>
<DT><CODE>show verbose</CODE>
<DD>Displays whether <CODE>set verbose</CODE> is on or off.
</DL>
<P>
By default, if GDB encounters bugs in the symbol table of an
object file, it is silent; but if you are debugging a compiler, you may
find this information useful (see section <A HREF="gdb_16.html#SEC129">Errors reading symbol files</A>).
</P><P>
<DL COMPACT>
<A NAME="IDX833"></A>
<DT><CODE>set complaints <VAR>limit</VAR></CODE>
<DD>Permits GDB to output <VAR>limit</VAR> complaints about each type of
unusual symbols before becoming silent about the problem. Set
<VAR>limit</VAR> to zero to suppress all complaints; set it to a large number
to prevent complaints from being suppressed.
<P>
<A NAME="IDX834"></A>
<DT><CODE>show complaints</CODE>
<DD>Displays how many symbol complaints GDB is permitted to produce.
<P>
</DL>
<P>
By default, GDB is cautious, and asks what sometimes seems to be a
lot of stupid questions to confirm certain commands. For example, if
you try to run a program which is already running:
</P><P>
<TABLE><tr><td>&nbsp;</td><td class=smallexample><FONT SIZE=-1><pre>(gdb) run
The program being debugged has been started already.
Start it from the beginning? (y or n)
</FONT></pre></td></tr></table></P><P>
If you are willing to unflinchingly face the consequences of your own
commands, you can disable this "feature":
</P><P>
<DL COMPACT>
<A NAME="IDX835"></A>
<A NAME="IDX836"></A>
<A NAME="IDX837"></A>
<A NAME="IDX838"></A>
<DT><CODE>set confirm off</CODE>
<DD>Disables confirmation requests.
<P>
<DT><CODE>set confirm on</CODE>
<DD>Enables confirmation requests (the default).
<P>
<A NAME="IDX839"></A>
<DT><CODE>show confirm</CODE>
<DD>Displays state of confirmation requests.
<P>
</DL>
<P>
<A NAME="Debugging Output"></A>
<HR SIZE="6">
<A NAME="SEC191"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_20.html#SEC190"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_21.html#SEC192"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_20.html#SEC184"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_20.html#SEC184"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_21.html#SEC192"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_35.html#SEC643">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H2> 19.7 Optional messages about internal happenings </H2>
<!--docid::SEC191::-->
<DL COMPACT>
<A NAME="IDX840"></A>
<DT><CODE>set debug arch</CODE>
<DD>Turns on or off display of gdbarch debugging info. The default is off
<A NAME="IDX841"></A>
<DT><CODE>show debug arch</CODE>
<DD>Displays the current state of displaying gdbarch debugging info.
<A NAME="IDX842"></A>
<DT><CODE>set debug event</CODE>
<DD>Turns on or off display of GDB event debugging info. The
default is off.
<A NAME="IDX843"></A>
<DT><CODE>show debug event</CODE>
<DD>Displays the current state of displaying GDB event debugging
info.
<A NAME="IDX844"></A>
<DT><CODE>set debug expression</CODE>
<DD>Turns on or off display of GDB expression debugging info. The
default is off.
<A NAME="IDX845"></A>
<DT><CODE>show debug expression</CODE>
<DD>Displays the current state of displaying GDB expression
debugging info.
<A NAME="IDX846"></A>
<DT><CODE>set debug overload</CODE>
<DD>Turns on or off display of GDB C<TT>++</TT> overload debugging
info. This includes info such as ranking of functions, etc. The default
is off.
<A NAME="IDX847"></A>
<DT><CODE>show debug overload</CODE>
<DD>Displays the current state of displaying GDB C<TT>++</TT> overload
debugging info.
<A NAME="IDX848"></A>
<A NAME="IDX849"></A>
<A NAME="IDX850"></A>
<DT><CODE>set debug remote</CODE>
<DD>Turns on or off display of reports on all packets sent back and forth across
the serial line to the remote machine. The info is printed on the
GDB standard output stream. The default is off.
<A NAME="IDX851"></A>
<DT><CODE>show debug remote</CODE>
<DD>Displays the state of display of remote packets.
<A NAME="IDX852"></A>
<DT><CODE>set debug serial</CODE>
<DD>Turns on or off display of GDB serial debugging info. The
default is off.
<A NAME="IDX853"></A>
<DT><CODE>show debug serial</CODE>
<DD>Displays the current state of displaying GDB serial debugging
info.
<A NAME="IDX854"></A>
<DT><CODE>set debug target</CODE>
<DD>Turns on or off display of GDB target debugging info. This info
includes what is going on at the target level of GDB, as it happens. The
default is off.
<A NAME="IDX855"></A>
<DT><CODE>show debug target</CODE>
<DD>Displays the current state of displaying GDB target debugging
info.
<A NAME="IDX856"></A>
<DT><CODE>set debug varobj</CODE>
<DD>Turns on or off display of GDB variable object debugging
info. The default is off.
<A NAME="IDX857"></A>
<DT><CODE>show debug varobj</CODE>
<DD>Displays the current state of displaying GDB variable object
debugging info.
</DL>
<P>
<A NAME="Sequences"></A>
<HR SIZE="6">
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_20.html#SEC184"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_21.html#SEC192"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_35.html#SEC643">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<BR>
<FONT SIZE="-1">
<address>
<p>Please send FSF &amp; GNU inquiries &amp; questions to <a
href="mailto:gnu@gnu.org">gnu@gnu.org</a>. There are also <a
href="http://www.gnu.org/home.html#ContactInfo">other ways to
contact</a> the FSF.</p>
<p>These pages are maintained by <a
href="http://www.gnu.org/software/gdb/">the GDB developers</a>.</p>
<p>Copyright Free Software Foundation, Inc., 59 Temple Place - Suite
330, Boston, MA 02111, USA.</p>
<p>Verbatim copying and distribution of this entire article is
permitted in any medium, provided this notice is preserved.</p>
</address>
This document was generated
by <I>GDB Administrator</I> on <I>November, 11 2002</I>
using <A HREF="http://www.mathematik.uni-kl.de/~obachman/Texi2html
"><I>texi2html</I></A>
</BODY>
</HTML>