You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
876 lines
36 KiB
HTML
876 lines
36 KiB
HTML
15 years ago
|
<HTML>
|
||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||
|
<!-- Created on March, 27 2008 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="SEC220"></A>
|
||
|
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
|
||
|
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC219"> < </A>]</TD>
|
||
|
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_20.html#SEC221"> > </A>]</TD>
|
||
|
<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_3.html#SEC6"> << </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#SEC229"> >> </A>]</TD>
|
||
|
<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <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_38.html#SEC764">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::SEC220::-->
|
||
|
<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#SEC66">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#SEC221">19.1 Prompt</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
|
||
|
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="gdb_20.html#SEC222">19.2 Command Editing</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">Command editing</TD></TR>
|
||
|
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="gdb_20.html#SEC223">19.3 Command History</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">Command history</TD></TR>
|
||
|
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="gdb_20.html#SEC224">19.4 Screen Size</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">Screen size</TD></TR>
|
||
|
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="gdb_20.html#SEC225">19.5 Numbers</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
|
||
|
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="gdb_20.html#SEC226">19.6 Configuring the Current ABI</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">Configuring the current ABI</TD></TR>
|
||
|
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="gdb_20.html#SEC227">19.7 Optional Warnings and Messages</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">Optional warnings and messages</TD></TR>
|
||
|
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="gdb_20.html#SEC228">19.8 Optional Messages about Internal Happenings</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">Optional messages about internal happenings</TD></TR>
|
||
|
</TABLE></BLOCKQUOTE>
|
||
|
<P>
|
||
|
|
||
|
<A NAME="Prompt"></A>
|
||
|
<HR SIZE="6">
|
||
|
<A NAME="SEC221"></A>
|
||
|
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
|
||
|
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_20.html#SEC220"> < </A>]</TD>
|
||
|
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_20.html#SEC222"> > </A>]</TD>
|
||
|
<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_20.html#SEC220"> << </A>]</TD>
|
||
|
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_20.html#SEC220"> Up </A>]</TD>
|
||
|
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_21.html#SEC229"> >> </A>]</TD>
|
||
|
<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <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_38.html#SEC764">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::SEC221::-->
|
||
|
<P>
|
||
|
|
||
|
<A NAME="IDX1103"></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="IDX1104"></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="IDX1105"></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="SEC222"></A>
|
||
|
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
|
||
|
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_20.html#SEC221"> < </A>]</TD>
|
||
|
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_20.html#SEC223"> > </A>]</TD>
|
||
|
<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_20.html#SEC223"> << </A>]</TD>
|
||
|
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_20.html#SEC220"> Up </A>]</TD>
|
||
|
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_21.html#SEC229"> >> </A>]</TD>
|
||
|
<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <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_38.html#SEC764">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::SEC222::-->
|
||
|
<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="IDX1106"></A>
|
||
|
<A NAME="IDX1107"></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="IDX1108"></A>
|
||
|
<DT><CODE>show editing</CODE>
|
||
|
<DD>Show whether command line editing is enabled.
|
||
|
</DL>
|
||
|
<P>
|
||
|
|
||
|
See section <A HREF="gdb_28.html#SEC657">27. Command Line Editing</A>, for more details about the Readline
|
||
|
interface. Users unfamiliar with GNU Emacs or <CODE>vi</CODE> are
|
||
|
encouraged to read that chapter.
|
||
|
</P><P>
|
||
|
|
||
|
<A NAME="Command History"></A>
|
||
|
<HR SIZE="6">
|
||
|
<A NAME="SEC223"></A>
|
||
|
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
|
||
|
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_20.html#SEC222"> < </A>]</TD>
|
||
|
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_20.html#SEC224"> > </A>]</TD>
|
||
|
<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_20.html#SEC224"> << </A>]</TD>
|
||
|
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_20.html#SEC220"> Up </A>]</TD>
|
||
|
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_21.html#SEC229"> >> </A>]</TD>
|
||
|
<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <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_38.html#SEC764">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::SEC223::-->
|
||
|
<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>
|
||
|
|
||
|
GDB uses the GNU History library, a part of the Readline
|
||
|
package, to provide the history facility. See section <A HREF="gdb_29.html#SEC679">28. Using History Interactively</A>, for the detailed description of the History library.
|
||
|
</P><P>
|
||
|
|
||
|
To issue a command to GDB without affecting certain aspects of
|
||
|
the state which is seen by users, prefix it with <SAMP>`server '</SAMP>
|
||
|
(see section <A HREF="gdb_26.html#SEC648">25.2 The Server Prefix</A>). This
|
||
|
means that this command will not affect the command history, nor will it
|
||
|
affect GDB's notion of which command to repeat if <KBD>RET</KBD> is
|
||
|
pressed on a line by itself.
|
||
|
</P><P>
|
||
|
|
||
|
<A NAME="IDX1109"></A>
|
||
|
The server prefix does not affect the recording of values into the value
|
||
|
history; to print a value without recording it into the value history,
|
||
|
use the <CODE>output</CODE> command instead of the <CODE>print</CODE> command.
|
||
|
</P><P>
|
||
|
|
||
|
Here is the description of GDB commands related to command
|
||
|
history.
|
||
|
</P><P>
|
||
|
|
||
|
<DL COMPACT>
|
||
|
<A NAME="IDX1110"></A>
|
||
|
<A NAME="IDX1111"></A>
|
||
|
<A NAME="IDX1112"></A>
|
||
|
<A NAME="IDX1113"></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="IDX1114"></A>
|
||
|
<A NAME="IDX1115"></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="IDX1116"></A>
|
||
|
<A NAME="IDX1117"></A>
|
||
|
<A NAME="IDX1118"></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>
|
||
|
|
||
|
History expansion assigns special meaning to the character <KBD>!</KBD>.
|
||
|
See section <A HREF="gdb_29.html#SEC681">28.1.1 Event Designators</A>, for more details.
|
||
|
</P><P>
|
||
|
|
||
|
<A NAME="IDX1119"></A>
|
||
|
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>
|
||
|
<DT><CODE>set history expansion on</CODE>
|
||
|
<DD><DT><CODE>set history expansion</CODE>
|
||
|
<DD><A NAME="IDX1120"></A>
|
||
|
Enable history expansion. History expansion is off by default.
|
||
|
<P>
|
||
|
|
||
|
<DT><CODE>set history expansion off</CODE>
|
||
|
<DD>Disable history expansion.
|
||
|
<P>
|
||
|
|
||
|
<A NAME="IDX1121"></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="IDX1122"></A>
|
||
|
<A NAME="IDX1123"></A>
|
||
|
<A NAME="IDX1124"></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="SEC224"></A>
|
||
|
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
|
||
|
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_20.html#SEC223"> < </A>]</TD>
|
||
|
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_20.html#SEC225"> > </A>]</TD>
|
||
|
<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_20.html#SEC225"> << </A>]</TD>
|
||
|
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_20.html#SEC220"> Up </A>]</TD>
|
||
|
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_21.html#SEC229"> >> </A>]</TD>
|
||
|
<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <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_38.html#SEC764">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::SEC224::-->
|
||
|
<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="IDX1125"></A>
|
||
|
<A NAME="IDX1126"></A>
|
||
|
<A NAME="IDX1127"></A>
|
||
|
<A NAME="IDX1128"></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.
|
||
|
</P><P>
|
||
|
|
||
|
<DT><CODE>set pagination on</CODE>
|
||
|
<DD><DT><CODE>set pagination off</CODE>
|
||
|
<DD><A NAME="IDX1129"></A>
|
||
|
Turn the output pagination on or off; the default is on. Turning
|
||
|
pagination off is the alternative to <CODE>set height 0</CODE>.
|
||
|
<P>
|
||
|
|
||
|
<DT><CODE>show pagination</CODE>
|
||
|
<DD><A NAME="IDX1130"></A>
|
||
|
Show the current pagination mode.
|
||
|
</DL>
|
||
|
<P>
|
||
|
|
||
|
<A NAME="Numbers"></A>
|
||
|
<HR SIZE="6">
|
||
|
<A NAME="SEC225"></A>
|
||
|
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
|
||
|
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_20.html#SEC224"> < </A>]</TD>
|
||
|
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_20.html#SEC226"> > </A>]</TD>
|
||
|
<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_20.html#SEC226"> << </A>]</TD>
|
||
|
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_20.html#SEC220"> Up </A>]</TD>
|
||
|
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_21.html#SEC229"> >> </A>]</TD>
|
||
|
<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <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_38.html#SEC764">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::SEC225::-->
|
||
|
<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 neither begin with <SAMP>`0'</SAMP> or
|
||
|
<SAMP>`0x'</SAMP>, nor end with a <SAMP>`.'</SAMP> 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 commands described below.
|
||
|
</P><P>
|
||
|
|
||
|
<DL COMPACT>
|
||
|
<A NAME="IDX1131"></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 input radix; for
|
||
|
example, any of
|
||
|
<P>
|
||
|
|
||
|
<TABLE><tr><td> </td><td class=smallexample><FONT SIZE=-1><pre>set input-radix 012
|
||
|
set input-radix 10.
|
||
|
set input-radix 0xa
|
||
|
</FONT></pre></td></tr></table></P><P>
|
||
|
|
||
|
sets the input base to decimal. On the other hand, <SAMP>`set input-radix 10'</SAMP>
|
||
|
leaves the input radix unchanged, no matter what it was, since
|
||
|
<SAMP>`10'</SAMP>, being without any leading or trailing signs of its base, is
|
||
|
interpreted in the current radix. Thus, if the current radix is 16,
|
||
|
<SAMP>`10'</SAMP> is interpreted in hex, i.e. as 16 decimal, which doesn't
|
||
|
change the radix.
|
||
|
</P><P>
|
||
|
|
||
|
<A NAME="IDX1132"></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 input radix.
|
||
|
<P>
|
||
|
|
||
|
<A NAME="IDX1133"></A>
|
||
|
<DT><CODE>show input-radix</CODE>
|
||
|
<DD>Display the current default base for numeric input.
|
||
|
<P>
|
||
|
|
||
|
<A NAME="IDX1134"></A>
|
||
|
<DT><CODE>show output-radix</CODE>
|
||
|
<DD>Display the current default base for numeric display.
|
||
|
<P>
|
||
|
|
||
|
<DT><CODE>set radix [<VAR>base</VAR>]</CODE>
|
||
|
<DD><DT><CODE>show radix</CODE>
|
||
|
<DD><A NAME="IDX1135"></A>
|
||
|
<A NAME="IDX1136"></A>
|
||
|
These commands set and show the default base for both input and output
|
||
|
of numbers. <CODE>set radix</CODE> sets the radix of input and output to
|
||
|
the same base; without an argument, it resets the radix back to its
|
||
|
default value of 10.
|
||
|
<P>
|
||
|
|
||
|
</DL>
|
||
|
<P>
|
||
|
|
||
|
<A NAME="ABI"></A>
|
||
|
<HR SIZE="6">
|
||
|
<A NAME="SEC226"></A>
|
||
|
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
|
||
|
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_20.html#SEC225"> < </A>]</TD>
|
||
|
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_20.html#SEC227"> > </A>]</TD>
|
||
|
<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_20.html#SEC227"> << </A>]</TD>
|
||
|
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_20.html#SEC220"> Up </A>]</TD>
|
||
|
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_21.html#SEC229"> >> </A>]</TD>
|
||
|
<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <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_38.html#SEC764">Index</A>]</TD>
|
||
|
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_abt.html#SEC_About"> ? </A>]</TD>
|
||
|
</TR></TABLE>
|
||
|
<H2> 19.6 Configuring the Current ABI </H2>
|
||
|
<!--docid::SEC226::-->
|
||
|
<P>
|
||
|
|
||
|
GDB can determine the <EM>ABI</EM> (Application Binary Interface) of your
|
||
|
application automatically. However, sometimes you need to override its
|
||
|
conclusions. Use these commands to manage GDB's view of the
|
||
|
current ABI.
|
||
|
</P><P>
|
||
|
|
||
|
<A NAME="IDX1137"></A>
|
||
|
<A NAME="IDX1138"></A>
|
||
|
<A NAME="IDX1139"></A>
|
||
|
</P><P>
|
||
|
|
||
|
One GDB configuration can debug binaries for multiple operating
|
||
|
system targets, either via remote debugging or native emulation.
|
||
|
GDB will autodetect the <EM>OS ABI</EM> (Operating System ABI) in use,
|
||
|
but you can override its conclusion using the <CODE>set osabi</CODE> command.
|
||
|
One example where this is useful is in debugging of binaries which use
|
||
|
an alternate C library (e.g. UCLIBC for GNU/Linux) which does
|
||
|
not have the same identifying marks that the standard C library for your
|
||
|
platform provides.
|
||
|
</P><P>
|
||
|
|
||
|
<DL COMPACT>
|
||
|
<DT><CODE>show osabi</CODE>
|
||
|
<DD>Show the OS ABI currently in use.
|
||
|
<P>
|
||
|
|
||
|
<DT><CODE>set osabi</CODE>
|
||
|
<DD>With no argument, show the list of registered available OS ABI's.
|
||
|
<P>
|
||
|
|
||
|
<DT><CODE>set osabi <VAR>abi</VAR></CODE>
|
||
|
<DD>Set the current OS ABI to <VAR>abi</VAR>.
|
||
|
</DL>
|
||
|
<P>
|
||
|
|
||
|
<A NAME="IDX1140"></A>
|
||
|
</P><P>
|
||
|
|
||
|
Generally, the way that an argument of type <CODE>float</CODE> is passed to a
|
||
|
function depends on whether the function is prototyped. For a prototyped
|
||
|
(i.e. ANSI/ISO style) function, <CODE>float</CODE> arguments are passed unchanged,
|
||
|
according to the architecture's convention for <CODE>float</CODE>. For unprototyped
|
||
|
(i.e. K&R style) functions, <CODE>float</CODE> arguments are first promoted to type
|
||
|
<CODE>double</CODE> and then passed.
|
||
|
</P><P>
|
||
|
|
||
|
Unfortunately, some forms of debug information do not reliably indicate whether
|
||
|
a function is prototyped. If GDB calls a function that is not marked
|
||
|
as prototyped, it consults <KBD>set coerce-float-to-double</KBD>.
|
||
|
</P><P>
|
||
|
|
||
|
<DL COMPACT>
|
||
|
<A NAME="IDX1141"></A>
|
||
|
<DT><CODE>set coerce-float-to-double</CODE>
|
||
|
<DD><DT><CODE>set coerce-float-to-double on</CODE>
|
||
|
<DD>Arguments of type <CODE>float</CODE> will be promoted to <CODE>double</CODE> when passed
|
||
|
to an unprototyped function. This is the default setting.
|
||
|
<P>
|
||
|
|
||
|
<DT><CODE>set coerce-float-to-double off</CODE>
|
||
|
<DD>Arguments of type <CODE>float</CODE> will be passed directly to unprototyped
|
||
|
functions.
|
||
|
<P>
|
||
|
|
||
|
<A NAME="IDX1142"></A>
|
||
|
<DT><CODE>show coerce-float-to-double</CODE>
|
||
|
<DD>Show the current setting of promoting <CODE>float</CODE> to <CODE>double</CODE>.
|
||
|
</DL>
|
||
|
<P>
|
||
|
|
||
|
<A NAME="IDX1143"></A>
|
||
|
<A NAME="IDX1144"></A>
|
||
|
GDB needs to know the ABI used for your program's C<TT>++</TT>
|
||
|
objects. The correct C<TT>++</TT> ABI depends on which C<TT>++</TT> compiler was
|
||
|
used to build your application. GDB only fully supports
|
||
|
programs with a single C<TT>++</TT> ABI; if your program contains code using
|
||
|
multiple C<TT>++</TT> ABI's or if GDB can not identify your
|
||
|
program's ABI correctly, you can tell GDB which ABI to use.
|
||
|
Currently supported ABI's include "gnu-v2", for <CODE>g++</CODE> versions
|
||
|
before 3.0, "gnu-v3", for <CODE>g++</CODE> versions 3.0 and later, and
|
||
|
"hpaCC" for the HP ANSI C<TT>++</TT> compiler. Other C<TT>++</TT> compilers may
|
||
|
use the "gnu-v2" or "gnu-v3" ABI's as well. The default setting is
|
||
|
"auto".
|
||
|
</P><P>
|
||
|
|
||
|
<DL COMPACT>
|
||
|
<DT><CODE>show cp-abi</CODE>
|
||
|
<DD>Show the C<TT>++</TT> ABI currently in use.
|
||
|
<P>
|
||
|
|
||
|
<DT><CODE>set cp-abi</CODE>
|
||
|
<DD>With no argument, show the list of supported C<TT>++</TT> ABI's.
|
||
|
<P>
|
||
|
|
||
|
<DT><CODE>set cp-abi <VAR>abi</VAR></CODE>
|
||
|
<DD><DT><CODE>set cp-abi auto</CODE>
|
||
|
<DD>Set the current C<TT>++</TT> ABI to <VAR>abi</VAR>, or return to automatic detection.
|
||
|
</DL>
|
||
|
<P>
|
||
|
|
||
|
<A NAME="Messages/Warnings"></A>
|
||
|
<HR SIZE="6">
|
||
|
<A NAME="SEC227"></A>
|
||
|
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
|
||
|
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_20.html#SEC226"> < </A>]</TD>
|
||
|
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_20.html#SEC228"> > </A>]</TD>
|
||
|
<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_20.html#SEC228"> << </A>]</TD>
|
||
|
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_20.html#SEC220"> Up </A>]</TD>
|
||
|
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_21.html#SEC229"> >> </A>]</TD>
|
||
|
<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <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_38.html#SEC764">Index</A>]</TD>
|
||
|
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_abt.html#SEC_About"> ? </A>]</TD>
|
||
|
</TR></TABLE>
|
||
|
<H2> 19.7 Optional Warnings and Messages </H2>
|
||
|
<!--docid::SEC227::-->
|
||
|
<P>
|
||
|
|
||
|
<A NAME="IDX1145"></A>
|
||
|
<A NAME="IDX1146"></A>
|
||
|
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#SEC155">Commands to Specify Files</A>.
|
||
|
</P><P>
|
||
|
|
||
|
<DL COMPACT>
|
||
|
<A NAME="IDX1147"></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="IDX1148"></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#SEC157">Errors Reading Symbol Files</A>).
|
||
|
</P><P>
|
||
|
|
||
|
<DL COMPACT>
|
||
|
|
||
|
<A NAME="IDX1149"></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="IDX1150"></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> </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="IDX1151"></A>
|
||
|
<A NAME="IDX1152"></A>
|
||
|
<A NAME="IDX1153"></A>
|
||
|
<A NAME="IDX1154"></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="IDX1155"></A>
|
||
|
<DT><CODE>show confirm</CODE>
|
||
|
<DD>Displays state of confirmation requests.
|
||
|
<P>
|
||
|
|
||
|
</DL>
|
||
|
<P>
|
||
|
|
||
|
<A NAME="IDX1156"></A>
|
||
|
If you need to debug user-defined commands or sourced files you may find it
|
||
|
useful to enable <EM>command tracing</EM>. In this mode each command will be
|
||
|
printed as it is executed, prefixed with one or more <SAMP>`+'</SAMP> symbols, the
|
||
|
quantity denoting the call depth of each command.
|
||
|
</P><P>
|
||
|
|
||
|
<DL COMPACT>
|
||
|
<A NAME="IDX1157"></A>
|
||
|
<A NAME="IDX1158"></A>
|
||
|
<DT><CODE>set trace-commands on</CODE>
|
||
|
<DD>Enable command tracing.
|
||
|
<DT><CODE>set trace-commands off</CODE>
|
||
|
<DD>Disable command tracing.
|
||
|
<DT><CODE>show trace-commands</CODE>
|
||
|
<DD>Display the current state of command tracing.
|
||
|
</DL>
|
||
|
<P>
|
||
|
|
||
|
<A NAME="Debugging Output"></A>
|
||
|
<HR SIZE="6">
|
||
|
<A NAME="SEC228"></A>
|
||
|
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
|
||
|
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_20.html#SEC227"> < </A>]</TD>
|
||
|
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_21.html#SEC229"> > </A>]</TD>
|
||
|
<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_20.html#SEC220"> << </A>]</TD>
|
||
|
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_20.html#SEC220"> Up </A>]</TD>
|
||
|
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_21.html#SEC229"> >> </A>]</TD>
|
||
|
<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <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_38.html#SEC764">Index</A>]</TD>
|
||
|
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_abt.html#SEC_About"> ? </A>]</TD>
|
||
|
</TR></TABLE>
|
||
|
<H2> 19.8 Optional Messages about Internal Happenings </H2>
|
||
|
<!--docid::SEC228::-->
|
||
|
<P>
|
||
|
|
||
|
GDB has commands that enable optional debugging messages from
|
||
|
various GDB subsystems; normally these commands are of
|
||
|
interest to GDB maintainers, or when reporting a bug. This
|
||
|
section documents those commands.
|
||
|
</P><P>
|
||
|
|
||
|
<DL COMPACT>
|
||
|
<A NAME="IDX1159"></A>
|
||
|
<DT><CODE>set exec-done-display</CODE>
|
||
|
<DD>Turns on or off the notification of asynchronous commands'
|
||
|
completion. When on, GDB will print a message when an
|
||
|
asynchronous command finishes its execution. The default is off.
|
||
|
<A NAME="IDX1160"></A>
|
||
|
<DT><CODE>show exec-done-display</CODE>
|
||
|
<DD>Displays the current setting of asynchronous command completion
|
||
|
notification.
|
||
|
<A NAME="IDX1161"></A>
|
||
|
<A NAME="IDX1162"></A>
|
||
|
<A NAME="IDX1163"></A>
|
||
|
<DT><CODE>set debug arch</CODE>
|
||
|
<DD>Turns on or off display of gdbarch debugging info. The default is off
|
||
|
<A NAME="IDX1164"></A>
|
||
|
<DT><CODE>show debug arch</CODE>
|
||
|
<DD>Displays the current state of displaying gdbarch debugging info.
|
||
|
<DT><CODE>set debug aix-thread</CODE>
|
||
|
<DD><A NAME="IDX1165"></A>
|
||
|
Display debugging messages about inner workings of the AIX thread
|
||
|
module.
|
||
|
<DT><CODE>show debug aix-thread</CODE>
|
||
|
<DD>Show the current state of AIX thread debugging info display.
|
||
|
<DT><CODE>set debug event</CODE>
|
||
|
<DD><A NAME="IDX1166"></A>
|
||
|
Turns on or off display of GDB event debugging info. The
|
||
|
default is off.
|
||
|
<DT><CODE>show debug event</CODE>
|
||
|
<DD>Displays the current state of displaying GDB event debugging
|
||
|
info.
|
||
|
<DT><CODE>set debug expression</CODE>
|
||
|
<DD><A NAME="IDX1167"></A>
|
||
|
Turns on or off display of debugging info about GDB
|
||
|
expression parsing. The default is off.
|
||
|
<DT><CODE>show debug expression</CODE>
|
||
|
<DD>Displays the current state of displaying debugging info about
|
||
|
GDB expression parsing.
|
||
|
<DT><CODE>set debug frame</CODE>
|
||
|
<DD><A NAME="IDX1168"></A>
|
||
|
Turns on or off display of GDB frame debugging info. The
|
||
|
default is off.
|
||
|
<DT><CODE>show debug frame</CODE>
|
||
|
<DD>Displays the current state of displaying GDB frame debugging
|
||
|
info.
|
||
|
<DT><CODE>set debug infrun</CODE>
|
||
|
<DD><A NAME="IDX1169"></A>
|
||
|
Turns on or off display of GDB debugging info for running the inferior.
|
||
|
The default is off. <TT>`infrun.c'</TT> contains GDB's runtime state machine used
|
||
|
for implementing operations such as single-stepping the inferior.
|
||
|
<DT><CODE>show debug infrun</CODE>
|
||
|
<DD>Displays the current state of GDB inferior debugging.
|
||
|
<DT><CODE>set debug lin-lwp</CODE>
|
||
|
<DD><A NAME="IDX1170"></A>
|
||
|
<A NAME="IDX1171"></A>
|
||
|
Turns on or off debugging messages from the Linux LWP debug support.
|
||
|
<DT><CODE>show debug lin-lwp</CODE>
|
||
|
<DD>Show the current state of Linux LWP debugging messages.
|
||
|
<DT><CODE>set debug observer</CODE>
|
||
|
<DD><A NAME="IDX1172"></A>
|
||
|
Turns on or off display of GDB observer debugging. This
|
||
|
includes info such as the notification of observable events.
|
||
|
<DT><CODE>show debug observer</CODE>
|
||
|
<DD>Displays the current state of observer debugging.
|
||
|
<DT><CODE>set debug overload</CODE>
|
||
|
<DD><A NAME="IDX1173"></A>
|
||
|
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.
|
||
|
<DT><CODE>show debug overload</CODE>
|
||
|
<DD>Displays the current state of displaying GDB C<TT>++</TT> overload
|
||
|
debugging info.
|
||
|
<A NAME="IDX1174"></A>
|
||
|
<A NAME="IDX1175"></A>
|
||
|
<A NAME="IDX1176"></A>
|
||
|
<A NAME="IDX1177"></A>
|
||
|
<A NAME="IDX1178"></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.
|
||
|
<DT><CODE>show debug remote</CODE>
|
||
|
<DD>Displays the state of display of remote packets.
|
||
|
<DT><CODE>set debug serial</CODE>
|
||
|
<DD>Turns on or off display of GDB serial debugging info. The
|
||
|
default is off.
|
||
|
<DT><CODE>show debug serial</CODE>
|
||
|
<DD>Displays the current state of displaying GDB serial debugging
|
||
|
info.
|
||
|
<DT><CODE>set debug solib-frv</CODE>
|
||
|
<DD><A NAME="IDX1179"></A>
|
||
|
Turns on or off debugging messages for FR-V shared-library code.
|
||
|
<DT><CODE>show debug solib-frv</CODE>
|
||
|
<DD>Display the current state of FR-V shared-library code debugging
|
||
|
messages.
|
||
|
<DT><CODE>set debug target</CODE>
|
||
|
<DD><A NAME="IDX1180"></A>
|
||
|
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 0. Set it to 1 to track events, and to 2 to also track the
|
||
|
value of large memory transfers. Changes to this flag do not take effect
|
||
|
until the next time you connect to a target or use the <CODE>run</CODE> command.
|
||
|
<DT><CODE>show debug target</CODE>
|
||
|
<DD>Displays the current state of displaying GDB target debugging
|
||
|
info.
|
||
|
<DT><CODE>set debugvarobj</CODE>
|
||
|
<DD><A NAME="IDX1181"></A>
|
||
|
Turns on or off display of GDB variable object debugging
|
||
|
info. The default is off.
|
||
|
<DT><CODE>show debugvarobj</CODE>
|
||
|
<DD>Displays the current state of displaying GDB variable object
|
||
|
debugging info.
|
||
|
<DT><CODE>set debug xml</CODE>
|
||
|
<DD><A NAME="IDX1182"></A>
|
||
|
Turns on or off debugging messages for built-in XML parsers.
|
||
|
<DT><CODE>show debug xml</CODE>
|
||
|
<DD>Displays the current state of XML debugging messages.
|
||
|
</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#SEC220"> << </A>]</TD>
|
||
|
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_21.html#SEC229"> >> </A>]</TD>
|
||
|
<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <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_38.html#SEC764">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 & GNU inquiries & 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>March, 27 2008</I>
|
||
|
using <A HREF="http://www.mathematik.uni-kl.de/~obachman/Texi2html
|
||
|
"><I>texi2html</I></A>
|
||
|
|
||
|
</BODY>
|
||
|
</HTML>
|