From 9c3ad547991abffab247cc066de6fde497f22a74 Mon Sep 17 00:00:00 2001 From: Roland Pesch Date: Thu, 16 May 1991 00:46:09 +0000 Subject: [PATCH] * gdb.texinfo: (1) better introductory example; (2) more consistent use of @code, @samp, @file, @kbd throughout; small cleanups to first three nodes. --- gdb/doc/gdb.texinfo | 1365 +++++++++++++++++++++++-------------------- 1 file changed, 720 insertions(+), 645 deletions(-) diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index 73f39f6bd41..944bc44e3e7 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -1,6 +1,7 @@ \input texinfo @setfilename _GDBP__.info @c $Id$ +@c THIS MANUAL REQUIRES TEXINFO-2 macros and info-makers to format properly. @c @c NOTE: this manual is marked up for preprocessing with a collection @c of m4 macros called "pretex.m4". If you see <_if__> and <_fi__> @@ -87,7 +88,7 @@ _fi__(!_GENERIC__) \def\$#1${{#1}} % Kluge: collect RCS revision info without $...$ \xdef\manvers{\$Revision$} % For use in headers, footers too {\parskip=0pt -\hfill Cygnus Support\par +\hfill rms\@ai.mit.edu, pesch\@cygnus.com\par \hfill {\it Using _GDBN__}, \manvers\par \hfill \TeX{}info \texinfoversion\par } @@ -125,7 +126,7 @@ program was doing at the moment it crashed. _GDBN__ can do four main kinds of things (plus other things in support of these) to help you catch bugs in the act: -@enumerate +@itemize @bullet @item Start your program, specifying anything that might affect its behavior. @@ -138,14 +139,14 @@ Examine what has happened, when your program has stopped. @item Change things in your program, so you can experiment with correcting the effects of one bug and go on to learn about another. -@end enumerate +@end itemize _GDBN__ can be used to debug programs written in C and C++. Pascal support is being implemented, and Fortran support will be added when a GNU Fortran compiler is ready. @unnumberedsec Free Software -_GDBN__ is Free Software, protected by the GNU General Public License (GPL). +_GDBN__ is @dfn{free software}, protected by the GNU General Public License (GPL). The GPL gives you the freedom to copy or adapt a licensed program---but every person getting a copy also gets with it the freedom to modify that copy (which means that they must get access to @@ -157,96 +158,95 @@ Fundamentally, the General Public License is a license which says that you have these freedoms and that you can't take these freedoms away from anyone else. -For full details, @pxref{License}. +For full details, @pxref{Copying}. @menu -* New Features:: New Features in _GDBN__ version 4.0 -* Sample Session:: A Sample _GDBN__ Session -* Invocation:: Getting In and Out of _GDBN__ -* Commands:: _GDBN__ Commands -* Running:: Running Programs Under _GDBN__ -* Stopping:: Stopping and Continuing -* Stack:: Examining the Stack -* Source:: Examining Source Files -* Data:: Examining Data -* Symbols:: Examining the Symbol Table -* Altering:: Altering Execution -* GDB Files:: _GDBN__'s Files -* Targets:: Specifying a Debugging Target -* Controlling _GDBN__:: Controlling _GDBN__ -* Sequences:: Canned Sequences of Commands -* Emacs:: Using _GDBN__ under GNU Emacs -* _GDBN__ Bugs:: Reporting Bugs in _GDBN__ -* Installing _GDBN__:: Installing _GDBN__ -* License:: GNU GENERAL PUBLIC LICENSE -* Index:: Index +* New Features:: New Features in _GDBN__ version 4.0 +* Sample Session:: A Sample _GDBN__ Session +* Invocation:: Getting In and Out of _GDBN__ +* Commands:: _GDBN__ Commands +* Running:: Running Programs Under _GDBN__ +* Stopping:: Stopping and Continuing +* Stack:: Examining the Stack +* Source:: Examining Source Files +* Data:: Examining Data +* Symbols:: Examining the Symbol Table +* Altering:: Altering Execution +* GDB Files:: _GDBN__'s Files +* Targets:: Specifying a Debugging Target +* Controlling _GDBN__:: Controlling _GDBN__ +* Sequences:: Canned Sequences of Commands +* Emacs:: Using _GDBN__ under GNU Emacs +* _GDBN__ Bugs:: Reporting Bugs in _GDBN__ +* Installing _GDBN__:: Installing _GDBN__ +* Copying:: GNU GENERAL PUBLIC LICENSE +* Index:: Index @end menu @node New Features, Sample Session, Top, Top @unnumbered New Features in _GDBN__ version 4.0 -@itemize @bullet -@item -TARGETS: Using the new command @samp{target}, you can select at runtime +@table @emph +@item Targets +Using the new command @code{target}, you can select at runtime whether you are debugging local files, local processes, standalone systems over the serial port, realtime systems over a TCP/IP connection, etc. _GDBN__ now uses a function vector to mediate access to all the different possible targets, making it much easier to add support for new remote protocols. -@item -WATCHPOINTS: _GDBN__ now sports watchpoints as well as breakpoints. You can +@item Watchpoints +_GDBN__ now sports watchpoints as well as breakpoints. You can use a watchpoint to stop execution whenever the value of an expression changes, without having to predict a particular place in the inferior process where this may happen. -@item -OBJECT CODE FORMATS: _GDBN__ uses a new scheme called Binary File -Descriptors (BFD) to permit it to switch dynamically, without -reconfiguration or recompilation, between different object-file -formats. Formats currently supported are COFF, a.out, and the new -Intel 960 b.out; files may be read as .o's, archive libraries, or core -dumps. BFD is available as a subroutine library so that other -programs may take advantage of it, and the other GNU binary utilities -are being converted to use it. - -@item -CONFIGURATION: You must still choose a particular machine architecture -and operating system for _GDBN__'s host and target systems when _GDBN__ is built. -The script @samp{config.gdb} now handles specification of separate host -and target configurations. - -@item -INTERACTION: _GDBN__ now uses the GNU readline interface to read its -input; this provides inline editing of commands, using the familiar -Emacs or @code{vi} keymaps, and command-history support. The user interface -to _GDBN__'s control variables has been simplified and consolidated in two -commands, @samp{set} and @samp{show}. Output lines are now broken at +@item Object Code Formats +_GDBN__ uses a new scheme called Binary File Descriptors (BFD) to permit +it to switch dynamically, without reconfiguration or recompilation, +between different object-file formats. Formats currently supported are +COFF, a.out, and the Intel 960 b.out; files may be read as .o's, archive +libraries, or core dumps. BFD is available as a subroutine library so +that other programs may take advantage of it, and the other GNU binary +utilities are being converted to use it. + +@item Configuration +You must still choose a particular machine architecture and operating +system for _GDBN__'s host and target systems when _GDBN__ is built. The +script @code{config.gdb} now handles specification of separate host and +target configurations. + +@item Interaction +_GDBN__ now uses the GNU readline interface to read its input; this +provides inline editing of commands, using the familiar Emacs or +@code{vi} keymaps, and command-history support. The user interface to +_GDBN__'s control variables has been simplified and consolidated in two +commands, @code{set} and @code{show}. Output lines are now broken at readable places, rather than overflowing onto the next line. -@item -SOURCE LANGUAGE: _GDBN__ now understands C++ source as well as C. Multiple -inheritance is supported when used with G++ 2.0. There is also limited -support for C++ exception handling: _GDBN__ can break when an exception is -raised, before the stack is peeled back to the exception handler's -context. You can suppress output of machine-level addresses, -displaying only source language information. +@item Source Language +_GDBN__ now understands C++ source as well as C. Multiple inheritance is +supported when used with G++ 2.0. There is also limited support for C++ +exception handling: _GDBN__ can break when an exception is raised, +before the stack is peeled back to the exception handler's context. You +can suppress output of machine-level addresses, displaying only source +language information. -@item -PORTS: _GDBN__ has been ported to the following new architectures: -AT&T 3b1, Acorn RISC machine, HP300 running HPUX, big- and little- -endian MIPS machines, Motorola 88k, Sun 386i, and Sun 3 running SunOS -4. In addition, the following are supported as targets only: AMD -29k, Intel 960, and Wind River's VxWorks. +@item Ports +_GDBN__ has been ported to the following new architectures: AT&T 3b1, +Acorn RISC machine, HP300 running HPUX, big- and little-endian MIPS +machines, Motorola 88k, Sun 386i, and Sun 3 running SunOS 4. In +addition, the following are supported as targets only: AMD 29k, Intel +960, and Wind River's VxWorks. -@item -SHARED LIBRARIES: _GDBN__ 4.0 supports SunOS shared libraries. +@item Shared Libraries +_GDBN__ 4.0 supports SunOS shared libraries. -@item -WORK IN PROGRESS: kernel debugging for BSD and Mach systems; Tahoe and -HPPA architecture support. +@item Work in Progress +Kernel debugging for BSD and Mach systems; Tahoe and HPPA architecture +support. -@end itemize +@end table @node Sample Session, Invocation, New Features, Top @chapter A Sample _GDBN__ Session @@ -255,198 +255,275 @@ You can use this manual at your leisure to read all about _GDBN__. However, a handful of commands are enough to get started using the debugger. This chapter illustrates these commands. -In this sample session, we emphasize user input like this: @var{input}, +@iftex +In this sample session, we emphasize user input like this: @i{input}, to make it easier to pick out from the surrounding output. +@end iftex @c FIXME: this example may not be appropriate for some configs, where @c FIXME...primary interest is in remote use. -We'll be using _GDBN__ to inspect GNU @code{m4} (a generic macro -processor). +_0__ +One of the preliminary versions of GNU @code{m4} (a generic macro +processor) exhibits the following bug: sometimes, when we change its +quote strings from the default, the commands used to capture one macro's +definition in another stop working. In the following short @code{m4} +session, we define a macro @code{foo} which expands to @code{0000}; we +then use the @code{m4} builtin @code{defn} to define @code{bar} as the +same thing. However, when we change the open quote string to +@code{} and the close quote string to @code{}, the same +procedure fails to define a new synonym @code{baz}: -_0__@smallexample -$ @var{cd gm4/common} +@smallexample +$ @i{cd gnu/m4} +$ @i{./m4} +@i{define(foo,0000)} + +@i{foo} +0000 +@i{define(bar,defn(`foo'))} + +@i{bar} +0000 +@i{changequote(,)} + +@i{define(baz,defn(foo))} +@i{baz} +@i{C-D} +m4: End of input: 0: fatal error: EOF in string +@end smallexample + +@noindent +Let's use _GDBN__ to try to see what's going on. -$ @var{_GDBP__ m4} +@smallexample +$ @i{_GDBP__ m4} Reading symbol data from m4...done. -(_GDBP__) set width 70 +(_GDBP__) @end smallexample @noindent _GDBN__ only reads enough symbol data to know where to find the rest when needed; as a result, the first prompt comes up very quickly. We -immediately told _GDBN__ to use a narrower display width than usual, so +then tell _GDBN__ to use a narrower display width than usual, so that examples will fit in this manual. @smallexample -(_GDBP__) @var{break m4_changequote} -Breakpoint 1 at 0x59d4: file builtin.c, line 812. +(_GDBP__) @i{set width 70} @end smallexample @noindent -We've chosen to see how the @code{m4} builtin @samp{changequote} works. -Having looked at the source, we knew the relevant subroutine is -@samp{m4_changequote}. We've set a breakpoint there with _GDBN__'s +Let's see how the @code{m4} builtin @code{changequote} works. +Having looked at the source, we know the relevant subroutine is +@code{m4_changequote}, so we set a breakpoint there with _GDBN__'s @code{break} command. @smallexample -(_GDBP__) @var{run} -Starting program: /s1/gnu/src/gm4/common/m4 -@var{`usual' quotes } -usual quotes +(_GDBP__) @i{break m4_changequote} +Breakpoint 1 at 0x62f4: file builtin.c, line 879. @end smallexample @noindent -Using the @samp{run} command, we've started @code{m4} running under -_GDBN__ control; while we don't touch the @samp{m4_changequote} -subroutine, the program runs as usual---it filters standard input. +Using the @code{run} command, we start @code{m4} running under _GDBN__ +control; as long as control does not reach the @code{m4_changequote} +subroutine, the program runs as usual: @smallexample -@var{changequote(<,>)} +(_GDBP__) @i{run} +Starting program: /work/Editorial/gdb/gnu/m4/m4 +@i{define(foo,0000)} -Breakpoint 1, m4_changequote (argc=3, argv=0x2b958) at builtin.c:812 -812 if (bad_argc(TOKEN_DATA_TEXT(argv[0]), argc, 1, 3)) +@i{foo} +0000 @end smallexample + @noindent -To trigger the breakpoint, we called @code{changequote}. _GDBN__ -suspended execution of @code{m4}, displaying information about the -context where it stopped. +To trigger the breakpoint, we call @code{changequote}. _GDBN__ +suspends execution of @code{m4}, displaying information about the +context where it stops. -@group @smallexample -(_GDBP__) @var{s} -bad_argc (name=0xf851cfb4
, argc=3, - min=1, max=3) at builtin.c:230 -230 if (min > 0 && argc < min) @{ +@i{changequote(,)} + +Breakpoint 1, m4_changequote (argc=3, argv=0x33c70) at builtin.c:879 +879 if (bad_argc(TOKEN_DATA_TEXT(argv[0]), argc, 1, 3)) @end smallexample + @noindent -We've used the command @samp{s} (@code{step}) to advance execution to -the next source line; since there was a subroutine call, we've stopped -in the first line of that subroutine, not in the next line of -@code{m4_changequote}. -@end group +Now we use the command @code{n} (@code{next}) to advance execution to +the next line of the current function. + +@smallexample +(_GDBP__) @i{n} +882 set_quotes((argc >= 2) ? TOKEN_DATA_TEXT(argv[1]) : nil, +@end smallexample -The command @samp{next} would have taken us to the next line of -@code{m4_changequote}. To see where we are in the stack, we can use the -@samp{backtrace} command (which can also be spelled @samp{bt}). +@noindent +@code{set_quotes} looks like a promising subroutine. We can go into it +by using the command @code{s} (@code{step}) instead of @code{next}. +@code{step} goes to the next line to be executed in @emph{any} +subroutine, so it steps into @code{set_quotes}. @smallexample -(_GDBP__) @var{bt} -#0 bad_argc (name=0xf851cfb4
, - argc=3, min=1, max=3) at builtin.c:230 -#1 0x59ec in m4_changequote (argc=3, argv=0x2b958) at builtin.c:812 -#2 0x6e38 in expand_macro (sym=0x2b060) at macro.c:242 -#3 0x6840 in expand_token (obs=0x0, t=176224, td=0xf7fffb08) - at macro.c:71 -#4 0x6794 in expand_input () at macro.c:40 -#5 0x28dc in main (argc=0, argv=0xf7fffbf8) at m4.c:174 +(_GDBP__) @i{s} +set_quotes (lq=0x34c78 "", rq=0x34c88 "") + at input.c:530 +530 if (lquote != def_lquote) @end smallexample @noindent -We'll tell _GDBN__ to finish execution of this subroutine, to get back -to @code{m4_changequote}. +The summary display showing the subroutine where @code{m4} is now +suspended (and its arguments) is called a stack frame display. We can +use the @code{backtrace} command (which can also be spelled @code{bt}), +to see where we are in the stack: it displays a stack frame for each +active subroutine. @smallexample -(_GDBP__) @var{finish} -Run till exit from #0 bad_argc (name=0xf851cfb4
, - argc=3, min=1, max=3) at builtin.c:230 -0x59ec in m4_changequote (argc=3, argv=0x2b958) at builtin.c:812 -812 if (bad_argc(TOKEN_DATA_TEXT(argv[0]), argc, 1, 3)) -Value returned is $1 = false +(_GDBP__) @i{bt} +#0 set_quotes (lq=0x34c78 "", rq=0x34c88 "") + at input.c:530 +#1 0x6344 in m4_changequote (argc=3, argv=0x33c70) at builtin.c:882 +#2 0x8174 in expand_macro (sym=0x33320) at macro.c:242 +#3 0x7a88 in expand_token (obs=0x0, t=209696, td=0xf7fffa30) + at macro.c:71 +#4 0x79dc in expand_input () at macro.c:40 +#5 0x2930 in main (argc=0, argv=0xf7fffb20) at m4.c:195 @end smallexample @noindent -We're still in the middle of the first line of @code{m4_changequote}; -@samp{finish} just allowed the subroutine call to complete. -The display beginning ``@code{0x59ec in}@dots{}'', preceding the -display of line @code{812}, is a reminder of that situation from -_GDBN__. +Let's step through a few more lines to see what happens. The first two +times, we can use @samp{s}; the next two times we use @code{n} to avoid +falling into the @code{xstrdup} subroutine. +@smallexample +(_GDBP__) @i{s} +0x3b5c 532 if (rquote != def_rquote) +(_GDBP__) @i{s} +0x3b80 535 lquote = (lq == nil || *lq == '\0') ? def_lquote :\ + xstrdup(lq); +(_GDBP__) @i{n} +536 rquote = (rq == nil || *rq == '\0') ? def_rquote : xstrdup\ +(rq); +(_GDBP__) @i{n} +538 len_lquote = strlen(rquote); +@end smallexample -Now that we're past the subroutine call, using the @code{step} command -again will get us to the next line of @code{m4_changequote}. +@noindent +The last line displayed looks a little odd; let's examine the variables +@code{lquote} and @code{rquote} to see if they are in fact the new left +and right quotes we specified. We can use the command @code{p} +(@code{print}) to see their values. @smallexample -(_GDBP__) @var{s} -815 lquote = (argc >= 2) ? TOKEN_DATA_TEXT(argv[1])[0] : DEF_LQUOTE; -(_GDBP__) @var{whatis lquote} -type = char -(_GDBP__) @var{p lquote} -$2 = 96 '`' +(_GDBP__) @i{p lquote} +$1 = 0x35d40 "" +(_GDBP__) @i{p rquote} +$2 = 0x35d50 "" @end smallexample @noindent -When we stepped to another line, @code{m4} was about to set a variable -@samp{lquote}; we inspected its type with @samp{whatis} and its value -with @samp{p} (the @samp{print} command). We can see some context by -displaying the surrounding source code, with the @samp{l} (@code{list}) -command. +@code{lquote} and @code{rquote} are indeed the new left and right quotes. +Let's look at some context; we can display ten lines of source +surrounding the current line, with the @code{l} (@code{list}) command. @smallexample -(_GDBP__) @var{l} -810 token_data **argv; -811 @{ -812 if (bad_argc(TOKEN_DATA_TEXT(argv[0]), argc, 1, 3)) -813 return; -814 -815 lquote = (argc >= 2) ? TOKEN_DATA_TEXT(argv[1])[0] : DEF_LQUOTE; -816 rquote = (argc >= 3) ? TOKEN_DATA_TEXT(argv[2])[0] : DEF_RQUOTE; -817 @} -818 -819 /* -(_GDBP__) @var{s} -816 rquote = (argc >= 3) ? TOKEN_DATA_TEXT(argv[2])[0] : DEF_RQUOTE; -(_GDBP__) @var{s} -817 @} -(_GDBP__) @var{p lquote} -$3 = 60 '<' -(_GDBP__) @var{p rquote} -$4 = 62 '>' +(_GDBP__) @i{l} +533 xfree(rquote); +534 +535 lquote = (lq == nil || *lq == '\0') ? def_lquote : xstrdup\ +(lq); +536 rquote = (rq == nil || *rq == '\0') ? def_rquote : xstrdup\ +(rq); +537 +538 len_lquote = strlen(rquote); +539 len_rquote = strlen(lquote); +540 @} +541 +542 void @end smallexample @noindent -We proceeded past another line with @samp{s}, and inspected the new -values of @code{m4}'s internal variables @code{rquote} and -@code{lquote}. +Let's step past the two lines that set @code{len_lquote} and +@code{len_rquote}, and then examine the values of those variables. -Since we're done with our inspection of this subroutine, we'll tell -_GDBN__ to allow @code{m4} to continue running, with the @samp{c} -(@code{continue}) command: +@smallexample +(_GDBP__) @i{n} +539 len_rquote = strlen(lquote); +(_GDBP__) @i{n} +540 @} +(_GDBP__) @i{p len_lquote} +$3 = 9 +(_GDBP__) @i{p len_rquote} +$4 = 7 +@end smallexample + +@noindent +That certainly looks wrong, assuming @code{len_lquote} and +@code{len_rquote} are meant to be the lengths of @code{lquote} and +@code{rquote} respectively. Let's try setting them to better values. +We can use the @code{p} command for this, since it'll print the value of +any expression---and that expression can include subroutine calls and +assignments. + +@smallexample +(_GDBP__) p len_lquote=strlen(lquote) +$5 = 7 +(_GDBP__) p len_rquote=strlen(rquote) +$6 = 9 +@end smallexample + +@noindent +Let's see if that fixes the problem of using the new quotes with the +@code{m4} built-in @code{defn}. We can allow @code{m4} to continue +executing with the @code{c} (@code{continue}) command, and then try the +example that caused trouble initially: @smallexample -(_GDBP__) @var{c} +(_GDBP__) @i{c} Continuing. -@var{`usual' quotes } -`usual' quotes not these +@i{define(baz,defn(foo))} +baz +0000 +@end smallexample + +@noindent +Success! The new quotes now work just as well as the default ones. The +problem seems to have been just the two typos defining the wrong +lengths. We'll let @code{m4} exit by giving it an EOF as input. + +@smallexample +@i{C-D} Program exited normally. -(_GDBP__) @var{quit} +@end smallexample + +@noindent +The message @samp{Program exited normally.} is from _GDBN__; it +indicates @code{m4} has finished executing. We can end our _GDBN__ +session with the _GDBN__ @code{quit} command. + +@smallexample +(_GDBP__) @i{quit} $ _1__@end smallexample -@noindent -Finally, when we ended the @code{m4} run, _GDBN__ told us -``@code{Program exited normally.}'' We ended our _GDBN__ session with -the _GDBN__ @samp{quit} command. - @node Invocation, Commands, Sample Session, Top @chapter Getting In and Out of _GDBN__ @menu -* Starting _GDBN__:: Starting _GDBN__ -* Leaving _GDBN__:: Leaving _GDBN__ -* Shell Commands:: Shell Commands +* Starting _GDBN__:: Starting _GDBN__ +* Leaving _GDBN__:: Leaving _GDBN__ +* Shell Commands:: Shell Commands @end menu @node Starting _GDBN__, Leaving _GDBN__, Invocation, Invocation @section Starting _GDBN__ -_GDBN__ is invoked with the shell command @samp{_GDBP__}. Once started, +_GDBN__ is invoked with the shell command @code{_GDBP__}. Once started, it reads commands from the terminal until you tell it to exit. -You can start by just calling @samp{_GDBP__} with no arguments or +You can start by just calling @code{_GDBP__} with no arguments or options; but the most usual way to start _GDBN__ is with one argument or two, specifying an executable program as the argument: @example @@ -458,27 +535,26 @@ You can also start with both an executable program and a core file specified: _GDBP__ program core @end example +@noindent You can further control how _GDBN__ starts up by using command-line -options. - -_GDBN__ itself can remind you of the options available: +options. _GDBN__ itself can remind you of the options available: @example -gdb -help +_GDBP__ -help @end example @noindent will display all available options and briefly describe their use -(@samp{gdb -h} is a shorter equivalent). +(@samp{_GDBP__ -h} is a shorter equivalent). All options and command line arguments you give are processed in sequential order. The order makes a difference when the @samp{-x} option is used. @menu -* File Options:: Choosing Files -* Mode Options:: Choosing Modes -* i960-Nindy Remote:: _GDBN__ with a Remote i960 (Nindy) -* EB29K Remote:: _GDBN__ with a Remote EB29K -* VxWorks Remote:: _GDBN__ and VxWorks +* File Options:: Choosing Files +* Mode Options:: Choosing Modes +* i960-Nindy Remote:: _GDBN__ with a Remote i960 (Nindy) +* EB29K Remote:: _GDBN__ with a Remote EB29K +* VxWorks Remote:: _GDBN__ and VxWorks @end menu @node File Options, Mode Options, Starting _GDBN__, Starting _GDBN__ @@ -590,13 +666,13 @@ Through command line options specifying device, baud rate, and protocol; By responding to a prompt on startup; @item -By using the @samp{target} command at any point during your _GDBN__ session. +By using the @code{target} command at any point during your _GDBN__ session. @end itemize @menu -* Nindy Startup:: Startup with Nindy -* Nindy Options:: Options for Nindy -* Nindy reset:: Nindy Reset Command +* Nindy Startup:: Startup with Nindy +* Nindy Options:: Options for Nindy +* Nindy reset:: Nindy Reset Command @end menu @node Nindy Startup, Nindy Options, i960-Nindy Remote, i960-Nindy Remote @@ -611,7 +687,7 @@ Attach /dev/ttyNN -- specify NN, or "quit" to quit: @noindent You can, if you choose, simply start up with no Nindy connection by responding to the prompt with an empty line. If you do this, and later -wish to attach to Nindy, use @samp{target} (@pxref{Target Commands}). +wish to attach to Nindy, use @code{target} (@pxref{Target Commands}). @node Nindy Options, Nindy reset, Nindy Startup, i960-Nindy Remote @subsubsection Options for Nindy @@ -625,7 +701,7 @@ Specify the serial port name of a serial interface to be used to connect to the target system. This option is only available when _GDBN__ is configured for the Intel 960 target architecture. You may specify @var{port} as any of: a full pathname (e.g. @samp{-r /dev/ttya}), a -device name in @samp{/dev} (e.g. @samp{-r ttya}), or simply the unique +device name in @file{/dev} (e.g. @samp{-r ttya}), or simply the unique suffix for a specific @code{tty} (e.g. @samp{-r a}). @item -O @@ -643,7 +719,7 @@ this process with an interrupt. @end quotation @item -brk -Specify that _GDBN__ should first send a @samp{BREAK} signal to the target +Specify that _GDBN__ should first send a @code{BREAK} signal to the target system, in an attempt to reset it, before connecting to a Nindy target. @quotation @@ -681,13 +757,13 @@ _if__(_AMD29K__) To use _GDBN__ from a Unix system to run programs on AMD's EB29K board in a PC, you must first connect a serial cable between the PC and a serial port on the Unix system. In the following, we assume -you've hooked the cable between the PC's @samp{COM1} port and -@samp{/dev/ttya} on the Unix system. +you've hooked the cable between the PC's @file{COM1} port and +@file{/dev/ttya} on the Unix system. @menu -* Comms (EB29K):: Communications Setup -* _GDBP__-EB29K:: EB29K cross-debugging -* Remote Log:: Remote Log +* Comms (EB29K):: Communications Setup +* _GDBP__-EB29K:: EB29K cross-debugging +* Remote Log:: Remote Log @end menu @node Comms (EB29K), _GDBP__-EB29K, EB29K Remote, EB29K Remote @@ -712,8 +788,8 @@ C:\> CTTY com1 _1__@end example @noindent (Later, if you wish to return control to the DOS console, you can use -the command @samp{CTTY con}---but you must send it over the device that -had control, in our example over the @samp{COM1} serial line). +the command @code{CTTY con}---but you must send it over the device that +had control, in our example over the @file{COM1} serial line). From the Unix host, use a communications program such as @code{tip} or @code{cu} to communicate with the PC; for example, @@ -729,7 +805,7 @@ tip -9600 /dev/ttya @end example @noindent Your system may define a different name where our example uses -@samp{/dev/ttya} as the argument to @code{tip}. The communications +@file{/dev/ttya} as the argument to @code{tip}. The communications parameters, including what port to use, are associated with the @code{tip} argument in the ``remote'' descriptions file---normally the system table @file{/etc/remote}. @@ -742,9 +818,9 @@ system table @file{/etc/remote}. @c stdout redirected... ---pesch@cygnus.com, 25feb91 @kindex EBMON -Using the @samp{tip} or @samp{cu} connection, change the DOS working +Using the @code{tip} or @code{cu} connection, change the DOS working directory to the directory containing a copy of your 29K program, then -start the PC program @samp{EBMON} (an EB29K control program supplied +start the PC program @code{EBMON} (an EB29K control program supplied with your board by AMD). You should see an initial display from @code{EBMON} similar to the one that follows, ending with the @code{EBMON} prompt @samp{#}--- @@ -811,9 +887,9 @@ target amd-eb /dev/ttya 9600 MYFOO @noindent In this example, we've assumed your program is in a file called -@samp{myfoo}. Note that the filename given as the last argument to -@samp{target amd-eb} should be the name of the program as it appears to DOS. -In our example this is simply @samp{MYFOO}, but in general it can include +@file{myfoo}. Note that the filename given as the last argument to +@code{target amd-eb} should be the name of the program as it appears to DOS. +In our example this is simply @code{MYFOO}, but in general it can include a DOS path, and depending on your transfer mechanism may not resemble the name on the Unix side. @@ -823,21 +899,21 @@ to see your program run on the 29K board, use the _GDBN__ command run @end example -To stop debugging the remote program, use the _GDBN__ @samp{detach} +To stop debugging the remote program, use the _GDBN__ @code{detach} command. To return control of the PC to its console, use @code{tip} or @code{cu} once again, after your _GDBN__ session has concluded, to attach to -@code{EBMON}. You can then type the command @samp{q} to shut down +@code{EBMON}. You can then type the command @code{q} to shut down @code{EBMON}, returning control to the DOS command-line interpreter. -Type @samp{CTTY con} to return command input to the main DOS console, -and type @samp{~.} to leave @code{tip} or @code{cu}. +Type @code{CTTY con} to return command input to the main DOS console, +and type @kbd{~.} to leave @code{tip} or @code{cu}. @node Remote Log, , _GDBP__-EB29K, EB29K Remote @subsubsection Remote Log @kindex eb.log @cindex log file for EB29K -The @samp{target amd-eb} command creates a file @file{eb.log} in the +The @code{target amd-eb} command creates a file @file{eb.log} in the current working directory, to help debug problems with the connection. @file{eb.log} records all the output from @code{EBMON}, including echoes of the commands sent to it. Running @samp{tail -f} on this file in @@ -880,15 +956,15 @@ _GDBN__ will come up showing the prompt: @end smallexample @menu -* VxWorks connection:: Connecting to VxWorks -* VxWorks download:: VxWorks Download -* VxWorks attach:: Running Tasks +* VxWorks connection:: Connecting to VxWorks +* VxWorks download:: VxWorks Download +* VxWorks attach:: Running Tasks @end menu @node VxWorks connection, VxWorks download, VxWorks Remote, VxWorks Remote @subsubsection Connecting to VxWorks -The _GDBN__ command @samp{target} lets you connect to a VxWorks target on the +The _GDBN__ command @code{target} lets you connect to a VxWorks target on the network. To connect to a target whose host name is ``@code{tt}'', type: @smallexample @@ -911,25 +987,25 @@ object file, it will display a message such as: prog.o: No such file or directory. @end smallexample -This will cause the @samp{target} command to abort. When this happens, +This will cause the @code{target} command to abort. When this happens, you should add the appropriate directory to the search path, with the -_GDBN__ command @samp{path}, and execute the @samp{target} command +_GDBN__ command @code{path}, and execute the @code{target} command again. @node VxWorks download, VxWorks attach, VxWorks connection, VxWorks Remote @subsubsection VxWorks Download If you have connected to the VxWorks target and you want to debug an -object that has not yet been loaded, you can use the _GDBN__ @samp{load} +object that has not yet been loaded, you can use the _GDBN__ @code{load} command to download a file from UNIX to VxWorks incrementally. The -object file given as an argument to the @samp{load} command is actually +object file given as an argument to the @code{load} command is actually opened twice: first by the VxWorks target in order to download the code, then by _GDBN__ in order to read the symbol table. This can lead to problems if the current working directories on the two systems differ. It is simplest to set the working directory on both systems to the directory in which the object file resides, and then to reference the file by its name, without any path. Thus, to load a program -@samp{prog.o}, residing in @code{wherever/vw/demo/rdb}, on VxWorks type: +@file{prog.o}, residing in @code{wherever/vw/demo/rdb}, on VxWorks type: @smallexample -> cd "wherever/vw/demo/rdb" @@ -948,7 +1024,7 @@ _GDBN__ will display a response similar to the following: Reading symbol data from wherever/vw/demo/rdb/prog.o... done. @end smallexample -You can also use the @samp{load} command to reload an object module +You can also use the @code{load} command to reload an object module after editing and recompiling the corresponding source file. Note that this will cause _GDBN__ to delete all currently-defined breakpoints, auto-displays, and convenience variables, and to clear the value @@ -959,7 +1035,7 @@ table.) @node VxWorks attach, , VxWorks download, VxWorks Remote @subsubsection Running Tasks -You can also attach to an existing task using the @samp{attach} command as +You can also attach to an existing task using the @code{attach} command as follows: @smallexample @@ -979,7 +1055,7 @@ _fi__(_VXWORKS__) @item quit @kindex quit @kindex q -To exit _GDBN__, use the @samp{quit} command (abbreviated @samp{q}), or type +To exit _GDBN__, use the @code{quit} command (abbreviated @code{q}), or type an end-of-file character (usually @kbd{C-d}). @end table @@ -991,13 +1067,13 @@ character at any time because _GDBN__ does not allow it to take effect until a time when it is safe. If you've been using _GDBN__ to control an attached process or device, -you can release it with the @samp{detach} command; @pxref{Attach}. +you can release it with the @code{detach} command; @pxref{Attach}. @node Shell Commands, , Leaving _GDBN__, Invocation @section Shell Commands If you just need to execute occasional shell commands during your debugging session, there's no need to leave or suspend _GDBN__; you can -just use the @samp{shell} command. +just use the @code{shell} command. @table @code @item shell @var{command string} @@ -1005,11 +1081,11 @@ just use the @samp{shell} command. @cindex shell escape Directs _GDBN__ to invoke an inferior shell to execute @var{command string}. The environment variable @code{SHELL} is used if it exists, otherwise _GDBN__ -uses @samp{/bin/sh}. +uses @code{/bin/sh}. @end table -The utility @samp{make} is often needed in development environments. -You don't have to use the @samp{shell} command for this purpose in _GDBN__: +The utility @code{make} is often needed in development environments. +You don't have to use the @code{shell} command for this purpose in _GDBN__: @table @code @item make @var{make-args} @@ -1023,8 +1099,8 @@ arguments. This is equivalent to @samp{shell make @var{make-args}}. @chapter _GDBN__ Commands @menu -* Command Syntax:: Command Syntax -* Help:: Getting Help +* Command Syntax:: Command Syntax +* Help:: Getting Help @end menu @node Command Syntax, Help, Commands, Commands @@ -1032,31 +1108,31 @@ arguments. This is equivalent to @samp{shell make @var{make-args}}. A _GDBN__ command is a single line of input. There is no limit on how long it can be. It starts with a command name, which is followed by arguments whose meaning depends on the command name. For example, the command -@samp{step} accepts an argument which is the number of times to step, -as in @samp{step 5}. You can also use the @samp{step} command with +@code{step} accepts an argument which is the number of times to step, +as in @samp{step 5}. You can also use the @code{step} command with no arguments. Some command names do not allow any arguments. @cindex abbreviation _GDBN__ command names may always be truncated if that abbreviation is unambiguous. Other possible command abbreviations are listed in the documentation for individual commands. Sometimes even ambiguous -abbreviations are allowed; for example, @samp{s} is specially defined as -equivalent to @samp{step} even though there are other commands whose -names start with @samp{s}. +abbreviations are allowed; for example, @code{s} is specially defined as +equivalent to @code{step} even though there are other commands whose +names start with @code{s}. @cindex repeating commands A blank line as input to _GDBN__ means to repeat the previous command. -Certain commands (for example, @samp{run}) will not repeat this way; +Certain commands (for example, @code{run}) will not repeat this way; these are commands for which unintentional repetition might cause trouble and which you are unlikely to want to repeat. -The @samp{list} and @samp{x} commands construct new arguments when +The @code{list} and @code{x} commands construct new arguments when repeated, rather than repeating exactly as typed, to permit easy scanning of source or memory. @kindex # @cindex comment -A line of input starting with @samp{#} is a comment; it does nothing. +A line of input starting with @kbd{#} is a comment; it does nothing. This is useful mainly in command files (@xref{Command Files}). @node Help, , Command Syntax, Commands @@ -1064,7 +1140,7 @@ This is useful mainly in command files (@xref{Command Files}). @cindex online documentation @kindex help You can always ask _GDBN__ itself for information on its commands, using the -command @samp{help}. +command @code{help}. @table @code @item help @@ -1096,7 +1172,7 @@ Command name abbreviations are allowed if unambiguous. @item help @var{category} Using one of the general help categories as an argument, you can get a list of the individual commands in a category. For example, here is the -help display for category @samp{status}: +help display for category @code{status}: @smallexample (_GDBP__) help status Status inquiries. @@ -1112,12 +1188,12 @@ Command name abbreviations are allowed if unambiguous. @end smallexample @item help @var{command} -With a command name as @samp{help} argument, _GDBN__ will display a +With a command name as @code{help} argument, _GDBN__ will display a short paragraph on how to use that command. @end table -In addition to @samp{help}, you can use the _GDBN__ commands @samp{info} -and @samp{show} to inquire about the state of your program, or the state +In addition to @code{help}, you can use the _GDBN__ commands @code{info} +and @code{show} to inquire about the state of your program, or the state of _GDBN__ itself. Both commands support many ``sub-commands'', or topics of inquiry; this manual introduces each of them in the appropriate context. The listings under ``@code{info}'' and under @@ -1131,30 +1207,30 @@ appropriate context. The listings under ``@code{info}'' and under @kindex i This command (abbreviated @code{i}) is for describing the state of your program; for example, it can list the arguments given to your program -(@samp{info args}), the registers currently in use (@samp{info -registers}), or the breakpoints you've set (@samp{info breakpoints}). +(@code{info args}), the registers currently in use (@code{info +registers}), or the breakpoints you've set (@code{info breakpoints}). You can get a complete list of the @code{info} sub-commands with -@samp{help info}. +@code{help info}. @kindex show @item show -In contrast, @samp{show} is for describing the state of _GDBN__ itself. +In contrast, @code{show} is for describing the state of _GDBN__ itself. You can change most of the things you can @code{show}, by using the -related command @samp{set}; for example, you can control what number -system is used for displays with @samp{set radix}, or simply inquire -which is currently in use with @samp{show radix}. +related command @code{set}; for example, you can control what number +system is used for displays with @code{set radix}, or simply inquire +which is currently in use with @code{show radix}. @kindex info set To display all the settable parameters and their current -values, you can use @samp{show} with no arguments; you may also use -@samp{info set}. Both commands produce the same display. +values, you can use @code{show} with no arguments; you may also use +@code{info set}. Both commands produce the same display. @c FIXME: "info set" violates the rule that "info" is for state of @c FIXME...program. Ck w/ GNU: "info set" to be called something else, @c FIXME...or change desc of rule---eg "state of prog and debugging session"? @end table -Here are three miscellaneous @samp{show} subcommands, all of which are -exceptional in lacking corresponding @samp{set} commands: +Here are three miscellaneous @code{show} subcommands, all of which are +exceptional in lacking corresponding @code{set} commands: @table @code @kindex show version @@ -1179,14 +1255,14 @@ Display the GNU ``NO WARRANTY'' statement. @chapter Running Programs Under _GDBN__ @menu -* Compilation:: Compiling for Debugging -* Starting:: Starting your Program -* Arguments:: Your Program's Arguments -* Environment:: Your Program's Environment -* Working Directory:: Your Program's Working Directory -* Input/Output:: Your Program's Input and Output -* Attach:: Debugging an Already-Running Process -* Kill Process:: Killing the Child Process +* Compilation:: Compiling for Debugging +* Starting:: Starting your Program +* Arguments:: Your Program's Arguments +* Environment:: Your Program's Environment +* Working Directory:: Your Program's Working Directory +* Input/Output:: Your Program's Input and Output +* Attach:: Debugging an Already-Running Process +* Kill Process:: Killing the Child Process @end menu @node Compilation, Starting, Running, Running @@ -1244,7 +1320,7 @@ option or use shorter file names. Alternatively, use a version of GNU @item run @itemx r @kindex run -Use the @samp{run} command to start your program under _GDBN__. +Use the @code{run} command to start your program under _GDBN__. _if__(_VXWORKS__) Except on VxWorks, you _fi__(_VXWORKS__) @@ -1252,13 +1328,13 @@ _if__(!_VXWORKS__) You _fi__(!_VXWORKS__) must first specify the program name with an argument to _GDBN__ -(@pxref{Invocation}), or using the @samp{file} or @samp{exec-file} +(@pxref{Invocation}), or using the @code{file} or @code{exec-file} command (@pxref{Files}).@refill @end table -On targets that support processes, @samp{run} creates an inferior +On targets that support processes, @code{run} creates an inferior process and makes that process run your program. On other targets, -@samp{run} jumps to the start of the program. +@code{run} jumps to the start of the program. The execution of a program is affected by certain information it receives from its superior. _GDBN__ provides ways to specify this @@ -1270,7 +1346,7 @@ divided into four categories: @table @asis @item The @i{arguments.} You specify the arguments to give your program as the arguments of the -@samp{run} command. If a shell is available on your target, the shell +@code{run} command. If a shell is available on your target, the shell is used to pass the arguments, so that you may use normal conventions (for example regular expression expansion or variable substitution) in describing the arguments. In Unix systems, you can control which shell @@ -1278,28 +1354,28 @@ is used with the @code{SHELL} environment variable. @item The @i{environment.} Your program normally inherits its environment from _GDBN__, but you can -use the _GDBN__ commands @samp{set environment} and @samp{unset +use the _GDBN__ commands @code{set environment} and @code{unset environment} to change parts of the environment that will be given to the program.@refill @item The @i{working directory.} Your program inherits its working directory from _GDBN__. You can set -_GDBN__'s working directory with the @samp{cd} command in _GDBN__. +_GDBN__'s working directory with the @code{cd} command in _GDBN__. @item The @i{standard input and output.} Your program normally uses the same device for standard input and standard output as _GDBN__ is using. You can redirect input and output -in the @code{run} command line, or you can use the @samp{tty} command to +in the @code{run} command line, or you can use the @code{tty} command to set a different device for your program. @end table -When you issue the @samp{run} command, your program begins to execute +When you issue the @code{run} command, your program begins to execute immediately. @xref{Stopping}, for discussion of how to arrange for your program to stop. -Note that once your program has been started by the @samp{run} command, +Note that once your program has been started by the @code{run} command, you may evaluate expressions that involve calls to functions in the -inferior, using the @samp{print} or @samp{call} commands. @xref{Data}. +inferior, using the @code{print} or @code{call} commands. @xref{Data}. If the modification time of your symbol file has changed since the last time _GDBN__ read its symbols, _GDBN__ will discard its symbol table and re-read @@ -1310,19 +1386,19 @@ it. In this process, it tries to retain your current breakpoints. @cindex arguments (to your program) The arguments to your program can be specified by the arguments of the -@samp{run} command. They are passed to a shell, which expands wildcard +@code{run} command. They are passed to a shell, which expands wildcard characters and performs redirection of I/O, and thence to the program. _GDBN__ uses the shell indicated by your environment variable -@code{SHELL} if it exists; otherwise, _GDBN__ uses @samp{/bin/sh}. +@code{SHELL} if it exists; otherwise, _GDBN__ uses @code{/bin/sh}. -@samp{run} with no arguments uses the same arguments used by the previous -@samp{run}, or those set by the @samp{set args} command. +@code{run} with no arguments uses the same arguments used by the previous +@code{run}, or those set by the @code{set args} command. @kindex set args @table @code @item set args Specify the arguments to be used the next time your program is run. If -@samp{set args} has no arguments, @samp{run} will execute your program +@code{set args} has no arguments, @code{run} will execute your program with no arguments. Once you have run your program with arguments, this is the only way to run it again without arguments. @@ -1396,7 +1472,7 @@ tells a Unix program, when subsequently run, that its user is named @kindex unset environment Remove variable @var{varname} from the environment to be passed to your program. This is different from @samp{set env @var{varname}=}; -@samp{unset environment} removes the variable from the environment, +@code{unset environment} removes the variable from the environment, rather than assigning it an empty value. @end table @@ -1404,11 +1480,11 @@ rather than assigning it an empty value. @section Your Program's Working Directory @cindex working directory (of your program) -Each time you start your program with @samp{run}, it inherits its +Each time you start your program with @code{run}, it inherits its working directory from the current working directory of _GDBN__. _GDBN__'s working directory is initially whatever it inherited from its parent process (typically the shell), but you can specify a new working -directory in _GDBN__ with the @samp{cd} command. +directory in _GDBN__ with the @code{cd} command. The _GDBN__ working directory also serves as a default for the commands that specify files for _GDBN__ to operate on. @xref{Files}. @@ -1444,7 +1520,7 @@ program is using. @end table You can redirect the program's input and/or output using shell -redirection with the @samp{run} command. For example, +redirection with the @code{run} command. For example, _0__@example run > outfile @@ -1455,25 +1531,25 @@ starts the program, diverting its output to the file @file{outfile}. @kindex tty Another way to specify where the program should do input and output is -with the @samp{tty} command. This command accepts a file name as -argument, and causes this file to be the default for future @samp{run} +with the @code{tty} command. This command accepts a file name as +argument, and causes this file to be the default for future @code{run} commands. It also resets the controlling terminal for the child -process, for future @samp{run} commands. For example, +process, for future @code{run} commands. For example, @example tty /dev/ttyb @end example @noindent -directs that processes started with subsequent @samp{run} commands +directs that processes started with subsequent @code{run} commands default to do input and output on the terminal @file{/dev/ttyb} and have that as their controlling terminal. -An explicit redirection in @samp{run} overrides the @samp{tty} command's +An explicit redirection in @code{run} overrides the @code{tty} command's effect on input/output redirection, but not its effect on the controlling terminal. -When you use the @samp{tty} command or redirect input in the @samp{run} +When you use the @code{tty} command or redirect input in the @code{run} command, only the input @emph{for your program} is affected. The input for _GDBN__ still comes from your terminal. @@ -1486,46 +1562,46 @@ for _GDBN__ still comes from your terminal. @item attach @var{process-id} If your currently selected target supports processes, this command attaches to a running process---one that was started outside _GDBN__. -(@samp{info files} will show your active targets). The command takes as +(@code{info files} will show your active targets). The command takes as argument a process ID. The usual way to find out the process-id of a Unix process is with the @code{ps} utility, or with the @code{jobs -l} shell command. -@samp{attach} will not repeat if you press @key{RET} a second time after +@code{attach} will not repeat if you press @key{RET} a second time after executing the command. @end table -To use @samp{attach}, you must have permission to send the process a +To use @code{attach}, you must have permission to send the process a signal, and it must have the same effective user ID as the _GDBN__ process. -When using @samp{attach}, you should first use the @samp{file} command +When using @code{attach}, you should first use the @code{file} command to specify the program running in the process and load its symbol table. The first thing _GDBN__ does after arranging to debug the specified process is to stop it. You can examine and modify an attached process with all the _GDBN__ commands that ordinarily available when you start -processes with @samp{run}. You can insert breakpoints; you can step and +processes with @code{run}. You can insert breakpoints; you can step and continue; you can modify storage. If you would rather the process -continue running, you may use the @samp{continue} command after +continue running, you may use the @code{continue} command after attaching _GDBN__ to the process. @table @code @item detach @kindex detach When you have finished debugging the attached process, you can use the -@samp{detach} command to release it from _GDBN__'s control. Detaching -the process continues its execution. After the @samp{detach} command, +@code{detach} command to release it from _GDBN__'s control. Detaching +the process continues its execution. After the @code{detach} command, that process and _GDBN__ become completely independent once more, and you -are ready to @samp{attach} another process or start one with @samp{run}. -@samp{detach} will not repeat if you press @key{RET} again after using +are ready to @code{attach} another process or start one with @code{run}. +@code{detach} will not repeat if you press @key{RET} again after using it once. @end table -If you exit _GDBN__ or use the @samp{run} command while you have an attached +If you exit _GDBN__ or use the @code{run} command while you have an attached process, you kill that process. By default, you will be asked for confirmation if you try to do either of these things; you can control -whether or not this happens by using the @samp{set confirm} command +whether or not this happens by using the @code{set confirm} command (@pxref{Messages/Warnings}). @group @@ -1545,13 +1621,13 @@ is running. On some operating systems, you can't execute your program in another process while breakpoints are active inside _GDBN__. You can use the -@samp{kill} command in this situation to permit running the program +@code{kill} command in this situation to permit running the program outside the debugger. -The @samp{kill} command is also useful if you wish to recompile and +The @code{kill} command is also useful if you wish to recompile and relink the program, since on many systems it is impossible to modify an executable file which is running in a process. In this case, when you -next type @samp{run}, _GDBN__ will notice that the file has changed, and +next type @code{run}, _GDBN__ will notice that the file has changed, and will re-read the symbol table (while trying to preserve your current breakpoint settings). @@ -1577,10 +1653,10 @@ running or not, what process it is, and why it stopped. @end table @menu -* Breakpoints:: Breakpoints -* Stepping:: Stepping -* Continuing:: Continuing -* Signals:: Signals +* Breakpoints:: Breakpoints +* Stepping:: Stepping +* Continuing:: Continuing +* Signals:: Signals @end menu @node Breakpoints, Stepping, Stopping, Stopping @@ -1601,14 +1677,14 @@ breakpoint you want to change. Each breakpoint may be @dfn{enabled} or enable it again. @menu -* Set Breaks:: Setting Breakpoints -* Set Watchpoints:: Setting Watchpoints -* Exception Handling:: Breakpoints and Exceptions -* Delete Breaks:: Deleting Breakpoints -* Disabling:: Disabling Breakpoints -* Conditions:: Break Conditions -* Break Commands:: Breakpoint Command Lists -* Error in Breakpoints:: ``Cannot Insert Breakpoints'' +* Set Breaks:: Setting Breakpoints +* Set Watchpoints:: Setting Watchpoints +* Exception Handling:: Breakpoints and Exceptions +* Delete Breaks:: Deleting Breakpoints +* Disabling:: Disabling Breakpoints +* Conditions:: Break Conditions +* Break Commands:: Breakpoint Command Lists +* Error in Breakpoints:: ``Cannot Insert Breakpoints'' @end menu @node Set Breaks, Set Watchpoints, Breakpoints, Breakpoints @@ -1616,7 +1692,7 @@ enable it again. @kindex break @kindex b -Breakpoints are set with the @samp{break} command (abbreviated @samp{b}). +Breakpoints are set with the @code{break} command (abbreviated @code{b}). You have several ways to say where the breakpoint should go. @@ -1653,7 +1729,7 @@ information or source files. Set a breakpoint at the next instruction to be executed in the selected stack frame (@pxref{Stack}). In any selected frame but the innermost, this will cause the program to stop as soon as control returns to that -frame. This is equivalent to a @samp{finish} command in the frame +frame. This is equivalent to a @code{finish} command in the frame inside the selected frame. If this is done in the innermost frame, _GDBN__ will stop the next time it reaches the current location; this may be useful inside of loops. @@ -1674,7 +1750,7 @@ arguments described above (or no argument) specifying where to break. @item tbreak @var{args} @kindex tbreak Set a breakpoint enabled only for one stop. @var{args} are the -same as in the @samp{break} command, and the breakpoint is set in the same +same as in the @code{break} command, and the breakpoint is set in the same way, but the breakpoint is automatically disabled the first time it is hit. @xref{Disabling}. @@ -1685,19 +1761,19 @@ useful for setting breakpoints on overloaded functions that are not members of any special classes. This command sets an unconditional breakpoint on all matches, printing a list of all breakpoints it set. Once these breakpoints are set, they are treated just like the -breakpoints set with the @samp{break} command. They can be deleted, +breakpoints set with the @code{break} command. They can be deleted, disabled, made conditional, etc., in the standard ways. @kindex info breakpoints @kindex $_ @item info breakpoints -The command @samp{info breakpoints} prints a list of all breakpoints set +The command @code{info breakpoints} prints a list of all breakpoints set and not deleted, showing their numbers, where in the program they are, and any special features in use for them. Disabled breakpoints are -included in the list, but marked as disabled. @samp{info break} with a +included in the list, but marked as disabled. @code{info break} with a breakpoint number as argument lists only that breakpoint. The convenience variable @code{$_} and the default examining-address for the -@samp{x} command are set to the address of the last breakpoint listed +@code{x} command are set to the address of the last breakpoint listed (@pxref{Memory}). @end table @@ -1746,11 +1822,11 @@ given point in time. @kindex catch You can set breakpoints at active exception handlers by using the -@samp{catch} command. @var{exceptions} is a list of names of exceptions +@code{catch} command. @var{exceptions} is a list of names of exceptions to catch. @end table -You can use @samp{info catch} to list active exception handlers; +You can use @code{info catch} to list active exception handlers; @pxref{Frame Info}. There are currently some limitations to exception handling in _GDBN__. @@ -1771,7 +1847,7 @@ You cannot interactively install an exception handler. @end itemize @cindex raise exceptions -Sometimes @samp{catch} is not the best way to debug exception handling: +Sometimes @code{catch} is not the best way to debug exception handling: if you need to know exactly where an exception is raised, it's better to stop @emph{before} the exception handler is called, since that way you can see the stack before any unwinding takes place. @@ -1808,8 +1884,8 @@ and you no longer want the program to stop there. This is called @dfn{deleting} the breakpoint. A breakpoint that has been deleted no longer exists in any sense; it is forgotten. -With the @samp{clear} command you can delete breakpoints according to where -they are in the program. With the @samp{delete} command you can delete +With the @code{clear} command you can delete breakpoints according to where +they are in the program. With the @code{delete} command you can delete individual breakpoints by specifying their breakpoint numbers. It is not necessary to delete a breakpoint to proceed past it. _GDBN__ @@ -1840,7 +1916,7 @@ Delete any breakpoints set at or within the code of the specified line. @kindex d Delete the breakpoints of the numbers specified as arguments. If no argument is specified, delete all breakpoints. You can abbreviate this -command as @samp{d}. +command as @code{d}. @end table @node Disabling, Conditions, Delete Breaks, Breakpoints @@ -1853,9 +1929,9 @@ This makes the breakpoint inoperative as if it had been deleted, but remembers the information on the breakpoint so that you can @dfn{enable} it again later. -You disable and enable breakpoints with the @samp{enable} and -@samp{disable} commands, optionally specifying one or more breakpoint -numbers as arguments. Use @samp{info break} to print a list of +You disable and enable breakpoints with the @code{enable} and +@code{disable} commands, optionally specifying one or more breakpoint +numbers as arguments. Use @code{info break} to print a list of breakpoints if you don't know which breakpoint numbers to use. A breakpoint can have any of four different states of enablement: @@ -1863,13 +1939,13 @@ A breakpoint can have any of four different states of enablement: @itemize @bullet @item Enabled. The breakpoint will stop the program. A breakpoint made -with the @samp{break} command starts out in this state. +with the @code{break} command starts out in this state. @item Disabled. The breakpoint has no effect on the program. @item Enabled once. The breakpoint will stop the program, but when it does so it will become disabled. A breakpoint made -with the @samp{tbreak} command starts out in this state. +with the @code{tbreak} command starts out in this state. @item Enabled for deletion. The breakpoint will stop the program, but immediately after it does so it will be deleted permanently. @@ -1913,10 +1989,10 @@ the breakpoints will be deleted the next time it stops the program state before that time comes). @end table -Save for a breakpoint set with @samp{tbreak} (@pxref{Set Breaks}), +Save for a breakpoint set with @code{tbreak} (@pxref{Set Breaks}), breakpoints that you set initially enabled; subsequently, they become disabled or enabled only when you use one of the commands above. (The -command @samp{until} can set and delete a breakpoint of its own, but it +command @code{until} can set and delete a breakpoint of its own, but it will not change the state of your other breakpoints). @node Conditions, Break Commands, Disabling, Breakpoints @@ -1941,8 +2017,8 @@ purpose of performing side effects when a breakpoint is reached (@pxref{Break Commands}). Break conditions can be specified when a breakpoint is set, by using -@samp{if} in the arguments to the @samp{break} command. @xref{Set Breaks}. -They can also be changed at any time with the @samp{condition} command: +@samp{if} in the arguments to the @code{break} command. @xref{Set Breaks}. +They can also be changed at any time with the @code{condition} command: @table @code @item condition @var{bnum} @var{expression} @@ -1950,8 +2026,8 @@ They can also be changed at any time with the @samp{condition} command: Specify @var{expression} as the break condition for breakpoint number @var{bnum}. From now on, this breakpoint will stop the program only if the value of @var{expression} is true (nonzero, in C). @var{expression} -is not evaluated at the time the @samp{condition} command is given. -When you call @samp{condition}, the expression you specify is checked +is not evaluated at the time the @code{condition} command is given. +When you call @code{condition}, the expression you specify is checked immediately for syntactic correctness, and to determine whether symbols in it have referents in the context of your breakpoint. @xref{Expressions}. @@ -1994,10 +2070,10 @@ Thus, the program will not stop at this breakpoint until the @var{count}'th time it is reached. An argument to this command is meaningful only when the program stopped -due to a breakpoint. At other times, the argument to @samp{continue} is +due to a breakpoint. At other times, the argument to @code{continue} is ignored. -The synonym @samp{fg} is provided purely for convenience, and has +The synonym @code{fg} is provided purely for convenience, and has exactly the same behavior as other forms of the command. @end table @@ -2025,35 +2101,35 @@ print the values of certain expressions, or enable other breakpoints. @kindex end Specify a list of commands for breakpoint number @var{bnum}. The commands themselves appear on the following lines. Type a line containing just -@samp{end} to terminate the commands. +@code{end} to terminate the commands. To remove all commands from a breakpoint, use the command -@samp{commands} and follow it immediately by @samp{end}; that is, give +@code{commands} and follow it immediately by @code{end}; that is, give no commands. -With no arguments, @samp{commands} refers to the last breakpoint set +With no arguments, @code{commands} refers to the last breakpoint set (not to the breakpoint most recently encountered). @end table Pressing @key{RET} as a means of repeating the last _GDBN__ command is -disabled from the time you enter @samp{commands} to just after the -corresponding @samp{end}. +disabled from the time you enter @code{commands} to just after the +corresponding @code{end}. You can use breakpoint commands to start the program up again. Simply -use the @samp{continue} command, or @samp{step}, or any other command to +use the @code{continue} command, or @code{step}, or any other command to resume execution. However, if you do this, any further commands in the same breakpoint's command list are ignored. When the program stops again, _GDBN__ will act according to the cause of that stop. @kindex silent -If the first command specified is @samp{silent}, the usual message about +If the first command specified is @code{silent}, the usual message about stopping at a breakpoint is not printed. This may be desirable for breakpoints that are to print a specific message and then continue. If the remaining commands too print nothing, you will see no sign that -the breakpoint was reached at all. @samp{silent} is not really a command; +the breakpoint was reached at all. @code{silent} is not really a command; it is meaningful only at the beginning of the commands for a breakpoint. -The commands @samp{echo} and @samp{output} that allow you to print precisely +The commands @code{echo} and @code{output} that allow you to print precisely controlled output are often useful in silent breakpoints. @xref{Output}. For example, here is how you could use breakpoint commands to print the @@ -2074,8 +2150,8 @@ One application for breakpoint commands is to correct one bug so you can test another. Put a breakpoint just after the erroneous line of code, give it a condition to detect the case in which something erroneous has been done, and give it commands to assign correct values to any variables that -need them. End with the @samp{continue} command so that the program does not -stop, and start with the @samp{silent} command so that no output is +need them. End with the @code{continue} command so that the program does not +stop, and start with the @code{silent} command so that no output is produced. Here is an example: @example @@ -2130,7 +2206,7 @@ Remove or disable the breakpoints, then continue. @item Suspend _GDBN__, and copy the file containing the program to a new name. -Resume _GDBN__ and use the @samp{exec-file} command to specify that _GDBN__ +Resume _GDBN__ and use the @code{exec-file} command to specify that _GDBN__ should run the program under that name. Then start the program again. @item @@ -2155,7 +2231,7 @@ stepping command specifies. @kindex s Continue running the program until control reaches a different source line, then stop it and return control to the debugger. This command is -abbreviated @samp{s}. +abbreviated @code{s}. This command may be given when control is within a function for which there is no debugging information. In that case, execution will proceed @@ -2163,7 +2239,7 @@ until control reaches a different function, or is about to return from this function. @item step @var{count} -Continue running as in @samp{step}, but do so @var{count} times. If a +Continue running as in @code{step}, but do so @var{count} times. If a breakpoint is reached or a signal not related to stepping occurs before @var{count} steps, stepping stops right away. @@ -2171,15 +2247,15 @@ breakpoint is reached or a signal not related to stepping occurs before @kindex next @kindex n Continue to the next source line in the current stack frame. Similar to -@samp{step}, but any function calls appearing within the line of code +@code{step}, but any function calls appearing within the line of code are executed without stopping. Execution stops when control reaches a different line of code at the stack level which was executing when the -@samp{next} command was given. This command is abbreviated @samp{n}. +@code{next} command was given. This command is abbreviated @code{n}. -An argument is a repeat count, as in @samp{step}. +An argument is a repeat count, as in @code{step}. -@samp{next} within a function that lacks debugging information acts as does -@samp{step}, but any function calls appearing within the code of the +@code{next} within a function that lacks debugging information acts as does +@code{step}, but any function calls appearing within the code of the function are executed without stopping. @c FIXME: great; so what does *step* do within a fn that lacks debug info? @@ -2190,7 +2266,7 @@ until there is some other reason to stop, such as a fatal signal or a breakpoint). Print the value returned by the selected stack frame (if any). -Contrast this with the @samp{return} command (@pxref{Returning}). +Contrast this with the @code{return} command (@pxref{Returning}). @item until @kindex until @@ -2198,40 +2274,40 @@ Contrast this with the @samp{return} command (@pxref{Returning}). @kindex u Continue running until a source line past the current line, in the current stack frame, is reached. This command is used to avoid single -stepping through a loop more than once. It is like the @samp{next} -command, except that when @samp{until} encounters a jump, it +stepping through a loop more than once. It is like the @code{next} +command, except that when @code{until} encounters a jump, it automatically continues execution until the program counter is greater than the address of the jump. This means that when you reach the end of a loop after single stepping -though it, @samp{until} will cause the program to continue execution -until the loop is exited. In contrast, a @samp{next} command at the end +though it, @code{until} will cause the program to continue execution +until the loop is exited. In contrast, a @code{next} command at the end of a loop will simply step back to the beginning of the loop, which would force you to step through the next iteration. -@samp{until} always stops the program if it attempts to exit the current +@code{until} always stops the program if it attempts to exit the current stack frame. -@samp{until} may produce somewhat counterintuitive results if the order +@code{until} may produce somewhat counterintuitive results if the order of the source lines does not match the actual order of execution. For example, in a typical C @code{for}-loop, the third expression in the @code{for}-statement (the loop-step expression) is executed after the statements in the body of the loop, but is written before them. -Therefore, the @samp{until} command would appear to step back to the +Therefore, the @code{until} command would appear to step back to the beginning of the loop when it advances to this expression. However, it has not really done so, not in terms of the actual machine code. -@samp{until} with no argument works by means of single -instruction stepping, and hence is slower than @samp{until} with an +@code{until} with no argument works by means of single +instruction stepping, and hence is slower than @code{until} with an argument. @item until @var{location} @item u @var{location} Continue running the program until either the specified location is reached, or the current (innermost) stack frame returns. @var{location} -is any of the forms of argument acceptable to @samp{break} (@pxref{Set +is any of the forms of argument acceptable to @code{break} (@pxref{Set Breaks}). This form of the command uses breakpoints, and hence is -quicker than @samp{until} without an argument. +quicker than @code{until} without an argument. @item stepi @itemx si @@ -2243,7 +2319,7 @@ It is often useful to do @samp{display/i $pc} when stepping by machine instructions. This will cause the next instruction to be executed to be displayed automatically at each stop. @xref{Auto Display}. -An argument is a repeat count, as in @samp{step}. +An argument is a repeat count, as in @code{step}. @item nexti @itemx ni @@ -2252,7 +2328,7 @@ An argument is a repeat count, as in @samp{step}. Execute one machine instruction, but if it is a function call, proceed until the function returns. -An argument is a repeat count, as in @samp{next}. +An argument is a repeat count, as in @code{next}. @end table A typical technique for using stepping is to put a breakpoint @@ -2262,7 +2338,7 @@ it stops at that breakpoint, and then step through the suspect area, examining the variables that are interesting, until you see the problem happen. -The @samp{continue} command can be used after stepping to resume execution +The @code{continue} command can be used after stepping to resume execution until the next breakpoint or signal. @node Continuing, Signals, Stepping, Stopping @@ -2279,11 +2355,11 @@ Continue running the program at the place where it stopped. If the program stopped at a breakpoint, the place to continue running is the address of the breakpoint. You might expect that continuing would -just stop at the same breakpoint immediately. In fact, @samp{continue} +just stop at the same breakpoint immediately. In fact, @code{continue} takes special care to prevent that from happening. You do not need to delete the breakpoint to proceed through it after stopping at it. You can, however, specify an ignore-count for the breakpoint that the -program stopped at, by means of an argument to the @samp{continue} command. +program stopped at, by means of an argument to the @code{continue} command. @xref{Conditions}. If the program stopped because of a signal other than @code{SIGINT} or @@ -2295,7 +2371,7 @@ execution; but the program would probably terminate immediately as a result of the fatal signal once it sees the signal. To prevent this, you can continue with @samp{signal 0}. @xref{Signaling}. You can also act in advance to control what signals your program will see, using -the @samp{handle} command (@pxref{Signals}). +the @code{handle} command (@pxref{Signals}). @node Signals, , Continuing, Stopping @section Signals @@ -2326,7 +2402,7 @@ each kind of signal. Normally, _GDBN__ is set up to ignore non-erroneous signals like @code{SIGALRM} (so as not to interfere with their role in the functioning of the program) but to stop the program immediately whenever an error signal happens. -You can change these settings with the @samp{handle} command. +You can change these settings with the @code{handle} command. @table @code @item info signals @@ -2343,7 +2419,7 @@ beginning). The @var{keywords} say what change to make. @end table @group -The keywords allowed by the @samp{handle} command can be abbreviated. +The keywords allowed by the @code{handle} command can be abbreviated. Their full names are: @table @code @@ -2353,14 +2429,14 @@ still print a message telling you that the signal has come in. @item stop _GDBN__ should stop the program when this signal happens. This implies -the @samp{print} keyword as well. +the @code{print} keyword as well. @item print _GDBN__ should print a message when this signal happens. @item noprint _GDBN__ should not mention the occurrence of the signal at all. This -implies the @samp{nostop} keyword as well. +implies the @code{nostop} keyword as well. @item pass _GDBN__ should allow the program to see this signal; the program will be @@ -2373,13 +2449,13 @@ _GDBN__ should not allow the program to see this signal. @end group When a signal has been set to stop the program, the program cannot see the -signal until you continue. It will see the signal then, if @samp{pass} is +signal until you continue. It will see the signal then, if @code{pass} is in effect for the signal in question @i{at that time}. In other words, -after _GDBN__ reports a signal, you can use the @samp{handle} command with -@samp{pass} or @samp{nopass} to control whether that signal will be seen by +after _GDBN__ reports a signal, you can use the @code{handle} command with +@code{pass} or @code{nopass} to control whether that signal will be seen by the program when you later continue it. -You can also use the @samp{signal} command to prevent the program from +You can also use the @code{signal} command to prevent the program from seeing a signal, or cause it to see a signal it normally would not see, or to give it any signal at any time. @xref{Signaling}. @@ -2409,14 +2485,14 @@ selected frame. There are special _GDBN__ commands to select whichever frame you are interested in. When the program stops, _GDBN__ automatically selects the currently executing -frame and describes it briefly as the @samp{frame} command does +frame and describes it briefly as the @code{frame} command does (@pxref{Frame Info, Info}). @menu -* Frames:: Stack Frames -* Backtrace:: Backtraces -* Selection:: Selecting a Frame -* Frame Info:: Information on a Frame +* Frames:: Stack Frames +* Backtrace:: Backtraces +* Selection:: Selecting a Frame +* Frame Info:: Information on a Frame @end menu @node Frames, Backtrace, Stack, Stack @@ -2504,7 +2580,7 @@ The names @code{where} and @code{info stack} (abbreviated @code{info s}) are additional aliases for @code{backtrace}. Each line in the backtrace shows the frame number and the function name. -The program counter value is also shown---unless you use @samp{set +The program counter value is also shown---unless you use @code{set print address off}. The backtrace also shows the source file name and line number, as well as the arguments to the function. The program counter value is omitted if it is at the beginning of the code for that @@ -2575,10 +2651,10 @@ that source line. For example: @smallexample (_GDBP__) up #1 0x22f0 in main (argc=1, argv=0xf7fffbf4, env=0xf7fffbfc) at env.c:10 -10 read_input_file (argv[i]); +10 read_input_file (argv[i]); @end smallexample -After such a printout, the @samp{list} command with no arguments will print +After such a printout, the @code{list} command with no arguments will print ten lines centered on the point of execution in the frame. @xref{List}. @table @code @@ -2586,7 +2662,7 @@ ten lines centered on the point of execution in the frame. @xref{List}. @itemx down-silently @var{n} @kindex down-silently @kindex up-silently -These two commands are variants of @samp{up} and @samp{down}, +These two commands are variants of @code{up} and @code{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 _GDBN__ command scripts, where the output might be unnecessary and @@ -2605,7 +2681,7 @@ stack frame. @itemx 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 @samp{f}. With an +selected stack frame. It can be abbreviated @code{f}. With an argument, this command is used to select a stack frame (@pxref{Selection}). @item info frame @@ -2643,8 +2719,8 @@ program blocks that execution in this frame is currently inside of. @cindex exception handlers Print a list of all the exception handlers that are active in the current stack frame at the current point of execution. To see other -exception handlers, visit the associated frame (using the @samp{up}, -@samp{down}, or @samp{frame} commands); then type @samp{info catch}. +exception handlers, visit the associated frame (using the @code{up}, +@code{down}, or @code{frame} commands); then type @code{info catch}. @xref{Exception Handling}. @end table @@ -2663,10 +2739,10 @@ If you use _GDBN__ through its GNU Emacs interface, you may prefer to use Emacs facilities to view source; @pxref{Emacs}. @menu -* List:: Printing Source Lines -* Search:: Searching Source Files -* Source Path:: Specifying Source Directories -* Machine Code:: Source and Machine Code +* List:: Printing Source Lines +* Search:: Searching Source Files +* Source Path:: Specifying Source Directories +* Machine Code:: Source and Machine Code @end menu @node List, Search, Source, Source @@ -2674,11 +2750,11 @@ use Emacs facilities to view source; @pxref{Emacs}. @kindex list @kindex l -To print lines from a source file, use the @samp{list} command -(abbreviated @samp{l}). There are several ways to specify what part +To print lines from a source file, use the @code{list} command +(abbreviated @code{l}). There are several ways to specify what part of the file you want to print. -Here are the forms of the @samp{list} command most commonly used: +Here are the forms of the @code{list} command most commonly used: @table @code @item list @var{linenum} @@ -2691,7 +2767,7 @@ Print ten lines centered around the beginning of function @item list Print ten more lines. If the last lines printed were printed with a -@samp{list} command, this prints ten lines following the last lines +@code{list} command, this prints ten lines following the last lines printed; however, if the last line printed was a solitary line printed as part of displaying a stack frame (@pxref{Stack}), this prints ten lines centered around that line. @@ -2700,17 +2776,17 @@ lines centered around that line. Print ten lines just before the lines last printed. @end table -Repeating a @samp{list} command with @key{RET} discards the argument, -so it is equivalent to typing just @samp{list}. This is more useful +Repeating a @code{list} command with @key{RET} discards the argument, +so it is equivalent to typing just @code{list}. This is more useful than listing the same lines again. An exception is made for an argument of @samp{-}; that argument is preserved in repetition so that each repetition moves up in the source file. @cindex linespec -In general, the @samp{list} command expects you to supply zero, one or two +In general, the @code{list} command expects you to supply zero, one or two @dfn{linespecs}. Linespecs specify source lines; there are several ways of writing them but the effect is always to specify some source line. -Here is a complete description of the possible arguments for @samp{list}: +Here is a complete description of the possible arguments for @code{list}: @table @code @item list @var{linespec} @@ -2742,12 +2818,12 @@ kinds of linespec. @table @code @item @var{number} Specifies line @var{number} of the current source file. -When a @samp{list} command has two linespecs, this refers to +When a @code{list} command has two linespecs, this refers to the same source file as the first linespec. @item +@var{offset} Specifies the line @var{offset} lines after the last line printed. -When used as the second linespec in a @samp{list} command that has +When used as the second linespec in a @code{list} command that has two, this specifies the line @var{offset} lines down from the first linespec. @@ -2789,13 +2865,13 @@ regular expression. The command @samp{forward-search @var{regexp}} checks each line, starting with the one following the last line listed, for a match for @var{regexp}. It lists the line that is found. You can abbreviate the command name -as @samp{fo}. The synonym @samp{search @var{regexp}} is also supported. +as @code{fo}. The synonym @samp{search @var{regexp}} is also supported. @item reverse-search @var{regexp} The command @samp{reverse-search @var{regexp}} checks each line, starting with the one before the last line listed and going backward, for a match for @var{regexp}. It lists the line that is found. You can abbreviate -this command as @samp{rev}. +this command as @code{rev}. @end table @node Source Path, Machine Code, Search, Source @@ -2826,7 +2902,7 @@ each line is in the file, etc. @kindex directory When you start _GDBN__, its source path is empty. -To add other directories, use the @samp{directory} command. +To add other directories, use the @code{directory} command. @table @code @item directory @var{dirname} @dots{} @@ -2840,7 +2916,7 @@ the string @samp{$cwd} to refer to the current working directory, and @item directory Reset the source path to empty again. This requires confirmation. -The @samp{directory} command will not repeat if you press @key{RET} a +The @code{directory} command will not repeat if you press @key{RET} a second time after executing it once. @item show directories @@ -2854,19 +2930,19 @@ versions of source. You can correct the situation as follows: @enumerate @item -Use @samp{directory} with no argument to reset the source path to empty. +Use @code{directory} with no argument to reset the source path to empty. @item -Use @samp{directory} with suitable arguments to add any other +Use @code{directory} with suitable arguments to add any other directories you want in the source path. You can add all the directories in one command. @end enumerate @node Machine Code, , Source Path, Source @section Source and Machine Code -You can use the command @samp{info line} to map source lines to program -addresses, and the command @samp{disassemble} or its synonym -@samp{disasm} to display a range of addresses as machine instructions. +You can use the command @code{info line} to map source lines to program +addresses, and the command @code{disassemble} or its synonym +@code{disasm} to display a range of addresses as machine instructions. @table @code @item info line @var{linespec} @@ -2875,7 +2951,7 @@ Print the starting and ending addresses of the compiled code for source line @var{linespec}. @kindex $_ -After @samp{info line}, the default address for the @samp{x} +After @code{info line}, the default address for the @code{x} command is changed to the starting address of the line, so that @samp{x/i} is sufficient to begin examining the machine code (@pxref{Memory}). Also, this address is saved as the value of the @@ -2892,8 +2968,8 @@ surrounding the program counter of the selected frame. A single argument to this command is a program counter value; the function surrounding this value will be dumped. Two arguments (separated by one or more spaces) specify a range of addresses (first inclusive, second -exclusive) to be dumped. The two spellings, @samp{disasm} and -@samp{disassemble}, are equivalent. +exclusive) to be dumped. The two spellings, @code{disasm} and +@code{disassemble}, are equivalent. @end table @node Data, Symbols, Source, Top @@ -2906,8 +2982,8 @@ exclusive) to be dumped. The two spellings, @samp{disasm} and @c "inspect" isn't quite a synonym if you're using Epoch, which we don't @c document because it's nonstandard... Under Epoch it displays in a @c different window or something like that. -The usual way to examine data in your program is with the @samp{print} -command (abbreviated @samp{p}), or its synonym @samp{inspect}. It +The usual way to examine data in your program is with the @code{print} +command (abbreviated @code{p}), or its synonym @code{inspect}. It evaluates and prints the value of any valid expression of the language the program is written in (for now, C or C++). You type @@ -2920,22 +2996,22 @@ where @var{exp} is any valid expression (in the source language), and the value of @var{exp} is printed in a format appropriate to its data type. -A more low-level way of examining data is with the @samp{x} command. +A more low-level way of examining data is with the @code{x} command. It examines data in memory at a specified address and prints it in a specified format. @xref{Memory}. @menu -* Expressions:: Expressions -* Variables:: Program Variables -* Arrays:: Artificial Arrays -* Output formats:: Output formats -* Memory:: Examining Memory -* Auto Display:: Automatic Display -* Print Settings:: Print Settings -* Value History:: Value History -* Convenience Vars:: Convenience Variables -* Registers:: Registers -* Floating Point Hardware:: Floating Point Hardware +* Expressions:: Expressions +* Variables:: Program Variables +* Arrays:: Artificial Arrays +* Output formats:: Output formats +* Memory:: Examining Memory +* Auto Display:: Automatic Display +* Print Settings:: Print Settings +* Value History:: Value History +* Convenience Vars:: Convenience Variables +* Registers:: Registers +* Floating Point Hardware:: Floating Point Hardware @end menu @node Expressions, Variables, Data, Data @@ -3076,10 +3152,10 @@ these things, specify an @dfn{output format} when you print a value. The simplest use of output formats is to say how to print a value already computed. This is done by starting the arguments of the -@samp{print} command with a slash and a format letter. The format +@code{print} command with a slash and a format letter. The format letters supported are: -@table @samp +@table @code @item x Regard the bits of the value as an integer, and print the integer in hexadecimal. @@ -3094,8 +3170,7 @@ Print as integer in unsigned decimal. Print as integer in octal. @item t -Print as integer in binary. The letter @samp{t} stands for ``two'', as -in base two. +Print as integer in binary. The letter @samp{t} stands for ``two''. @item a Print as an address, both absolute in hex and as an offset from the @@ -3126,7 +3201,7 @@ Note that no space is required before the slash; this is because command names in _GDBN__ cannot contain a slash. To reprint the last value in the value history with a different format, -you can use the @samp{print} command with just a format and no +you can use the @code{print} command with just a format and no expression. For example, @samp{p/x} reprints the last value in hex. @node Memory, Auto Display, Output formats, Data @@ -3136,11 +3211,11 @@ expression. For example, @samp{p/x} reprints the last value in hex. @table @code @kindex x @item x/@var{Nuf} @var{expr} -The command @samp{x} (for `examine') can be used to examine memory +The command @code{x} (for `examine') can be used to examine memory without being constrained by your program's data types. You can specify the unit size @var{u} of memory to inspect, and a repeat count @var{N} of how -many of those units to display. @samp{x} understands the formats -@var{f} used by @samp{print}; two additional formats, @samp{s} (string) +many of those units to display. @code{x} understands the formats +@var{f} used by @code{print}; two additional formats, @samp{s} (string) and @samp{i} (machine instruction) can be used without specifying a unit size. @end table @@ -3162,9 +3237,9 @@ expression need not have a pointer value (though it may); it is always interpreted as an integer address of a byte of memory. @xref{Expressions} for more information on expressions. -These are the memory units @var{u} you can specify with @samp{x}: +These are the memory units @var{u} you can specify with @code{x}: -@table @samp +@table @code @item b Examine individual bytes. @@ -3187,12 +3262,12 @@ Examine giant words (8 bytes). @end table You can combine these unit specifications with any of the formats -described for @samp{print}. @xref{Output formats}. +described for @code{print}. @xref{Output formats}. -@samp{x} has two additional output specifications which derive the unit +@code{x} has two additional output specifications which derive the unit size from the data inspected: -@table @samp +@table @code @item s Print a null-terminated string of characters. Any explicitly specified unit size is ignored; instead, the unit is however many bytes it takes @@ -3202,11 +3277,11 @@ to reach a null character (including the null character). Print a machine instruction in assembler syntax (or nearly). Any specified unit size is ignored; the number of bytes in an instruction varies depending on the type of machine, the opcode and the addressing -modes used. The command @samp{disassemble} gives an alternative way of +modes used. The command @code{disassemble} gives an alternative way of inspecting machine instructions. @xref{Machine Code}. @end table -If you omit either the format @var{f} or the unit size @var{u}, @samp{x} +If you omit either the format @var{f} or the unit size @var{u}, @code{x} will use the same one that was used last. If you don't use any letters after the slash, you can omit the slash as well. @@ -3215,14 +3290,14 @@ after the last unit examined. This is why string and instruction formats actually compute a unit-size based on the data: so that the next string or instruction examined will start in the right place. -When the @samp{print} command shows a value that resides in memory, -@samp{print} also sets the default address for the @samp{x} command. -@samp{info line} also sets the default for @samp{x}, to the address of +When the @code{print} command shows a value that resides in memory, +@code{print} also sets the default address for the @code{x} command. +@code{info line} also sets the default for @code{x}, to the address of the start of the machine code for the specified line (@pxref{Machine -Code}), and @samp{info breakpoints} sets it to the address of the last +Code}), and @code{info breakpoints} sets it to the address of the last breakpoint listed (@pxref{Set Breaks}). -When you use @key{RET} to repeat an @samp{x} command, the address +When you use @key{RET} to repeat an @code{x} command, the address specified previously (if any) is ignored, so that the repeated command examines the successive locations in memory rather than the same ones. @@ -3230,7 +3305,7 @@ You can examine several consecutive units of memory with one command by writing a repeat-count after the slash (before the format letters, if any). Omitting the repeat count @var{N} displays one unit of the appropriate size. The repeat count must be a decimal integer. It has -the same effect as repeating the @samp{x} command @var{N} times except +the same effect as repeating the @code{x} command @var{N} times except that the output may be more compact, with several units per line. For example, @@ -3252,16 +3327,16 @@ x/7 @kindex $_ @kindex $__ -The addresses and contents printed by the @samp{x} command are not put +The addresses and contents printed by the @code{x} command are not put in the value history because there is often too much of them and they would get in the way. Instead, _GDBN__ makes these values available for subsequent use in expressions as values of the convenience variables -@code{$_} and @code{$__}. After an @samp{x} command, the last address +@code{$_} and @code{$__}. After an @code{x} command, the last address examined is available for use in expressions in the convenience variable @code{$_}. The contents of that address, as examined, are available in the convenience variable @code{$__}. -If the @samp{x} command has a repeat count, the address and contents saved +If the @code{x} command has a repeat count, the address and contents saved are from the last memory unit printed; this is not the same as the last address printed if several units were printed on the last line of output. @@ -3284,7 +3359,7 @@ The automatic display looks like this: @noindent showing item numbers, expressions and their current values. As with -displays you request manually using @samp{x} or @samp{print}, you can +displays you request manually using @code{x} or @code{print}, you can specify the output format you prefer; in fact, @dfn{display} decides whether to use @code{print} or @code{x} depending on how elaborate your format specification is---it uses @code{x} if you specify a unit size, @@ -3297,7 +3372,7 @@ supported by @code{x}; otherwise it uses @code{print}. Add the expression @var{exp} to the list of expressions to display each time the program stops. @xref{Expressions}. -@samp{display} will not repeat if you press @key{RET} again after using it. +@code{display} will not repeat if you press @key{RET} again after using it. @item display/@var{fmt} @var{exp} For @var{fmt} specifying only a display format and not a size or @@ -3323,7 +3398,7 @@ is a common name for the program counter; @pxref{Registers}). @kindex undisplay Remove item numbers @var{dnums} from the list of expressions to display. -@samp{undisplay} will not repeat if you press @key{RET} after using it. +@code{undisplay} will not repeat if you press @key{RET} after using it. @item disable display @var{dnums}@dots{} @kindex disable display @@ -3353,11 +3428,11 @@ If a display expression refers to local variables, then it does not make sense outside the lexical context for which it was set up. Such an expression is disabled when execution enters a context where one of its variables is not defined. For example, if you give the command -@samp{display name} while inside a function with an argument +@code{display name} while inside a function with an argument @code{name}, then this argument will be displayed while the program continues to stop inside that function. When it stops elsewhere---where -there is no variable @samp{name}---display is disabled. The next time -your program stops where @samp{name} is meaningful, you can enable the +there is no variable @code{name}---display is disabled. The next time +your program stops where @code{name} is meaningful, you can enable the display expression once again. @node Print Settings, Value History, Auto Display, Data @@ -3402,7 +3477,7 @@ arrays. @item set print elements @var{number-of-elements} @kindex set print elements If _GDBN__ is printing a large array, it will stop printing after it has -printed the number of elements set by the @samp{set print elements} command. +printed the number of elements set by the @code{set print elements} command. This limit also applies to the display of strings. @item show print elements @@ -3486,14 +3561,14 @@ struct thing foo = @{Tree, @{Acorn@}@}; @end smallexample @noindent -with @samp{set print union on} in effect @samp{p foo} would print +with @code{set print union on} in effect @samp{p foo} would print @smallexample $1 = @{it = Tree, form = @{tree = Acorn, bug = Cocoon@}@} @end smallexample @noindent -and with @samp{set print union off} in effect it would print +and with @code{set print union off} in effect it would print @smallexample $1 = @{it = Tree, form = @{...@}@} @@ -3560,10 +3635,10 @@ Show whether C++ virtual function tables are pretty printed, or not. @section Value History @cindex value history -Values printed by the @samp{print} command are saved in _GDBN__'s @dfn{value +Values printed by the @code{print} command are saved in _GDBN__'s @dfn{value history} so that you can refer to them in other expressions. Values are kept until the symbol table is re-read or discarded (for example with -the @samp{file} or @samp{symbol-file} commands). When the symbol table +the @code{file} or @code{symbol-file} commands). When the symbol table changes, the value history is discarded, since the values may contain pointers back to the types defined in the symbol table. @@ -3571,12 +3646,12 @@ pointers back to the types defined in the symbol table. @cindex @code{$$} @cindex history number The values printed are given @dfn{history numbers} for you to refer to them -by. These are successive integers starting with 1. @samp{print} shows you +by. These are successive integers starting with 1. @code{print} shows you the history number assigned to a value by printing @samp{$@var{num} = } before the value; here @var{num} is the history number. To refer to any previous value, use @samp{$} followed by the value's -history number. The way @samp{print} labels its output is designed to +history number. The way @code{print} labels its output is designed to remind you of this. Just @code{$} refers to the most recent value in the history, and @code{$$} refers to the value before that. @code{$$@var{n}} refers to the @var{n}th value from the end; @code{$$2} @@ -3590,7 +3665,7 @@ want to see the contents of the structure. It suffices to type p *$ @end example -If you have a chain of structures where the component @samp{next} points +If you have a chain of structures where the component @code{next} points to the next one, you can print the contents of the next one with this: @example @@ -3610,14 +3685,14 @@ set x=5 @end example @noindent -then the value recorded in the value history by the @samp{print} command +then the value recorded in the value history by the @code{print} command remains 4 even though the value of @code{x} has changed. @table @code @kindex show values @item show values Print the last ten values in the value history, with their item numbers. -This is like @samp{p@ $$9} repeated ten times, except that @samp{show +This is like @samp{p@ $$9} repeated ten times, except that @code{show values} does not change the history. @item show values @var{n} @@ -3665,7 +3740,7 @@ variable, when used as an expression, has the type of its current value. @item show convenience @kindex show convenience Print a list of convenience variables used so far, and their values. -Abbreviated @samp{i con}. +Abbreviated @code{show con}. @end table One of the ways to use a convenience variable is as a counter to be @@ -3683,14 +3758,14 @@ values likely to be useful. @table @code @item $_ -The variable @code{$_} is automatically set by the @samp{x} command to +The variable @code{$_} is automatically set by the @code{x} command to the last address examined (@pxref{Memory}). Other commands which -provide a default address for @samp{x} to examine also set @code{$_} -to that address; these commands include @samp{info line} and @samp{info +provide a default address for @code{x} to examine also set @code{$_} +to that address; these commands include @code{info line} and @code{info breakpoint}. @item $__ -The variable @code{$__} is automatically set by the @samp{x} command +The variable @code{$__} is automatically set by the @code{x} command to the value found in the last address examined. @end table @@ -3700,7 +3775,7 @@ to the value found in the last address examined. @cindex registers Machine register contents can be referred to in expressions as variables with names starting with @samp{$}. The names of registers are different -for each machine; use @samp{info registers} to see the names used on +for each machine; use @code{info registers} to see the names used on your machine. The names @code{$pc} and @code{$sp} are used on most machines for the program counter register and the stack pointer. Often @code{$fp} is used for a register that contains a pointer to the current @@ -3726,7 +3801,7 @@ sees. For example, the registers of the 68881 floating point coprocessor are always saved in ``extended'' (raw) format, but all C programs expect to work with ``double'' (virtual) format. In such cases, _GDBN__ normally works with the virtual format only (the format that -makes sense for your program), but the @samp{info registers} command +makes sense for your program), but the @code{info registers} command prints the data in both formats. Normally, register values are relative to the selected stack frame @@ -3776,7 +3851,7 @@ The last is a way of removing one word from the stack, on machines where stacks grow downward in memory (most machines, nowadays). This assumes that the innermost stack frame is selected. Setting @code{$sp} is not allowed when other stack frames are selected. (To pop entire frames -off the stack, regardless of machine architecture, use @samp{return}; +off the stack, regardless of machine architecture, use @code{return}; @pxref{Returning}.) @node Floating Point Hardware, , Registers, Data @@ -3838,8 +3913,8 @@ the name of a type, or for C code it may have the form @samp{enum @var{enum-tag}}.@refill @item ptype @var{exp} -Print a description of the type of expression @var{exp}. @samp{ptype} -differs from @samp{whatis} by printing a detailed description, instead of just +Print a description of the type of expression @var{exp}. @code{ptype} +differs from @code{whatis} by printing a detailed description, instead of just the name of the type. For example, if your program declares a variable as @example @@ -3864,8 +3939,8 @@ Print a brief description of all types whose name matches @var{regexp} (or all types in your program, if you supply no argument). Each complete typename is matched as though it were a complete line; thus, @samp{i type value} gives information on all types in your program whose -name includes the string @samp{value}, but @samp{i type ^value$} gives -information only on types whose complete name is @samp{value}. +name includes the string @code{value}, but @samp{i type ^value$} gives +information only on types whose complete name is @code{value}. This command differs from @code{ptype} in two ways: first, like @code{whatis}, it does not print a detailed description; second, it @@ -3892,8 +3967,8 @@ Print the names and data types of all defined functions. Print the names and data types of all defined functions whose names contain a match for regular expression @var{regexp}. Thus, @samp{info fun step} finds all functions whose names -include @samp{step}; @samp{info fun ^step} finds those whose names -start with @samp{step}. +include @code{step}; @samp{info fun ^step} finds those whose names +start with @code{step}. @item info variables @kindex info variables @@ -3911,12 +3986,12 @@ This was never implemented. @item info methods @itemx info methods @var{regexp} @kindex info methods -The @samp{info-methods} command permits the user to examine all defined +The @code{info methods} command permits the user to examine all defined methods within C++ program, or (with the @var{regexp} argument) a specific set of methods found in the various C++ classes. Many C++ classes provide a large number of methods. Thus, the output -from the @samp{ptype} command can be overwhelming and hard to use. The -@samp{info-methods} command filters the methods, printing only those +from the @code{ptype} command can be overwhelming and hard to use. The +@code{info-methods} command filters the methods, printing only those which match the regular-expression @var{regexp}. @end ignore @@ -3940,11 +4015,11 @@ locations, give the program a signal, restart it at a different address, or even return prematurely from a function to its caller. @menu -* Assignment:: Assignment to Variables -* Jumping:: Continuing at a Different Address -* Signaling:: Giving the Program a Signal -* Returning:: Returning from a Function -* Calling:: Calling your Program's Functions +* Assignment:: Assignment to Variables +* Jumping:: Continuing at a Different Address +* Signaling:: Giving the Program a Signal +* Returning:: Returning from a Function +* Calling:: Calling your Program's Functions @end menu @node Assignment, Jumping, Altering, Altering @@ -3970,15 +4045,15 @@ _0__@samp{<<=}_1__. @kindex set variable @cindex variables, setting If you are not interested in seeing the value of the assignment, use the -@samp{set} command instead of the @samp{print} command. @samp{set} is -really the same as @samp{print} except that the expression's value is not +@code{set} command instead of the @code{print} command. @code{set} is +really the same as @code{print} except that the expression's value is not printed and is not put in the value history (@pxref{Value History}). The expression is evaluated only for its effects. -If the beginning of the argument string of the @samp{set} command -appears identical to a @samp{set} subcommand, use the @samp{set -variable} command instead of just @samp{set}. This command is identical -to @samp{set} except for its lack of subcommands. +If the beginning of the argument string of the @code{set} command +appears identical to a @code{set} subcommand, use the @code{set +variable} command instead of just @code{set}. This command is identical +to @code{set} except for its lack of subcommands. _GDBN__ allows more implicit conversions in assignments than C does; you can freely store an integer value into a pointer variable or vice versa, and @@ -4004,7 +4079,7 @@ stores the value 4 into that memory location. @section Continuing at a Different Address Ordinarily, when you continue the program, you do so at the place where -it stopped, with the @samp{continue} command. You can instead continue at +it stopped, with the @code{continue} command. You can instead continue at an address of your own choosing, with the following commands: @table @code @@ -4013,12 +4088,12 @@ an address of your own choosing, with the following commands: Resume execution at line number @var{linenum}. Execution will stop immediately if there is a breakpoint there. -The @samp{jump} command does not change the current stack frame, or +The @code{jump} command does not change the current stack frame, or the stack pointer, or the contents of any memory location or any register other than the program counter. If line @var{linenum} is in a different function from the one currently executing, the results may be bizarre if the two functions expect different patterns of arguments or -of local variables. For this reason, the @samp{jump} command requests +of local variables. For this reason, the @code{jump} command requests confirmation if the specified line is not in the function currently executing. However, even bizarre results are predictable if you are well acquainted with the machine-language code of the program. @@ -4037,11 +4112,11 @@ set $pc = 0x485 @end example @noindent -causes the next @samp{continue} command or stepping command to execute at +causes the next @code{continue} command or stepping command to execute at address 0x485, rather than at the address where the program stopped. @xref{Stepping}. -The most common occasion to use the @samp{jump} command is to back up, +The most common occasion to use the @code{jump} command is to back up, perhaps with more breakpoints set, over a portion of a program that has already executed. @@ -4058,7 +4133,7 @@ signal number @var{signalnum}. Alternatively, if @var{signalnum} is zero, continue execution without giving a signal. This is useful when the program stopped on account of a signal and would ordinary see the signal when resumed with the -@samp{continue} command; @samp{signal 0} causes it to resume without a +@code{continue} command; @samp{signal 0} causes it to resume without a signal. This command does not repeat when you press @key{RET} a second time @@ -4073,7 +4148,7 @@ after using it once. @item return @cindex returning from a function @kindex return -You can cancel execution of a function call with the @samp{return} +You can cancel execution of a function call with the @code{return} command. @end table @@ -4088,9 +4163,9 @@ frames inside of it, leaving its caller as the innermost remaining frame. That frame becomes selected. The specified value is stored in the registers used for returning values of functions. -The @samp{return} command does not resume execution; it leaves the +The @code{return} command does not resume execution; it leaves the program stopped in the state that would exist if the function had just -returned. In contrast, the @samp{finish} command (@pxref{Stepping}) +returned. In contrast, the @code{finish} command (@pxref{Stepping}) resumes execution until the selected stack frame returns naturally. @node Calling, , Returning, Altering @@ -4104,7 +4179,7 @@ Evaluate the expression @var{expr} without displaying @code{void} returned values. @end table -You can use this variant of the @samp{print} command if you want to +You can use this variant of the @code{print} command if you want to execute a function from your program, but without cluttering the output with @code{void} returned values. The result is printed and saved in the value history, if it is not void. @@ -4113,8 +4188,8 @@ the value history, if it is not void. @chapter _GDBN__'s Files @menu -* Files:: Commands to Specify Files -* Symbol Errors:: Errors Reading Symbol Files +* Files:: Commands to Specify Files +* Symbol Errors:: Errors Reading Symbol Files @end menu @node Files, Symbol Errors, GDB Files, GDB Files @@ -4141,7 +4216,7 @@ are useful. @kindex file Use @var{filename} as the program to be debugged. It is read for its symbols and for the contents of pure memory. It is also the program -executed when you use the @samp{run} command. If you do not specify a +executed when you use the @code{run} command. If you do not specify a directory and the file is not found in _GDBN__'s working directory, _GDBN__ will use the environment variable @code{PATH} as a list of @@ -4149,7 +4224,7 @@ directories to search, just as the shell does when looking for a program to run. You can change the value of this variable, for both _GDBN__ and your program, using the @code{path} command. -@samp{file} with no argument makes _GDBN__ discard any information it +@code{file} with no argument makes _GDBN__ discard any information it has on both executable file and the symbol table. @item exec-file @var{filename} @@ -4161,22 +4236,22 @@ if necessary to locate the program. @item symbol-file @var{filename} @kindex symbol-file Read symbol table information from file @var{filename}. @code{PATH} is -searched when necessary. Use the @samp{file} command to get both symbol +searched when necessary. Use the @code{file} command to get both symbol table and program to run from the same file. -@samp{symbol-file} with no argument clears out _GDBN__'s information on your +@code{symbol-file} with no argument clears out _GDBN__'s information on your program's symbol table. -The @samp{symbol-file} command causes _GDBN__ to forget the contents of its +The @code{symbol-file} command causes _GDBN__ to forget the contents of its convenience variables, the value history, and all breakpoints and auto-display expressions. This is because they may contain pointers to the internal data recording symbols and data types, which are part of the old symbol table data being discarded inside _GDBN__. -@samp{symbol-file} will not repeat if you press @key{RET} again after +@code{symbol-file} will not repeat if you press @key{RET} again after executing it once. -On some kinds of object files, the @samp{symbol-file} command does not +On some kinds of object files, the @code{symbol-file} command does not actually read the symbol table in full right away. Instead, it scans the symbol table quickly to find which source files and which symbols are present. The details are read later, one source file at a time, @@ -4185,10 +4260,10 @@ when they are needed. The purpose of this two-stage reading strategy is to make _GDBN__ start up faster. For the most part, it is invisible except for occasional pauses while the symbol table details for a particular source file are being -read. (The @samp{set verbose} command can turn these pauses into +read. (The @code{set verbose} command can turn these pauses into messages if desired. @xref{Messages/Warnings}). -When the symbol table is stored in COFF format, @samp{symbol-file} does +When the symbol table is stored in COFF format, @code{symbol-file} does read the symbol table data in full right away. We haven't implemented the two-stage strategy for COFF yet. @@ -4208,68 +4283,68 @@ of memory''. Traditionally, core files contain only some parts of the address space of the process that generated them; _GDBN__ can access the executable file itself for other parts. -@samp{core-file} with no argument specifies that no core file is +@code{core-file} with no argument specifies that no core file is to be used. Note that the core file is ignored when your program is actually running under _GDBN__. So, if you have been running the program and you wish to debug a core file instead, you must kill the subprocess in which the -program is running. To do this, use the @samp{kill} command +program is running. To do this, use the @code{kill} command (@pxref{Kill Process}). @item load @var{filename} @kindex load _if__(_GENERIC__) Depending on what remote debugging facilities are configured into -_GDBN__, the @samp{load} command may be available. Where it exists, it +_GDBN__, the @code{load} command may be available. Where it exists, it is meant to make @var{filename} (an executable) available for debugging on the remote system---by downloading, or dynamic linking, for example. -@samp{load} also records @var{filename}'s symbol table in _GDBN__, like -the @samp{add-symbol-file} command. +@code{load} also records @var{filename}'s symbol table in _GDBN__, like +the @code{add-symbol-file} command. -If @samp{load} is not available on your _GDBN__, attempting to execute +If @code{load} is not available on your _GDBN__, attempting to execute it gets the error message ``@code{You can't do that when your target is @dots{}}'' _fi__(_GENERIC__) _if__(_VXWORKS__) -On VxWorks, @samp{load} will dynamically link @var{filename} on the +On VxWorks, @code{load} will dynamically link @var{filename} on the current target system as well as adding its symbols in _GDBN__. _fi__(_VXWORKS__) _if__(_I960__) -With the Nindy interface to an Intel 960 board, @samp{load} will +With the Nindy interface to an Intel 960 board, @code{load} will download @var{filename} to the 960 as well as adding its symbols in _GDBN__. _fi__(_I960__) -@samp{load} will not repeat if you press @key{RET} again after using it. +@code{load} will not repeat if you press @key{RET} again after using it. @item add-symbol-file @var{filename} @var{address} @kindex add-symbol-file @cindex dynamic linking -The @samp{add-symbol-file} command reads additional symbol table information +The @code{add-symbol-file} command reads additional symbol table information from the file @var{filename}. You would use this command when that file has been dynamically loaded (by some other means) into the program that is running. @var{address} should be the memory address at which the file has been loaded; _GDBN__ cannot figure this out for itself. The symbol table of the file @var{filename} is added to the symbol table -originally read with the @samp{symbol-file} command. You can use the -@samp{add-symbol-file} command any number of times; the new symbol data thus +originally read with the @code{symbol-file} command. You can use the +@code{add-symbol-file} command any number of times; the new symbol data thus read keeps adding to the old. To discard all old symbol data instead, -use the @samp{symbol-file} command. +use the @code{symbol-file} command. -@samp{add-symbol-file} will not repeat if you press @key{RET} after using it. +@code{add-symbol-file} will not repeat if you press @key{RET} after using it. @item info files @itemx info target @kindex info files @kindex info target -@samp{info files} and @samp{info target} are synonymous; both print the +@code{info files} and @code{info target} are synonymous; both print the current targets (@pxref{Targets}), including the names of the executable and core dump files currently in use by _GDBN__, and the files from -which symbols were loaded. The command @samp{help targets} lists all +which symbols were loaded. The command @code{help targets} lists all possible targets rather than current ones. @end table @@ -4284,7 +4359,7 @@ name and remembers it that way. _GDBN__ supports the SunOS shared library format. Symbols from a shared library cannot be referenced before the shared library has been linked -with the program. (That is to say, until after you type @samp{run} and +with the program. (That is to say, until after you type @code{run} and the function @code{main} has been entered; or when examining core files.) Once the shared library has been linked in, you can use the following commands: @@ -4306,7 +4381,7 @@ Load symbols for all shared libraries. Print the names of the shared libraries which are currently loaded. @end table -@samp{sharedlibrary} does not repeat automatically when you press +@code{sharedlibrary} does not repeat automatically when you press @key{RET} after using it once. @node Symbol Errors, , Files, GDB Files @@ -4316,7 +4391,7 @@ problems, such as symbol types it does not recognize, or known bugs in compiler output. By default, it prints one message about each such type of problem, no matter how many times the problem occurs. You can ask it to print more messages, to see how many times the problems occur, -or can shut the messages off entirely, with the @samp{set +or can shut the messages off entirely, with the @code{set complaints} command (@xref{Messages/Warnings}). The messages currently printed, and their meanings, are: @@ -4342,7 +4417,7 @@ do so. _GDBN__ does not circumvent this problem, and will have trouble locating symbols in the source file whose symbols being read. (You can often -determine what source file is affected by specifying @samp{set verbose +determine what source file is affected by specifying @code{set verbose on}. @xref{Messages/Warnings}.) @item bad block start address patched @@ -4383,7 +4458,7 @@ _GDBN__ circumvents the error by ignoring this symbol information. This will usually allow the program to be debugged, though certain symbols will not be accessible. If you encounter such a problem and feel like debugging it, you can debug @code{_GDBP__} with itself, breakpoint on -@samp{complain}, then go up to the function @samp{read_dbx_symtab} and +@code{complain}, then go up to the function @code{read_dbx_symtab} and examine @code{*bufp} to see the symbol. @c @item stub type has NULL name @@ -4411,16 +4486,16 @@ kind of file or process. Often, you will be able to run _GDBN__ in the same host environment as the program you are debugging; in that case, the debugging target can just be -specified as a side effect of the @samp{file} or @samp{core} commands. +specified as a side effect of the @code{file} or @code{core} commands. When you need more flexibility---for example, running _GDBN__ on a physically separate host, controlling standalone systems over a serial port, or realtime systems over a TCP/IP connection---you can use -the @samp{target} command. +the @code{target} command. @menu -* Active Targets:: Active Targets -* Target Commands:: Commands for Managing Targets -* Remote:: Remote Debugging +* Active Targets:: Active Targets +* Target Commands:: Commands for Managing Targets +* Remote:: Remote Debugging @end menu @node Active Targets, Target Commands, Targets, Targets @@ -4445,8 +4520,8 @@ there is one of those. When you specify a new target in a given stratum, it replaces any target previously in that stratum. -To get rid of a target without replacing it, use the @samp{detach} -command. The related command @samp{attach} provides you with a way of +To get rid of a target without replacing it, use the @code{detach} +command. The related command @code{attach} provides you with a way of choosing a particular running process as a new target. @xref{Attach}. @node Target Commands, Remote, Active Targets, Targets @@ -4463,13 +4538,13 @@ Further @var{parameters} are interpreted by the target protocol, but typically include things like device names or host names to connect with, process numbers, and baud rates. -The @samp{target} command will not repeat if you press @key{RET} again +The @code{target} command will not repeat if you press @key{RET} again after executing the command. @item help target @kindex help target Displays the names of all targets available. To display targets -currently selected, use either @samp{info target} or @samp{info files} +currently selected, use either @code{info target} or @code{info files} (@pxref{Files}). @item help target @var{name} @@ -4502,8 +4577,8 @@ _if__(_AMD29K__) @kindex target amd-eb @cindex AMD EB29K Remote PC-resident AMD EB29K board, attached over serial lines. -@var{dev} is the serial device, as for @samp{target remote}; -@samp{speed} allows you to specify the linespeed; and @var{PROG} is the +@var{dev} is the serial device, as for @code{target remote}; +@var{speed} allows you to specify the linespeed; and @var{PROG} is the name of the program to be debugged, as it appears to DOS on the PC. @xref{EB29K Remote}. @@ -4513,7 +4588,7 @@ _if__(_I960__) @kindex target nindy An Intel 960 board controlled by a Nindy Monitor. @var{devicename} is the name of the serial device to use for the connection, e.g. -@samp{/dev/ttya}. @xref{i960-Nindy Remote}. +@file{/dev/ttya}. @xref{i960-Nindy Remote}. _fi__(_I960__) _if__(_VXWORKS__) @@ -4557,7 +4632,7 @@ _GDBN__ source file @file{remote.c}. To start remote debugging, first run _GDBN__ and specify as an executable file the program that is running in the remote machine. This tells _GDBN__ how to find the program's symbols and the contents of its pure text. Then -establish communication using the @samp{target remote} command with a device +establish communication using the @code{target remote} command with a device name as an argument. For example: @example @@ -4571,26 +4646,26 @@ will stop the remote machine if it is not already stopped. Now you can use all the usual commands to examine and change data and to step and continue the remote program. -To resume the remote program and stop debugging it, use the @samp{detach} +To resume the remote program and stop debugging it, use the @code{detach} command. Other remote targets may be available in your -configuration of _GDBN__; use @samp{help targets} to list them. +configuration of _GDBN__; use @code{help targets} to list them. @node Controlling _GDBN__, Sequences, Targets, Top @chapter Controlling _GDBN__ You can alter many aspects of _GDBN__'s interaction with you by using -the @samp{set} command. For commands controlling how _GDBN__ displays +the @code{set} command. For commands controlling how _GDBN__ displays data, @pxref{Print Settings}; other settings are described here. @menu -* Prompt:: Prompt -* Editing:: Command Editing -* History:: Command History -* Screen Size:: Screen Size -* Numbers:: Numbers -* Messages/Warnings:: Optional Warnings and Messages +* Prompt:: Prompt +* Editing:: Command Editing +* History:: Command History +* Screen Size:: Screen Size +* Numbers:: Numbers +* Messages/Warnings:: Optional Warnings and Messages @end menu @node Prompt, Editing, Controlling _GDBN__, Controlling _GDBN__ @@ -4598,7 +4673,7 @@ data, @pxref{Print Settings}; other settings are described here. @cindex prompt _GDBN__ indicates its readiness to read a command by printing a string called the @dfn{prompt}. This string is normally @samp{(_GDBP__)}. You -can change the prompt string with the @samp{set prompt} command. For +can change the prompt string with the @code{set prompt} command. For instance, when debugging _GDBN__ with _GDBN__, it is useful to change the prompt in one of the _GDBN__<>s so that you tell which one you are talking to. @@ -4618,14 +4693,14 @@ Prints a line of the form: @samp{Gdb's prompt is: @var{your-prompt}} @cindex command line editing _GDBN__ reads its input commands via the @dfn{readline} interface. This GNU library provides consistent behavior for programs which provide a -command line interface to the user. Advantages are @samp{emacs}-style -or @samp{vi}-style inline editing of commands, @samp{csh}-like history +command line interface to the user. Advantages are @code{emacs}-style +or @code{vi}-style inline editing of commands, @code{csh}-like history substitution, and a storage and recall of command history across debugging sessions. You may control the behavior of command line editing in _GDBN__ with the -command @samp{set}. You may check the status of any of these settings -with the command @samp{show}. +command @code{set}. You may check the status of any of these settings +with the command @code{show}. @table @code @kindex set editing @@ -4660,7 +4735,7 @@ value of the environment variable @code{GDBHISTFILE}, or to @item set history save @itemx set history save on Record command history in a file, whose name may be specified with the -@samp{set history filename} command. By default, this option is disabled. +@code{set history filename} command. By default, this option is disabled. @item set history save off Stop recording command history in a file. @@ -4674,17 +4749,17 @@ This defaults to the value of the environment variable @end table @cindex history expansion -History expansion assigns special meaning to the character @samp{!}. +History expansion assigns special meaning to the character @kbd{!}. @iftex (@xref{Event Designators}.) @end iftex -Since @samp{!} is also the logical not operator in C, history expansion +Since @kbd{!} is also the logical not operator in C, history expansion is off by default. If you decide to enable history expansion with the -@samp{set history expansion on} command, you may sometimes need to -follow @samp{!} (when it is used as logical not, in an expression) with +@code{set history expansion on} command, you may sometimes need to +follow @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 will not attempt substitution on the strings -@samp{!=} and @samp{!(}, even when history expansion is enabled. +@kbd{!=} and @kbd{!(}, even when history expansion is enabled. The commands to control history expansion are: @@ -4699,8 +4774,8 @@ Enable history expansion. History expansion is off by default. Disable history expansion. The readline code comes with more complete documentation of -editing and history expansion features. Users unfamiliar with @samp{emacs} -or @samp{vi} may wish to read it. +editing and history expansion features. Users unfamiliar with @code{emacs} +or @code{vi} may wish to read it. @iftex @xref{Command Line Editing}. @end iftex @@ -4713,7 +4788,7 @@ or @samp{vi} may wish to read it. @itemx show history size @itemx show history expansion These commands display the state of the _GDBN__ history parameters. -@samp{show history} by itself displays all four states. +@code{show history} by itself displays all four states. @end group @end table @@ -4746,7 +4821,7 @@ rather than simply letting it overflow onto the following line. Normally _GDBN__ knows the size of the screen from the termcap data base together with the value of the @code{TERM} environment variable and the @code{stty rows} and @code{stty cols} settings. If this is not correct, -you can override it with the @samp{set height} and @samp{set +you can override it with the @code{set height} and @code{set width} commands: @table @code @@ -4758,8 +4833,8 @@ width} commands: @kindex set width @kindex show width @kindex show height -These @samp{set} commands specify a screen height of @var{lpp} lines and -a screen width of @var{cpl} characters. The associated @samp{show} +These @code{set} commands specify a screen height of @var{lpp} lines and +a screen width of @var{cpl} characters. The associated @code{show} commands display the current settings. If you specify a height of zero lines, _GDBN__ will not pause during output @@ -4777,7 +4852,7 @@ numbers end with @samp{.}, and hexadecimal numbers begin with @samp{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 @samp{set radix} command. +both input and output with the @code{set radix} command. @table @code @kindex set radix @@ -4806,19 +4881,19 @@ Display the current default base for numeric input and display. @node Messages/Warnings, , Numbers, Controlling _GDBN__ @section Optional Warnings and Messages By default, _GDBN__ is silent about its inner workings. If you are running -on a slow machine, you may want to use the @samp{set verbose} command. +on a slow machine, you may want to use the @code{set verbose} command. It will make _GDBN__ tell you when it does a lengthy internal operation, so you won't think it has crashed. -Currently, the messages controlled by @samp{set verbose} are those which +Currently, the messages controlled by @code{set verbose} are those which announce that the symbol table for a source file is being read (@pxref{Files}, in the description of the command -@samp{symbol-file}). +@code{symbol-file}). @c The following is the right way to do it, but emacs 18.55 doesn't support @c @ref, and neither the emacs lisp manual version of texinfmt or makeinfo @c is released. @ignore -see @samp{symbol-file} in @ref{Files}). +see @code{symbol-file} in @ref{Files}). @end ignore @table @code @@ -4831,7 +4906,7 @@ Disables _GDBN__'s output of certain informational messages. @kindex show verbose @item show verbose -Displays whether @samp{set verbose} is on or off. +Displays whether @code{set verbose} is on or off. @end table By default, if _GDBN__ encounters bugs in the symbol table of an object file, @@ -4890,9 +4965,9 @@ ways to store sequences of commands for execution as a unit: user-defined commands and command files. @menu -* Define:: User-Defined Commands -* Command Files:: Command Files -* Output:: Commands for Controlled Output +* Define:: User-Defined Commands +* Command Files:: Command Files +* Output:: Commands for Controlled Output @end menu @node Define, Command Files, Sequences, Sequences @@ -4900,7 +4975,7 @@ user-defined commands and command files. @cindex user-defined command A @dfn{user-defined command} is a sequence of _GDBN__ commands to which you -assign a new name as a command. This is done with the @samp{define} +assign a new name as a command. This is done with the @code{define} command. @table @code @@ -4910,20 +4985,20 @@ Define a command named @var{commandname}. If there is already a command by that name, you are asked to confirm that you want to redefine it. The definition of the command is made up of other _GDBN__ command lines, -which are given following the @samp{define} command. The end of these -commands is marked by a line containing @samp{end}. +which are given following the @code{define} command. The end of these +commands is marked by a line containing @code{end}. @item document @var{commandname} @kindex document Give documentation to the user-defined command @var{commandname}. The command @var{commandname} must already be defined. This command reads -lines of documentation just as @samp{define} reads the lines of the -command definition, ending with @samp{end}. After the @samp{document} -command is finished, @samp{help} on command @var{commandname} will print +lines of documentation just as @code{define} reads the lines of the +command definition, ending with @code{end}. After the @code{document} +command is finished, @code{help} on command @var{commandname} will print the documentation you have specified. -You may use the @samp{document} command again to change the -documentation of a command. Redefining the command with @samp{define} +You may use the @code{document} command again to change the +documentation of a command. Redefining the command with @code{define} does not change the documentation. @item help user-defined @@ -4934,7 +5009,7 @@ List all user-defined commands, with the first line of the documentation @item info user @itemx info user @var{commandname} @kindex info user -Display the GDB commands used to define @var{commandname} (but not its +Display the _GDBN__ commands used to define @var{commandname} (but not its documentation). If no @var{commandname} is given, display the definitions for all user-defined commands. @end table @@ -4953,7 +5028,7 @@ when used in a user-defined command. @cindex command files A command file for _GDBN__ is a file of lines that are _GDBN__ commands. Comments -(lines starting with @samp{#}) may also be included. An empty line in a +(lines starting with @kbd{#}) may also be included. An empty line in a command file does nothing; it does not mean to repeat the last command, as it would from the terminal. @@ -4964,7 +5039,7 @@ When you start _GDBN__, it automatically executes commands from its reads the init file (if any) in your home directory and then the init file (if any) in the current working directory. (The init files are not executed if the @samp{-nx} option is given.) You can also request the -execution of a command file with the @samp{source} command: +execution of a command file with the @code{source} command: @table @code @item source @var{filename} @@ -5032,7 +5107,7 @@ expressions. @item output/@var{fmt} @var{expression} Print the value of @var{expression} in format @var{fmt}. You can use -the same formats as for @samp{print}; @pxref{Output formats}, for more +the same formats as for @code{print}; @pxref{Output formats}, for more information. @item printf @var{string}, @var{expressions}@dots{} @@ -5098,7 +5173,7 @@ left margin of the current line. Emacs uses a separate buffer for source display, and splits the window to show both your _GDBN__ session and the source. -Explicit _GDBN__ @samp{list} or search commands still produce output as +Explicit _GDBN__ @code{list} or search commands still produce output as usual, but you probably will have no reason to use them. @quotation @@ -5106,14 +5181,14 @@ usual, but you probably will have no reason to use them. current directory, it can be easy to confuse Emacs about the location of the source files, in which case the auxiliary display buffer will not appear to show your source. _GDBN__ can find programs by searching your -environment's @samp{PATH} variable, so the _GDBN__ input and output +environment's @code{PATH} variable, so the _GDBN__ input and output session will proceed normally; but Emacs doesn't get enough information back from _GDBN__ to locate the source files in this situation. To avoid this problem, either start _GDBN__ mode from the directory where your program resides, or specify a full path name when prompted for the @kbd{M-x gdb} argument. -A similar confusion can result if you use the _GDBN__ @samp{file} command to +A similar confusion can result if you use the _GDBN__ @code{file} command to switch to debugging a program in some other location, from an existing _GDBN__ buffer in Emacs. @end quotation @@ -5127,7 +5202,7 @@ Emacs variable @code{gdb-command-name}; for example, @end example @noindent (preceded by @kbd{ESC ESC}, or typed in the @code{*scratch*} buffer, or -in your @samp{.emacs} file) will make Emacs call the program named +in your @file{.emacs} file) will make Emacs call the program named ``@code{mygdb}'' instead. In the _GDBN__ I/O buffer, you can use these special Emacs commands in @@ -5138,55 +5213,55 @@ addition to the standard Shell mode commands: Describe the features of Emacs' _GDBN__ Mode. @item M-s -Execute to another source line, like the _GDBN__ @samp{step} command; also +Execute to another source line, like the _GDBN__ @code{step} command; also update the display window to show the current file and location. @item M-n Execute to next source line in this function, skipping all function -calls, like the _GDBN__ @samp{next} command. Then update the display window +calls, like the _GDBN__ @code{next} command. Then update the display window to show the current file and location. @item M-i -Execute one instruction, like the _GDBN__ @samp{stepi} command; update +Execute one instruction, like the _GDBN__ @code{stepi} command; update display window accordingly. @item M-x gdb-nexti -Execute to next instruction, using the _GDBN__ @samp{nexti} command; update +Execute to next instruction, using the _GDBN__ @code{nexti} command; update display window accordingly. @item C-c C-f Execute until exit from the selected stack frame, like the _GDBN__ -@samp{finish} command. +@code{finish} command. @item M-c @c C-c C-p in emacs 19 -Continue execution of the program, like the _GDBN__ @samp{continue} command. +Continue execution of the program, like the _GDBN__ @code{continue} command. @item M-u @c C-c C-u in emacs 19 Go up the number of frames indicated by the numeric argument (@pxref{Arguments, , Numeric Arguments, emacs, The GNU Emacs Manual}), -like the _GDBN__ @samp{up} command.@refill +like the _GDBN__ @code{up} command.@refill @item M-d @c C-c C-d in emacs 19 Go down the number of frames indicated by the numeric argument, like the -_GDBN__ @samp{down} command. +_GDBN__ @code{down} command. @item C-x & Read the number where the cursor is positioned, and insert it at the end of the _GDBN__ I/O buffer. For example, if you wish to disassemble code around an address that was displayed earlier, type @kbd{disassemble}; then move the cursor to the address display, and pick up the -argument for @samp{disassemble} by typing @kbd{C-x &}. +argument for @code{disassemble} by typing @kbd{C-x &}. You can customize this further on the fly by defining elements of the list -@samp{gdb-print-command}; once it is defined, you can format or +@code{gdb-print-command}; once it is defined, you can format or otherwise process numbers picked up by @kbd{C-x &} before they are inserted. A numeric argument to @kbd{C-x &} will both flag that you wish special formatting, and act as an index to pick an element of the list. If the list element is a string, the number to be inserted is -formatted using the Emacs function @samp{format}; otherwise the number +formatted using the Emacs function @code{format}; otherwise the number is passed as an argument to the corresponding list element. @item M-x gdb-display-frame @@ -5213,9 +5288,9 @@ to correspond properly to the code. @kindex epoch @kindex inspect -Version 18 of Emacs has a built-in window system called the @samp{epoch} +Version 18 of Emacs has a built-in window system called the @code{epoch} environment. Users of this environment can use a new command, -@samp{inspect} which performs identically to @samp{print} except that +@code{inspect} which performs identically to @code{print} except that each value is printed in its own window. @end ignore @@ -5236,8 +5311,8 @@ In order for a bug report to serve its purpose, you must include the information that enables us to fix the bug. @menu -* Bug Criteria:: Have You Found a Bug? -* Bug Reporting:: How to Report Bugs +* Bug Criteria:: Have You Found a Bug? +* Bug Reporting:: How to Report Bugs @end menu @node Bug Criteria, Bug Reporting, _GDBN__ Bugs, _GDBN__ Bugs @@ -5279,7 +5354,7 @@ If you obtained _GDBN__ from a support organization, we recommend you contact that organization first. Contact information for many support companies and individuals is -available in the file @samp{etc/SERVICE} in the GNU Emacs distribution. +available in the file @file{etc/SERVICE} in the GNU Emacs distribution. In any event, we also recommend that you send bug reports for _GDBN__ to one of these addresses: @@ -5339,7 +5414,7 @@ To enable us to fix the bug, you should include all these things: @itemize @bullet @item The version of _GDBN__. _GDBN__ announces it if you start with no -arguments; you can also print it at any time using @samp{show version}. +arguments; you can also print it at any time using @code{show version}. Without this, we won't know whether there is any point in looking for the bug in the current version of _GDBN__. @@ -5443,17 +5518,17 @@ things without first using the debugger to find the facts. @include readline/inc-history.texinfo @end iftex -@node Installing _GDBN__, License, _GDBN__ Bugs, Top +@node Installing _GDBN__, Copying, _GDBN__ Bugs, Top @appendix Installing _GDBN__ @cindex configuring _GDBN__ @cindex installation -The script @samp{config.gdb} automates the process of preparing _GDBN__ -for installation; you can then use @samp{make} to actually build it. -The best way to build GDB is in a subdirectory that records the +The script @code{config.gdb} automates the process of preparing _GDBN__ +for installation; you can then use @code{make} to actually build it. +The best way to build _GDBN__ is in a subdirectory that records the configuration options used; this gives you a clean way of building _GDBN__ binaries with several different configuration options. -@samp{config.gdb} doesn't depend on this---it's just a good habit. For +@code{config.gdb} doesn't depend on this---it's just a good habit. For example, assuming the _GDBN__ source is in a directory called ``@code{gdb-4.0}'': @@ -5497,7 +5572,7 @@ path to the _GDBN__ source. Display a list of supported target environments for _GDBN__. @end table -@node License, Index, Installing _GDBN__, Top +@node Copying, Index, Installing _GDBN__, Top @unnumbered GNU GENERAL PUBLIC LICENSE @center Version 1, February 1989 @@ -5795,7 +5870,7 @@ Ty Coon, President of Vice That's all there is to it! -@node Index, , License, Top +@node Index, , Copying, Top @unnumbered Index @printindex cp -- 2.30.2