* gdb.texinfo (New Features): mention threads.
[deliverable/binutils-gdb.git] / gdb / doc / gdb.texinfo
index b586d23d74f01660e9c89513f24e888476bd3747..7eb6c5bab4fec32a00af4ca6c07ec205c9e1f1a9 100644 (file)
@@ -6,7 +6,7 @@
 @c of @set vars.  However, you can override filename with makeinfo -o.
 @setfilename gdb.info
 @c
-@include gdb-config.texi
+@include gdb-cfg.texi
 @c
 @ifset GENERIC
 @settitle Debugging with @value{GDBN}
 @c readline appendices use @vindex
 @syncodeindex vr cp
 
-@c ===> NOTE! <==
-@c Determine the edition number in *three* places by hand:
-@c      1. First ifinfo section  2. title page  3. top node
-@c To find the locations, search for !!set
+@c !!set GDB manual's edition---not the same as GDB version!
+@set EDITION 4.10
+
+@c !!set GDB manual's revision date
+@set DATE November 1993
 
 @c GDB CHANGELOG CONSULTED BETWEEN:
 @c Fri Oct 11 23:27:06 1991  John Gilmore  (gnu at cygnus.com)
@@ -53,12 +54,12 @@ END-INFO-DIR-ENTRY
 @ifinfo
 This file documents the GNU debugger @value{GDBN}.
 
-@c !!set edition, date, version
-This is Edition 4.09, April 1993
+
+This is Edition @value{EDITION}, @value{DATE}
 of @cite{Debugging with @value{GDBN}: the GNU Source-Level Debugger}
 for GDB Version @value{GDBVN}.
 
-Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993 Free Software Foundation, Inc.
+Copyright (C) 1988, '89, '90, '91, '92, '93 Free Software Foundation, Inc.
 
 Permission is granted to make and distribute verbatim copies of
 this manual provided the copyright notice and this permission notice
@@ -73,16 +74,11 @@ notice identical to this one except for the removal of this paragraph
 @end ignore
 Permission is granted to copy and distribute modified versions of this
 manual under the conditions for verbatim copying, provided also that the
-section entitled ``GNU General Public License'' is included exactly as
-in the original, and provided that the entire resulting derived work is
-distributed under the terms of a permission notice identical to this
-one.
+entire resulting derived work is distributed under the terms of a
+permission notice identical to this one.
 
 Permission is granted to copy and distribute translations of this manual
-into another language, under the above conditions for modified versions,
-except that the section entitled ``GNU General Public License'' may be
-included in a translation approved by the Free Software Foundation
-instead of in the original English.
+into another language, under the above conditions for modified versions.
 @end ifinfo
 
 @titlepage
@@ -92,10 +88,9 @@ instead of in the original English.
 @subtitle (@value{TARGET})
 @end ifclear
 @sp 1
-@c !!set edition, date, version
-@subtitle Edition 4.09, for @value{GDBN} version @value{GDBVN}
-@subtitle April 1993
-@author by Richard M. Stallman and Roland H. Pesch
+@subtitle Edition @value{EDITION}, for @value{GDBN} version @value{GDBVN}
+@subtitle @value{DATE}
+@author Richard M. Stallman and Roland H. Pesch
 @page
 @tex
 {\parskip=0pt
@@ -107,7 +102,14 @@ instead of in the original English.
 @end tex
 
 @vskip 0pt plus 1filll
-Copyright @copyright{} 1988, 1989, 1990, 1991, 1992, 1993 Free Software Foundation, Inc.
+Copyright @copyright{} 1988, '89, '90, '91, '92, '93 Free Software
+Foundation, Inc. 
+@sp 2
+Published by the Free Software Foundation @*
+675 Massachusetts Avenue, @*
+Cambridge, MA 02139 USA @*
+Printed copies are available for $20 each. @*
+ISBN 1-882114-11-6 @*
 
 Permission is granted to make and distribute verbatim copies of
 this manual provided the copyright notice and this permission notice
@@ -115,16 +117,11 @@ are preserved on all copies.
 
 Permission is granted to copy and distribute modified versions of this
 manual under the conditions for verbatim copying, provided also that the
-section entitled ``GNU General Public License'' is included exactly as
-in the original, and provided that the entire resulting derived work is
-distributed under the terms of a permission notice identical to this
-one.
+entire resulting derived work is distributed under the terms of a
+permission notice identical to this one.
 
 Permission is granted to copy and distribute translations of this manual
-into another language, under the above conditions for modified versions,
-except that the section entitled ``GNU General Public License'' may be
-included in a translation approved by the Free Software Foundation
-instead of in the original English.
+into another language, under the above conditions for modified versions.
 @end titlepage
 @page
 
@@ -134,8 +131,7 @@ instead of in the original English.
 
 This file describes @value{GDBN}, the GNU symbolic debugger.
 
-@c !!set edition, date, version
-This is Edition 4.09, April 1993, for GDB Version @value{GDBVN}.
+This is Edition @value{EDITION}, @value{DATE}, for GDB Version @value{GDBVN}.
 
 @menu
 * Summary::                     Summary of @value{GDBN}
@@ -181,9 +177,6 @@ This is Edition 4.09, April 1993, for GDB Version @value{GDBVN}.
 * Formatting Documentation::    How to format and print GDB documentation
 * Installing GDB::              Installing GDB
 @end ifclear
-@ifclear AGGLOMERATION
-* Copying::                     GNU GENERAL PUBLIC LICENSE
-@end ifclear
 
 * Index::                       Index
 @end menu
@@ -215,8 +208,26 @@ effects of one bug and go on to learn about another.
 @end itemize
 
 @ifclear CONLY
-You can use @value{GDBN} to debug programs written in C, C++, and Modula-2.
-Fortran support will be added when a GNU Fortran compiler is ready.
+You can use @value{GDBN} to debug programs written in C or C++.  For
+more information, see @ref{C,,C and C++}.
+
+@ifset MOD2
+@c "MOD2" used as a "miscellaneous languages" flag here.
+@c This is acceptable while there is no real doc for Chill and Pascal.
+Support for Modula-2 and Chill is partial.  For information on Modula-2,
+see @ref{Modula-2,,Modula-2}; there is no further documentation on Chill yet.
+
+Debugging pascal programs which use sets, subranges, file variables, or nested
+functions does not currently work.  @value{GDBN} does not support
+entering expressions, printing values, etc. using Pascal syntax.
+@end ifset
+@ifset FORTRAN
+@cindex Fortran
+@value{GDBN} can be used to debug programs written in Fortran, although
+it does not yet support entering expressions, printing values, etc.
+using Fortran syntax.  It may be necessary to refer to some variables
+with a trailing underscore.
+@end ifset
 @end ifclear
 
 @menu
@@ -239,10 +250,6 @@ Fundamentally, the General Public License is a license which says that
 you have these freedoms and that you cannot take these freedoms away
 from anyone else.
 
-@ifclear AGGLOMERATION
-For full details, @pxref{Copying, ,GNU GENERAL PUBLIC LICENSE}.
-@end ifclear
-
 @node Contributors
 @unnumberedsec Contributors to GDB
 
@@ -263,14 +270,15 @@ omitted from this list, we would like to add your names!
 @end quotation
 
 So that they may not regard their long labor as thankless, we
-particularly thank those who shepherded GDB through major releases: Stu
-Grossman and John Gilmore (releases 4.8, 4.7, 4.6, 4.5, 4.4), John Gilmore
-(releases 4.3, 4.2, 4.1, 4.0, and 3.9); Jim Kingdon (releases 3.5, 3.4,
-3.3); and Randy Smith (releases 3.2, 3.1, 3.0).  As major maintainer of
-GDB for some period, each contributed significantly to the structure,
-stability, and capabilities of the entire debugger.
-
-Richard Stallman, assisted at various times by Pete TerMaat, Chris
+particularly thank those who shepherded GDB through major releases: Fred
+Fish (releases 4.11, 4.10, 4.9), Stu Grossman and John Gilmore (releases
+4.8, 4.7, 4.6, 4.5, 4.4), John Gilmore (releases 4.3, 4.2, 4.1, 4.0, and
+3.9); Jim Kingdon (releases 3.5, 3.4, 3.3); and Randy Smith (releases
+3.2, 3.1, 3.0).  As major maintainer of GDB for some period, each
+contributed significantly to the structure, stability, and capabilities
+of the entire debugger.
+
+Richard Stallman, assisted at various times by Peter TerMaat, Chris
 Hanson, and Richard Mlynarik, handled releases through 2.8.
 
 @ifclear CONLY
@@ -314,9 +322,11 @@ contributed remote debugging modules for their products.
 Brian Fox is the author of the readline libraries providing
 command-line editing and command history.
 
-Andrew Beers of SUNY Buffalo wrote the language-switching code and
-the Modula-2 support, and contributed the Languages chapter of this
-manual.
+Andrew Beers of SUNY Buffalo wrote the language-switching code,
+@ifset MOD2
+the Modula-2 support,
+@end ifset
+and contributed the Languages chapter of this manual.
 
 Fred Fish wrote most of the support for Unix System Vr4.  
 @ifclear CONLY
@@ -354,13 +364,14 @@ Commands that issue wide output now insert newlines at places designed
 to make the output more readable.
 
 @item Object Code Formats
-GDB uses a new library called the Binary File Descriptor (BFD)
-Library to permit it to switch dynamically, without reconfiguration or
+GDB uses a new library called the Binary File Descriptor (BFD) Library
+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 files, 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.
+supported are COFF, ELF, a.out, Intel 960 b.out, MIPS ECOFF, HPPA SOM
+(with stabs debugging), and S-records; files may be read as .o files,
+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 and Ports
 Compile-time configuration (to select a particular architecture and
@@ -383,6 +394,7 @@ handling, with the commands @code{catch} and @code{info catch}: GDB
 can break when an exception is raised, before the stack is peeled back
 to the exception handler's context.
 
+@ifset MOD2
 @item Modula-2
 GDB now has preliminary support for the GNU Modula-2 compiler, currently
 under development at the State University of New York at Buffalo.
@@ -390,6 +402,7 @@ Coordinated development of both GDB and the GNU Modula-2 compiler will
 continue.  Other Modula-2 compilers are currently not supported, and
 attempting to debug programs compiled with them will likely result in an
 error as the symbol table of the executable is read in.
+@end ifset
 
 @item Command Rationalization
 Many GDB commands have been renamed to make them easier to remember
@@ -402,13 +415,12 @@ of your program, and the latter refer to the state of GDB itself.
 GDB 4 can debug programs and core files that use SunOS, SVR4, or IBM RS/6000
 shared libraries.
 
+@item Threads
+On some systems, GDB 4 has facilities to debug multi-thread programs.
+
 @item Reference Card
 GDB 4 has a reference card.  @xref{Formatting Documentation,,Formatting
 the Documentation}, for instructions about how to print it.
-
-@item Work in Progress
-Kernel debugging for BSD and Mach systems; Tahoe and HPPA architecture
-support.
 @end table
 @end ifset
 
@@ -805,7 +817,7 @@ in sequential order.  The order makes a difference when the
 @end menu
 
 @ifclear GENERIC
-@include gdbinv-s.texi
+@include remote.texi
 @end ifclear
 
 @node File Options
@@ -834,11 +846,11 @@ them, so long as enough of the option is present to be unambiguous.
 than @samp{-}, though we illustrate the more usual convention.)
 
 @table @code
-@item -symbols=@var{file}
+@item -symbols @var{file}
 @itemx -s @var{file}
 Read symbol table from file @var{file}.
 
-@item -exec=@var{file}
+@item -exec @var{file}
 @itemx -e @var{file}
 Use file @var{file} as the executable file to execute when
 @ifset BARETARGET
@@ -849,22 +861,27 @@ appropriate, and for examining pure data in conjunction with a core
 dump.
 @end ifclear
 
-@item -se=@var{file}
+@item -se @var{file}
 Read symbol table from file @var{file} and use it as the executable
 file.
 
 @ifclear BARETARGET
-@item -core=@var{file}
+@item -core @var{file}
 @itemx -c @var{file}
 Use file @var{file} as a core dump to examine.
+
+@item -c @var{number}
+Connect to process ID @var{number}, as with the @code{attach} command
+(unless there is a file in core-dump format named @var{number}, in which
+case @samp{-c} specifies that file as a core dump to read).
 @end ifclear
 
-@item -command=@var{file}
+@item -command @var{file}
 @itemx -x @var{file}
 Execute @value{GDBN} commands from file @var{file}.  @xref{Command
 Files,, Command files}.
 
-@item -directory=@var{directory}
+@item -directory @var{directory}
 @itemx -d @var{directory}
 Add @var{directory} to the path to search for source files.
 
@@ -916,10 +933,10 @@ batch mode or quiet mode.
 @table @code
 @item -nx
 @itemx -n
-Do not execute commands from any @file{@value{GDBINIT}} initialization files.
-Normally, the commands in these files are executed after all the
-command options and arguments have been processed.
-@xref{Command Files,,Command files}.
+Do not execute commands from any initialization files (normally called
+@file{@value{GDBINIT}}).  Normally, the commands in these files are
+executed after all the command options and arguments have been
+processed.  @xref{Command Files,,Command files}.
 
 @item -quiet
 @itemx -q
@@ -927,10 +944,11 @@ command options and arguments have been processed.
 messages are also suppressed in batch mode.
 
 @item -batch
-Run in batch mode.  Exit with status @code{0} after processing all the command
-files specified with @samp{-x} (and @file{@value{GDBINIT}}, if not inhibited).
-Exit with nonzero status if an error occurs in executing the @value{GDBN}
-commands in the command files.
+Run in batch mode.  Exit with status @code{0} after processing all the
+command files specified with @samp{-x} (and all commands from
+initialization files, if not inhibited with @samp{-n}).  Exit with
+nonzero status if an error occurs in executing the @value{GDBN} commands
+in the command files.
 
 Batch mode may be useful for running @value{GDBN} as a filter, for example to
 download and run a program on another computer; in order to make this
@@ -944,7 +962,7 @@ Program exited normally.
 (which is ordinarily issued whenever a program running under @value{GDBN} control
 terminates) is not issued when running in batch mode.
 
-@item -cd=@var{directory}
+@item -cd @var{directory}
 Run @value{GDBN} using @var{directory} as its working directory,
 instead of the current directory.
 
@@ -976,7 +994,7 @@ a signal to display the source code for the frame.
 Set the line speed (baud rate or bits per second) of any serial
 interface used by @value{GDBN} for remote debugging.
 
-@item -tty=@var{device}
+@item -tty @var{device}
 Run using @var{device} for your program's standard input and output.
 @c FIXME: kingdon thinks there is more to -tty.  Investigate.
 @end ifset
@@ -1330,7 +1348,7 @@ information in @value{GDBN} bug-reports.  If multiple versions of @value{GDBN} a
 use at your site, you may occasionally want to determine which version
 of @value{GDBN} you are running; as @value{GDBN} evolves, new commands are introduced,
 and old ones may wither away.  The version number is also announced
-when you start @value{GDBN} with no arguments.
+when you start @value{GDBN}.
 
 @kindex show copying
 @item show copying
@@ -1363,6 +1381,7 @@ already running process, or kill a child process.
 * Attach::                      Debugging an already-running process
 * Kill Process::                Killing the child process
 * Process Information::         Additional process information
+* Threads::                    Debugging programs with multiple threads
 @end ifclear
 @end menu
 
@@ -1406,22 +1425,7 @@ Older versions of the GNU C compiler permitted a variant option
 @w{@samp{-gg}} for debugging information.  @value{GDBN} no longer supports this
 format; if your GNU C compiler has this option, do not use it.
 
-@ignore
-@comment As far as I know, there are no cases in which @value{GDBN} will
-@comment produce strange output in this case.  (but no promises).
-If your program includes archives made with the @code{ar} program, and
-if the object files used as input to @code{ar} were compiled without the
-@samp{-g} option and have names longer than 15 characters, @value{GDBN} will get
-confused reading your program's symbol table.  No error message will be
-given, but @value{GDBN} may behave strangely.  The reason for this problem is a
-deficiency in the Unix archive file format, which cannot represent file
-names longer than 15 characters.
-
-To avoid this problem, compile the archive members with the @samp{-g}
-option or use shorter file names.  Alternatively, use a version of GNU
-@code{ar} dated more recently than August 1989.
-@end ignore
-
+@need 2000
 @node Starting
 @section Starting your program
 @cindex starting
@@ -1494,7 +1498,7 @@ wrong program.
 When you issue the @code{run} command, your program begins to execute
 immediately.  @xref{Stopping, ,Stopping and continuing}, for discussion
 of how to arrange for your program to stop.  Once your program has
-stopped, you may calls functions in your program, using the @code{print}
+stopped, you may call functions in your program, using the @code{print}
 or @code{call} commands.  @xref{Data, ,Examining Data}.
 
 If the modification time of your symbol file has changed since the
@@ -1553,10 +1557,11 @@ whitespace.  If @var{directory} is already in the path, it is moved to
 the front, so it will be searched sooner.
 
 You can use the string @samp{$cwd} to refer to whatever is the current
-working directory at the time @value{GDBN} searches the path.  If you use
-@samp{.} instead, it refers to the directory where you executed the
-@code{path} command.  @value{GDBN} fills in the current path where needed in
-the @var{directory} argument, before adding it to the search path.
+working directory at the time @value{GDBN} searches the path.  If you
+use @samp{.} instead, it refers to the directory where you executed the
+@code{path} command.  @value{GDBN} replaces @samp{.} in the
+@var{directory} argument (with the current path) before adding
+@var{directory} to the search path.
 @c 'path' is explicitly nonrepeatable, but RMS points out it is silly to
 @c document that, since repeating it would be a no-op.
 
@@ -1706,10 +1711,10 @@ or with the @samp{jobs -l} shell command.
 executing the command.
 @end table
 
-To use @code{attach}, you must be debugging in an environment which
-supports processes.  You must also have permission to send the process a
-signal, and it must have the same effective user ID as the @value{GDBN}
-process.
+To use @code{attach}, your program must be running in an environment
+which supports processes; for example, @code{attach} does not work for
+programs on bare-board targets that lack an operating system.  You must
+also have permission to send the process a signal.
 
 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.
@@ -1808,6 +1813,157 @@ received.
 @item info proc all
 Show all the above information about the process.
 @end table
+
+@node Threads
+@section Debugging programs with multiple threads
+
+@cindex threads of execution
+@cindex multiple threads
+@cindex switching threads
+In some operating systems, a single program may have more than one
+@dfn{thread} of execution.  The precise semantics of threads differ from
+one operating system to another, but in general the threads of a single
+program are akin to multiple processes---except that they share one
+address space (that is, they can all examine and modify the same
+variables).  On the other hand, each thread has its own registers and
+execution stack, and perhaps private memory.
+
+@value{GDBN} provides these facilities for debugging multi-thread
+programs:
+
+@itemize @bullet
+@item automatic notification of new threads
+@item @samp{thread @var{threadno}}, a command to switch among threads
+@item @samp{info threads}, a command to inquire about existing threads
+@item thread-specific breakpoints
+@end itemize
+
+@quotation
+@emph{Warning:} These facilities are not yet available on every
+@value{GDBN} configuration where the operating system supports threads.
+If your @value{GDBN} does not support threads, these commands have no
+effect.  For example, a system without thread support shows no output
+from @samp{info threads}, and always rejects the @code{thread} command,
+like this:
+
+@smallexample
+(@value{GDBP}) info threads
+(@value{GDBP}) thread 1
+Thread ID 1 not known.  Use the "info threads" command to
+see the IDs of currently known threads.
+@end smallexample
+@c FIXME to implementors: how hard would it be to say "sorry, this GDB
+@c                        doesn't support threads"?
+@end quotation
+
+@cindex focus of debugging
+@cindex current thread
+The @value{GDBN} thread debugging facility allows you to observe all
+threads while your program runs---but whenever @value{GDBN} takes
+control, one thread in particular is always the focus of debugging.
+This thread is called the @dfn{current thread}.  Debugging commands show
+program information from the perspective of the current thread.
+
+@kindex New @var{systag}
+@cindex thread identifier (system)
+@c FIXME-implementors!! It would be more helpful if the [New...] message
+@c included GDB's numeric thread handle, so you could just go to that
+@c thread without first checking `info threads'.
+Whenever @value{GDBN} detects a new thread in your program, it displays
+the target system's identification for the thread with a message in the
+form @samp{[New @var{systag}]}.  @var{systag} is a thread identifier
+whose form varies depending on the particular system.  For example, on
+LynxOS, you might see
+
+@example
+[New process 35 thread 27]
+@end example
+
+@noindent
+when @value{GDBN} notices a new thread.  In contrast, on an SGI system,
+the @var{systag} is simply something like @samp{process 368}, with no
+further qualifier.
+
+@c FIXME!! (1) Does the [New...] message appear even for the very first
+@c         thread of a program, or does it only appear for the
+@c         second---i.e., when it becomes obvious we have a multithread
+@c         program?
+@c         (2) *Is* there necessarily a first thread always?  Or do some
+@c         multithread systems permit starting a program with multiple
+@c         threads ab initio?      
+
+@cindex thread number
+@cindex thread identifier (GDB)
+For debugging purposes, @value{GDBN} associates its own thread
+number---always a single integer---with each thread in your program.
+
+@table @code
+@item info threads
+@kindex info threads
+Display a summary of all threads currently in your
+program.  @value{GDBN} displays for each thread (in this order):
+
+@enumerate
+@item the thread number assigned by @value{GDBN}
+
+@item the target system's thread identifier (@var{systag})
+
+@item the current stack frame summary for that thread
+@end enumerate
+
+@noindent
+An asterisk @samp{*} to the left of the @value{GDBN} thread number
+indicates the current thread.
+
+For example, 
+@end table
+@c end table here to get a little more width for example
+
+@smallexample
+(@value{GDBP}) info threads
+  3 process 35 thread 27  0x34e5 in sigpause ()
+  2 process 35 thread 23  0x34e5 in sigpause ()
+* 1 process 35 thread 13  main (argc=1, argv=0x7ffffff8)
+    at threadtest.c:68
+@end smallexample
+
+@table @code
+@item thread @var{threadno}
+@kindex thread @var{threadno}
+Make thread number @var{threadno} the current thread.  The command
+argument @var{threadno} is the internal @value{GDBN} thread number, as
+shown in the first field of the @samp{info threads} display.
+@value{GDBN} responds by displaying the system identifier of the thread
+you selected, and its current stack frame summary:
+
+@smallexample
+@c FIXME!! This example made up; find a GDB w/threads and get real one
+(@value{GDBP}) thread 2
+[Switching to process 35 thread 23]
+0x34e5 in sigpause ()
+@end smallexample
+
+@noindent
+As with the @samp{[New @dots{}]} message, the form of the text after
+@samp{Switching to} depends on your system's conventions for identifying
+threads.  
+@end table
+
+@cindex automatic thread selection
+@cindex switching threads automatically
+@cindex threads, automatic switching
+Whenever @value{GDBN} stops your program, due to a breakpoint or a
+signal, it automatically selects the thread where that breakpoint or
+signal happened.  @value{GDBN} alerts you to the context switch with a
+message of the form @samp{[Switching to @var{systag}]} to identify the
+thread.
+
+@xref{Thread Stops,,Stopping and starting multi-thread programs}, for
+more information about how @value{GDBN} behaves when you stop and start
+programs with multiple threads.
+
+@xref{Set Watchpoints,,Setting watchpoints}, for information about
+watchpoints in programs with multiple threads.
 @end ifclear
 
 @node Stopping
@@ -1853,6 +2009,9 @@ and why it stopped.
 @ifset POSIX
 * Signals::                     Signals
 @end ifset
+@ifclear BARETARGET
+* Thread Stops::               Stopping and starting multi-thread programs
+@end ifclear
 @end menu
 
 @c makeinfo node-defaulting requires adjacency of @node and sectioning cmds
@@ -1877,8 +2036,8 @@ your program should stop by line number, function name or exact address
 in the program.  
 @ifclear CONLY
 In languages with exception handling (such as GNU C++), you can also set
-breakpoints where an exception is raised (@pxref{Exception Handling,
-,Breakpoints and exceptions}).
+breakpoints where an exception is raised (@pxref{Exception Handling,,
+Breakpoints and exceptions}).
 @end ifclear
 
 @cindex watchpoints
@@ -1893,8 +2052,8 @@ any other breakpoint: you enable, disable, and delete both breakpoints
 and watchpoints using the same commands.
 
 You can arrange to have values from your program displayed automatically
-whenever @value{GDBN} stops at a breakpoint.  @xref{Auto Display,
-,Automatic display}.
+whenever @value{GDBN} stops at a breakpoint.  @xref{Auto Display,,
+Automatic display}.
 
 @cindex breakpoint numbers
 @cindex numbers for breakpoints
@@ -2053,8 +2212,9 @@ line number.
 @end table
 
 @noindent
-Breakpoint commands, if any, are listed after the line for the
-corresponding breakpoint.
+If a breakpoint is conditional, @code{info break} shows the condition on
+the line following the affected breakpoint; breakpoint commands, if any,
+are listed after that.
 
 @noindent
 @code{info break} with a breakpoint
@@ -2121,7 +2281,7 @@ expression changes, without having to predict a particular place
 where this may happen.
 
 Watchpoints currently execute two orders of magnitude more slowly than
-other breakpoints, but this can well be worth it to catch errors where
+other breakpoints, but this can be well worth it to catch errors where
 you have no clue what part of your program is the culprit.  Some
 processors provide special hardware to support watchpoint evaluation; future
 releases of @value{GDBN} will use such hardware if it is available.
@@ -2137,6 +2297,21 @@ This command prints a list of watchpoints and breakpoints; it is the
 same as @code{info break}.
 @end table
 
+@ifclear BARETARGET
+@quotation
+@cindex watchpoints and threads
+@cindex threads and watchpoints
+@emph{Warning:} in multi-thread programs, watchpoints have only limited
+usefulness.  With the current watchpoint implementation, @value{GDBN}
+can only watch the value of an expression @emph{in a single thread}.  If
+you are confident that the expression can only change due to the current
+thread's activity (and if you are also confident that the same thread
+will remain current), then you can use watchpoints as usual.  However,
+@value{GDBN} may not notice when a non-current thread's activity changes
+the expression.
+@end quotation
+@end ifclear
+
 @ifclear CONLY
 @node Exception Handling
 @subsection Breakpoints and exceptions
@@ -2409,22 +2584,10 @@ takes no action.
 To make the breakpoint stop the next time it is reached, specify
 a count of zero.
 
-@item continue @var{count}
-@itemx c @var{count}
-@itemx fg @var{count}
-@kindex continue @var{count}
-Continue execution of your program, setting the ignore count of the
-breakpoint where your program stopped to @var{count} minus one.
-Thus, your 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 your program stopped
-due to a breakpoint.  At other times, the argument to @code{continue} is
-ignored.
-
-The synonym @code{fg} is provided purely for convenience, and has
-exactly the same behavior as other forms of the command.
-@end table
+When you use @code{continue} to resume execution of your program from a
+breakpoint, you can specify an ignore count directly as an argument to
+@code{continue}, rather than using @code{ignore}.  @xref{Continuing and
+Stepping,,Continuing and stepping}.
 
 If a breakpoint has a positive ignore count and a condition, the condition
 is not checked.  Once the ignore count reaches zero, the condition will
@@ -2434,6 +2597,7 @@ You could achieve the effect of the ignore count with a condition such
 as @w{@samp{$foo-- <= 0}} using a debugger convenience variable that
 is decremented each time.  @xref{Convenience Vars, ,Convenience
 variables}.
+@end table
 
 @node Break Commands
 @subsection Breakpoint command lists
@@ -2483,9 +2647,9 @@ then continue.  If none of the remaining commands print anything, you
 will see no sign that the breakpoint was reached.  @code{silent} is
 meaningful only at the beginning of a breakpoint command list.
 
-The commands @code{echo} and @code{output} that allow you to print
-precisely controlled output are often useful in silent breakpoints.
-@xref{Output, ,Commands for controlled output}.
+The commands @code{echo}, @code{output}, and @code{printf} allow you to
+print precisely controlled output, and are often useful in silent
+breakpoints.  @xref{Output, ,Commands for controlled output}.
 
 For example, here is how you could use breakpoint commands to print the
 value of @code{x} at entry to @code{foo} whenever @code{x} is positive.
@@ -2494,9 +2658,7 @@ value of @code{x} at entry to @code{foo} whenever @code{x} is positive.
 break foo if x>0
 commands
 silent
-echo x is\040
-output x
-echo \n
+printf "x is %d\n",x
 cont
 end
 @end example
@@ -2518,31 +2680,6 @@ cont
 end
 @end example
 
-@cindex lost output
-One deficiency in the operation of automatically continuing breakpoints
-under Unix appears when your program uses raw mode for the terminal.
-@value{GDBN} switches back to its own terminal modes (not raw) before executing
-commands, and then must switch back to raw mode when your program is
-continued.  This causes any pending terminal input to be lost.
-@c FIXME: revisit below when GNU sys avail.
-@c In the GNU system, this will be fixed by changing the behavior of
-@c terminal modes.
-
-Under Unix, you can get around this problem by writing actions into
-the breakpoint condition rather than in commands.  For example,
-
-@example
-condition 5  (x = y + 4), 0
-@end example
-
-@noindent
-specifies a condition expression (@pxref{Expressions, ,Expressions}) that will
-change @code{x} as needed, then always have the value zero so your
-program will not stop.  No input is lost here, because @value{GDBN} evaluates
-break conditions without changing the terminal modes.  When you want
-to have nontrivial conditions for performing the side effects, the
-operators @samp{&&}, @samp{||} and @samp{?@dots{}:} may be useful.
-
 @ifclear CONLY
 @node Breakpoint Menus
 @subsection Breakpoint menus
@@ -2568,7 +2705,7 @@ breakpoint at the overloaded symbol @code{String::after}.
 We choose three particular definitions of that function name:
 
 @c FIXME! This is likely to change to show arg type lists, at least
-@example
+@smallexample
 (@value{GDBP}) b String::after
 [0] cancel
 [1] all
@@ -2583,9 +2720,10 @@ Breakpoint 1 at 0xb26c: file String.cc, line 867.
 Breakpoint 2 at 0xb344: file String.cc, line 875.
 Breakpoint 3 at 0xafcc: file String.cc, line 846.
 Multiple breakpoints were set.
-Use the "delete" command to delete unwanted breakpoints.
+Use the "delete" command to delete unwanted
+ breakpoints.
 (@value{GDBP})
-@end example
+@end smallexample
 @end ifclear
 
 @ifclear BARETARGET
@@ -2639,25 +2777,36 @@ or when stepping, your program may stop even sooner, due to
 a breakpoint.
 @end ifset
 @ifclear BARETARGET
-a breakpoint or to a signal.  (If due to a signal, you may want to use
+a breakpoint or a signal.  (If due to a signal, you may want to use
 @code{handle}, or use @samp{signal 0} to resume execution.
 @xref{Signals, ,Signals}.)
 @end ifclear
 
 @table @code
 @item continue @r{[}@var{ignore-count}@r{]}
+@itemx c @r{[}@var{ignore-count}@r{]}
+@itemx fg @r{[}@var{ignore-count}@r{]}
 @kindex continue
+@kindex c
+@kindex fg
 Resume program execution, at the address where your program last stopped;
 any breakpoints set at that address are bypassed.  The optional argument
 @var{ignore-count} allows you to specify a further number of times to
 ignore a breakpoint at this location; its effect is like that of
 @code{ignore} (@pxref{Conditions, ,Break conditions}).
 
+The argument @var{ignore-count} is meaningful only when your program
+stopped due to a breakpoint.  At other times, the argument to
+@code{continue} is ignored.
+
+The synonyms @code{c} and @code{fg} are provided purely for convenience,
+and have exactly the same behavior as @code{continue}.
+@end table
+
 To resume execution at a different place, you can use @code{return}
 (@pxref{Returning, ,Returning from a function}) to go back to the
 calling function; or @code{jump} (@pxref{Jumping, ,Continuing at a
 different address}) to go to an arbitrary location in your program.
-@end table
 
 A typical technique for using stepping is to set a breakpoint
 @ifclear CONLY
@@ -2683,7 +2832,8 @@ abbreviated @code{s}.
 @quotation
 @emph{Warning:} If you use the @code{step} command while control is
 within a function that was compiled without debugging information,
-execution will proceed until control reaches another function.
+execution proceeds until control reaches a function that does have
+debugging information.
 @end quotation
 
 @item step @var{count}
@@ -2720,7 +2870,7 @@ Contrast this with the @code{return} command (@pxref{Returning,
 
 @item until
 @kindex until
-@item u
+@itemx u
 @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
@@ -2765,7 +2915,7 @@ instruction stepping, and hence is slower than @code{until} with an
 argument.
 
 @item until @var{location}
-@item u @var{location}
+@itemx u @var{location}
 Continue running your program until either the specified location is
 reached, or the current stack frame returns.  @var{location} is any of
 the forms of argument acceptable to @code{break} (@pxref{Set Breaks,
@@ -2890,6 +3040,67 @@ you can continue with @samp{signal 0}.  @xref{Signaling, ,Giving your
 program a signal}. 
 @end ifset
 
+@ifclear BARETARGET
+@node Thread Stops
+@section Stopping and starting multi-thread programs
+
+When your program has multiple threads (@pxref{Threads,, Debugging
+programs with multiple threads}), you can choose whether to set
+breakpoints on all threads, or on a particular thread.
+
+@table @code
+@cindex breakpoints and threads
+@cindex thread breakpoints
+@kindex break @dots{} thread @var{threadno}
+@item break @var{linespec} thread @var{threadno}
+@itemx break @var{linespec} thread @var{threadno} if @dots{}
+Use the qualifier @samp{thread @var{threadno}} with a breakpoint command
+to specify that you only want @value{GDBN} to stop the program when a
+particular thread reaches this breakpoint.  @var{threadno} is one of the
+numeric thread identifiers assigned by @value{GDBN}, shown in the first
+column of the @samp{info threads} display.
+
+If you do not specify @samp{thread @var{threadno}} when you set a
+breakpoint, the breakpoint applies to @emph{all} threads of your
+program.
+
+You can use the @code{thread} qualifier on conditional breakpoints as
+well; in this case, place @samp{thread @var{threadno}} before the
+breakpoint condition, like this:
+
+@smallexample
+(gdb) break frik.c:13 thread 28 if bartab > lim
+@end smallexample
+@end table
+
+@cindex stopped threads
+@cindex threads, stopped
+Whenever your program stops under @value{GDBN} for any reason,
+@emph{all} threads of execution stop, not just the current thread.  This
+allows you to examine the overall state of the program, including
+switching between threads, without worrying that things may change
+underfoot.
+
+@cindex continuing threads
+@cindex threads, continuing
+Conversely, whenever you restart the program, @emph{all} threads start
+executing.  @emph{This is true even when single-stepping} with commands
+like @code{step} or @code{next}.  
+
+In particular, @value{GDBN} cannot single-step all threads in lockstep.
+Since thread scheduling is up to your debugging target's operating
+system (not controlled by @value{GDBN}), other threads may
+execute more than one statement while the current thread completes a
+single step.  Moreover, in general other threads stop in the middle of a
+statement, rather than at a clean statement boundary, when the program
+stops.
+
+You might even find your program stopped in another thread after
+continuing or even single-stepping.  This happens whenever some other
+thread runs into a breakpoint, a signal, or an exception before the
+first thread completes whatever you requested.
+@end ifclear
+
 @node Stack
 @chapter Examining the Stack
 
@@ -2967,6 +3178,7 @@ and so on upward.  These numbers do not really exist in your program;
 they are assigned by @value{GDBN} to give you a way of designating stack
 frames in @value{GDBN} commands.
 
+@c below produces an acceptable overful hbox. --mew 13aug1993
 @cindex frameless execution
 Some compilers provide a way to compile functions so that they operate
 without stack frames.  (For example, the @code{@value{GCC}} option
@@ -3199,7 +3411,7 @@ commands:
 @cindex @code{heuristic-fence-post} (MIPS)
 @table @code
 @item set heuristic-fence-post @var{limit}
-Restrict @var{GDBN} to examining at most @var{limit} bytes in its search
+Restrict @value{GDBN} to examining at most @var{limit} bytes in its search
 for the beginning of a function.  A value of @code{0} (the default)
 means there is no limit.
 
@@ -3423,6 +3635,15 @@ directory names may be given to this command, separated by @samp{:} or
 whitespace.  You may specify a directory that is already in the source
 path; this moves it forward, so it will be searched sooner.
 
+@kindex cdir
+@kindex cwd
+@kindex $cdir
+@kindex $cwd
+@cindex compilation directory
+@cindex current directory
+@cindex working directory
+@cindex directory, current
+@cindex directory, compilation
 You can use the string @samp{$cdir} to refer to the compilation
 directory (if one is recorded), and @samp{$cwd} to refer to the current
 working directory.  @samp{$cwd} is not the same as @samp{.}---the former
@@ -3784,7 +4005,7 @@ The left operand of @samp{@@} must reside in memory.  Array values made
 with @samp{@@} in this way behave just like other arrays in terms of
 subscripting, and are coerced to pointers when used in expressions.
 Artificial arrays most often appear in expressions via the value history
-(@pxref{Value History, ,Value history}), after printing one out.)
+(@pxref{Value History, ,Value history}), after printing one out.
 
 Sometimes the artificial array mechanism is not quite enough; in
 moderately complex data structures, the elements of interest may not
@@ -4015,7 +4236,7 @@ each time your program stops.  @xref{Expressions, ,Expressions}.
 @item display/@var{fmt} @var{exp}
 For @var{fmt} specifying only a display format and not a size or
 count, add the expression @var{exp} to the auto-display list but
-arranges to display it each time in the specified format @var{fmt}.
+arrange to display it each time in the specified format @var{fmt}.
 @xref{Output Formats,,Output formats}.
 
 @item display/@var{fmt} @var{addr}
@@ -4087,7 +4308,7 @@ These settings are useful for debugging programs in any language:
 
 @table @code
 @item set print address
-@item set print address on
+@itemx set print address on
 @kindex set print address
 @value{GDBN} will print memory addresses showing the location of stack
 traces, structure values, pointer values, breakpoints, and so forth,
@@ -4108,14 +4329,14 @@ is on.  For example, this is what a stack frame display looks like, with
 Do not print addresses when displaying their contents.  For example,
 this is the same stack frame displayed with @code{set print address off}:
 
-@example
+@smallexample
 @group
 (@value{GDBP}) set print addr off
 (@value{GDBP}) f
 #0  set_quotes (lq="<<", rq=">>") at input.c:530
 530         if (lquote != def_lquote)
 @end group
-@end example
+@end smallexample
 
 You can use @samp{set print address off} to eliminate all machine
 dependent displays from the @value{GDBN} interface.  For example, with
@@ -4125,7 +4346,50 @@ all machines---whether or not they involve pointer arguments.
 @item show print address
 @kindex show print address
 Show whether or not addresses are to be printed.
+@end table
+
+When @value{GDBN} prints a symbolic address, it normally prints the
+closest earlier symbol plus an offset.  If that symbol does not uniquely
+identify the address (for example, it is a name whose scope is a single
+source file), you may need to disambiguate.  One way to do this is with
+@code{info line}, for example @code{info line *0x4537}.  Alternately,
+you can set @value{GDBN} to print the source file and line number when
+it prints a symbolic address:
+
+@table @code
+@item set print symbol-filename on
+@kindex set print symbol-filename
+Tell @value{GDBN} to print the source file name and line number of a
+symbol in the symbolic form of an address.
+
+@item set print symbol-filename off
+Do not print source file name and line number of a symbol.  This is the
+default.
+
+@item show print symbol-filename
+@kindex show print symbol-filename
+Show whether or not @value{GDBN} will print the source file name and
+line number of a symbol in the symbolic form of an address.
+@end table
+
+Also, you may wish to see the symbolic form only if the address being
+printed is reasonably close to the closest earlier symbol:
+
+@table @code
+@item set print max-symbolic-offset @var{max-offset}
+@kindex set print max-symbolic-offset
+Tell @value{GDBN} to only display the symbolic form of an address if the
+offset between the closest earlier symbol and the address is less than
+@var{max-offset}.  The default is 0, which means to always print the
+symbolic form of an address, if any symbol precedes it.
+
+@item show print max-symbolic-offset
+@kindex show print max-symbolic-offset
+Ask how large the maximum offset is that @value{GDBN} will print in a
+symbolic address.
+@end table
 
+@table @code
 @item set print array
 @itemx set print array on
 @kindex set print array
@@ -4145,6 +4409,7 @@ arrays.
 If @value{GDBN} is printing a large array, it will stop printing after it has
 printed the number of elements set by the @code{set print elements} command.
 This limit also applies to the display of strings.
+Setting the number of elements to zero means that the printing is unlimited.
 
 @item show print elements
 @kindex show print elements
@@ -4156,7 +4421,7 @@ before losing patience.
 Cause @value{GDBN} to print structures in an indented format with one member per
 line, like this:
 
-@example
+@smallexample
 @group
 $1 = @{
   next = 0x0,
@@ -4167,7 +4432,7 @@ $1 = @{
   meat = 0x54 "Pork"
 @}
 @end group
-@end example
+@end smallexample
 
 @item set print pretty off
 Cause @value{GDBN} to print structures in a compact format, like this:
@@ -4246,35 +4511,10 @@ and with @code{set print union off} in effect it would print
 @smallexample
 $1 = @{it = Tree, form = @{...@}@}
 @end smallexample
-
-@item set print max-symbolic-offset @var{maxoff}
-@kindex set print max-symbolic-offset
-Tell @value{GDBN} to only display the symbolic form of an address if the
-offset between the closest earlier symbol and the address is less than
-@var{maxoff}.  The default is 0, which means to always print the
-symbolic form of an address, if any symbol precedes it.
-
-@item show print max-symbolic-offset
-@kindex show print max-symbolic-offset
-Ask how large the maximum offset is that @value{GDBN} will print in a
-symbolic address.
-
-@item set print symbol-filename on
-@kindex set print symbol-filename
-Tell @value{GDBN} to print the source filename and linenumber of a symbol
-in the symbolic form of an address.
-
-@item set print symbol-filename off
-Do not print source filename and linenumber of a symbol.  This is the default.
-
-@item show print symbol-filename
-@kindex show print symbol-filename
-Show whether or not @value{GDBN} will print the source filename and linenumber
-of a symbol in the symbolic form of an address.
-
 @end table
 
 @ifclear CONLY
+@need 1000
 @noindent
 These settings are of interest when debugging C++ programs:
 
@@ -4373,10 +4613,11 @@ pointers back to the types defined in the symbol table.
 @cindex @code{$}
 @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 one.  @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.
+The values printed are given @dfn{history numbers} by which you can
+refer to them.  These are successive integers starting with one.
+@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 @code{print} labels its output is designed to
@@ -4462,9 +4703,9 @@ set $foo = *object_ptr
 would save in @code{$foo} the value contained in the object pointed to by
 @code{object_ptr}.
 
-Using a convenience variable for the first time creates it; but its value
-is @code{void} until you assign a new value.  You can alter the value with
-another assignment at any time.
+Using a convenience variable for the first time creates it, but its
+value is @code{void} until you assign a new value.  You can alter the
+value with another assignment at any time.
 
 Convenience variables have no fixed types.  You can assign a convenience
 variable any type of value, including structures and arrays, even if
@@ -4657,12 +4898,14 @@ available at all.
 @chapter Using @value{GDBN} with Different Languages
 @cindex languages
 
+@ifset MOD2
 Although programming languages generally have common aspects, they are
 rarely expressed in the same manner.  For instance, in ANSI C,
 dereferencing a pointer @code{p} is accomplished by @code{*p}, but in
 Modula-2, it is accomplished by @code{p^}.  Values can also be
 represented (and displayed) differently.  Hex numbers in C are written
 like @samp{0x1ae}, while in Modula-2 they appear as @samp{1AEH}.
+@end ifset
 
 @cindex working language
 Language-specific information is built into @value{GDBN} for some languages,
@@ -4676,7 +4919,10 @@ automatically.
 @menu
 * Setting::                     Switching between source languages
 * Show::                        Displaying the language
+@ifset MOD2
 * Checks::                      Type and range checks
+@end ifset
+
 * Support::                     Supported languages
 @end menu
 
@@ -4703,10 +4949,17 @@ your program.
 @kindex set language
 If you wish, you may set the language manually.  To do this, issue the
 command @samp{set language @var{lang}}, where @var{lang} is the name of
-a language, such as @code{c} or @code{modula-2}.  For a list of the supported
-languages, type @samp{set language}.
+a language, such as 
+@ifclear MOD2
+@code{c}.
+@end ifclear
+@ifset MOD2
+@code{c} or @code{modula-2}.
+@end ifset
+For a list of the supported languages, type @samp{set language}.
 @c FIXME: rms: eventually this command should be "help set language".
 
+@ifset MOD2
 Setting the language manually prevents @value{GDBN} from updating the working
 language automatically.  This can lead to confusion if you try
 to debug a program when the working language is not the same as the
@@ -4724,6 +4977,7 @@ might not have the effect you intended.  In C, this means to add
 @code{b} and @code{c} and place the result in @code{a}.  The result
 printed would be the value of @code{a}.  In Modula-2, this means to compare
 @code{a} to the result of @code{b+c}, yielding a @code{BOOLEAN} value.
+@end ifset
 
 @node Automatically
 @subsection Having @value{GDBN} infer the source language
@@ -4734,8 +4988,10 @@ language that a program was written in by looking at the name of its
 source files, and examining their extensions:
 
 @table @file
+@ifset MOD2
 @item *.mod
 Modula-2 source file
+@end ifset
 
 @item *.c
 C source file
@@ -4785,6 +5041,7 @@ Among the other information listed here (@pxref{Symbols, ,Examining the
 Symbol Table}) is the source language of this source file.
 @end table
 
+@ifset MOD2
 @node Checks
 @section Type and range checking
 
@@ -4939,31 +5196,39 @@ is printed and evaluation of the expression is aborted.
 Output messages when the @value{GDBN} range checker detects a range error,
 but attempt to evaluate the expression anyway.  Evaluating the
 expression may still be impossible for other reasons, such as accessing
-memory that the process does not own (a typical example from many UNIX
+memory that the process does not own (a typical example from many Unix
 systems).
 
 @item show range
 Show the current setting of the range checker, and whether or not it is
 being set automatically by @value{GDBN}.
 @end table
+@end ifset
 
 @node Support
 @section Supported languages
 
-@value{GDBN} 4 supports C, C++, and Modula-2.  Some @value{GDBN}
-features may be used in expressions regardless of the language you
-use: the @value{GDBN} @code{@@} and @code{::} operators, and the
-@samp{@{type@}addr} construct (@pxref{Expressions, ,Expressions}) can be
-used with the constructs of any of the supported languages.
-
-The following sections detail to what degree each of these
-source languages is supported by @value{GDBN}.  These sections are
-not meant to be language tutorials or references, but serve only as a
-reference guide to what the @value{GDBN} expression parser will accept, and
-what input and output formats should look like for different languages.
-There are many good books written on each of these languages; please
-look to these for a language reference or tutorial.
-
+@ifset MOD2
+@value{GDBN} 4 supports C, C++, and Modula-2.
+@end ifset
+@ifclear MOD2
+@value{GDBN} 4 supports C, and C++.
+@end ifclear
+Some @value{GDBN} features may be used in expressions regardless of the
+language you use: the @value{GDBN} @code{@@} and @code{::} operators,
+and the @samp{@{type@}addr} construct (@pxref{Expressions,
+,Expressions}) can be used with the constructs of any supported
+language.
+
+The following sections detail to what degree each source language is
+supported by @value{GDBN}.  These sections are not meant to be language
+tutorials or references, but serve only as a reference guide to what the
+@value{GDBN} expression parser will accept, and what input and output
+formats should look like for different languages.  There are many good
+books written on each of these languages; please look to these for a
+language reference or tutorial.
+
+@ifset MOD2
 @menu
 * C::                           C and C++
 * Modula-2::                    Modula-2
@@ -4977,14 +5242,25 @@ look to these for a language reference or tutorial.
 Since C and C++ are so closely related, many features of @value{GDBN} apply
 to both languages.  Whenever this is the case, we discuss both languages
 together.
+@end ifset
+@ifclear MOD2
+@c Cancel this below, under same condition, at end of this chapter!
+@raisesections
+@end ifclear
 
 @cindex C++
 @kindex g++
 @cindex GNU C++
 The C++ debugging facilities are jointly implemented by the GNU C++
-compiler and @value{GDBN}.  Therefore, to debug your C++ code effectively,
-you must compile your C++ programs with the GNU C++ compiler,
-@code{g++}.
+compiler and @value{GDBN}.  Therefore, to debug your C++ code
+effectively, you must compile your C++ programs with the GNU C++
+compiler, @code{g++}.
+
+For best results when debugging C++ programs, use the stabs debugging
+format.  You can select that format explicitly with the @code{g++}
+command-line options @samp{-gstabs} or @samp{-gstabs+}.  See
+@ref{Debugging Options,,Options for Debugging Your Program or GNU CC,
+gcc.info, Using GNU CC}, for more information.
 @end ifclear
 @ifset CONLY
 @node C
@@ -5008,7 +5284,10 @@ output values in a manner consistent with C conventions.
 * C Constants::                 C and C++ constants
 * Cplus expressions::           C++ expressions
 * C Defaults::                  Default settings for C and C++
+@ifset MOD2
 * C Checks::                    C and C++ type and range checks
+@end ifset
+
 * Debugging C::                 @value{GDBN} and C
 * Debugging C plus plus::       Special features for C++
 @end menu
@@ -5130,7 +5409,7 @@ Address operator.  Defined on variables.  Same precedence as @code{++}.
 @ifclear CONLY
 For debugging C++, @value{GDBN} implements a use of @samp{&} beyond what is
 allowed in the C++ language itself: you can use @samp{&(&@var{ref})}
-(or, if you prefer, simply @samp{&&@var{ref}} to examine the address
+(or, if you prefer, simply @samp{&&@var{ref}}) to examine the address
 where a C++ reference variable (declared with @samp{&@var{ref}}) is
 stored.
 @end ifclear
@@ -5335,6 +5614,10 @@ whose name ends with @file{.c}, @file{.C}, or @file{.cc}.
 @xref{Automatically, ,Having @value{GDBN} infer the source language}, for
 further details.
 
+@ifset MOD2
+@c Type checking is (a) primarily motivated by Modula-2, and (b)
+@c unimplemented.  If (b) changes, it might make sense to let this node
+@c appear even if Mod-2 does not, but meanwhile ignore it.  pesch 16jul93.
 @node C Checks
 @subsubsection C and C++ type and range checks
 @cindex C and C++ checks
@@ -5365,6 +5648,7 @@ compilers.)
 Range checking, if turned on, is done on mathematical operations.  Array
 indices are not checked, since they are often used to index a pointer
 that is not itself an array.
+@end ifset
 @end ifclear
 
 @ifclear CONLY
@@ -5450,7 +5734,12 @@ also use the @value{GDBN} command-line word completion facilities to list the
 available choices, or to finish the type list for you.
 @xref{Completion,, Command completion}, for details on how to do this.
 @end table
+@ifclear MOD2
+@c cancels "raisesections" under same conditions near bgn of chapter
+@lowersections
+@end ifclear
 
+@ifset MOD2
 @node Modula-2
 @subsection Modula-2
 @cindex Modula-2
@@ -5618,7 +5907,7 @@ represents a variable or constant of integral type.
 @item m
 represents an identifier that belongs to a set.  Generally used in the
 same function with the metavariable @var{s}.  The type of @var{s} should
-be @code{SET OF @var{mtype}} (where @var{mtype} is the type of @var{m}.
+be @code{SET OF @var{mtype}} (where @var{mtype} is the type of @var{m}).
 
 @item n
 represents a variable or constant of integral or floating-point type.
@@ -5892,6 +6181,7 @@ address can be specified by an integral constant, the construct
 In @value{GDBN} scripts, the Modula-2 inequality operator @code{#} is
 interpreted as the beginning of a comment.  Use @code{<>} instead.
 
+@end ifset
 @end ifclear
 
 @node Symbols
@@ -5935,7 +6225,7 @@ local variable, this prints the stack-frame offset at which the variable
 is always stored.
 
 Note the contrast with @samp{print &@var{symbol}}, which does not work
-at all for a register variables, and for a stack local variable prints
+at all for a register variable, and for a stack local variable prints
 the exact address of the current instantiation of the variable.
 
 @item whatis @var{exp}
@@ -5952,6 +6242,9 @@ Print the data type of @code{$}, the last value in the value history.
 @kindex ptype
 Print a description of data type @var{typename}.  @var{typename} may be
 the name of a type, or for C code it may have the form
+@ifclear CONLY
+@samp{class @var{class-name}},
+@end ifclear
 @samp{struct @var{struct-tag}}, @samp{union @var{union-tag}} or
 @samp{enum @var{enum-tag}}.
 
@@ -6066,9 +6359,8 @@ symbols that @value{GDBN} only knows partially---that is, symbols defined in
 files that @value{GDBN} has skimmed, but not yet read completely.  Finally,
 @samp{maint print msymbols} dumps just the minimal symbol information
 required for each object file from which @value{GDBN} has read some symbols.
-The description of @code{symbol-file} explains how @value{GDBN} reads
-symbols; both @code{info source} and @code{symbol-file} are described in
-@ref{Files, ,Commands to specify files}.
+@xref{Files, ,Commands to specify files}, for a discussion of how
+@value{GDBN} reads symbols (in the description of @code{symbol-file}).
 @end table
 
 @node Altering
@@ -6229,12 +6521,14 @@ already executed, in order to examine its execution in more detail.
 @section Giving your program a signal
 
 @table @code
-@item signal @var{signalnum}
+@item signal @var{signal}
 @kindex signal
-Resume execution where your program stopped, but give it immediately the
-signal number @var{signalnum}.
+Resume execution where your program stopped, but immediately give it the
+signal @var{signal}.  @var{signal} can be the name or the number of a
+signal.  For example, on many systems @code{signal 2} and @code{signal
+SIGINT} are both ways of sending an interrupt signal.
 
-Alternatively, if @var{signalnum} is zero, continue execution without
+Alternatively, if @var{signal} is zero, continue execution without
 giving a signal.  This is useful when your program stopped on account of
 a signal and would ordinary see the signal when resumed with the
 @code{continue} command; @samp{signal 0} causes it to resume without a
@@ -6244,6 +6538,13 @@ signal.
 after executing the command.
 @end table
 @c @end group
+
+Invoking the @code{signal} command is not the same as invoking the
+@code{kill} utility from the shell.  Sending a signal with @code{kill}
+causes @value{GDBN} to decide what to do with the signal depending on
+the signal handling tables (@pxref{Signals}).  The @code{signal} command
+passes the signal directly to your program.
+
 @end ifclear
 
 @node Returning
@@ -6530,6 +6831,12 @@ execute it gets the error message ``@code{You can't do that when your
 target is @dots{}}''
 @end ifset
 
+The file is loaded at whatever address is specified in the executable.
+For some object file formats, you can specify the load address when you
+link the program; for other formats, like a.out, the object file format
+specifies a fixed address.
+@c FIXME! This would be a good place for an xref to the GNU linker doc.
+
 @ifset VXWORKS
 On VxWorks, @code{load} will dynamically link @var{filename} on the
 current target system as well as adding its symbols in @value{GDBN}.
@@ -6545,15 +6852,9 @@ download @var{filename} to the 960 as well as adding its symbols in
 @ifset H8
 @cindex download to H8/300 or H8/500
 @cindex H8/300 or H8/500 download
-@c start-sanitize-Hitachi-SH
 @cindex download to Hitachi SH
 @cindex Hitachi SH download
-@c end-sanitize-Hitachi-SH
-When you select remote debugging to a Hitachi
-@c start-sanitize-Hitachi-SH
-SH,
-@c end-sanitize-Hitachi-SH
-H8/300, or H8/500 board
+When you select remote debugging to a Hitachi SH, H8/300, or H8/500 board
 (@pxref{Hitachi Remote,,@value{GDBN} and Hitachi Microprocessors}),
 the @code{load} command downloads your program to the Hitachi board and also
 opens it as the current executable target for @value{GDBN} on your host
@@ -6572,6 +6873,7 @@ from the file @var{filename}.  You would use this command when @var{filename}
 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; @value{GDBN} cannot figure this out for itself.
+You can specify @var{address} as an expression.
 
 The symbol table of the file @var{filename} is added to the symbol table
 originally read with the @code{symbol-file} command.  You can use the
@@ -6630,12 +6932,12 @@ Print the names of the shared libraries which are currently loaded.
 @itemx share @var{regex}
 @kindex sharedlibrary
 @kindex share
-This is an obsolescent command; you can use it to explicitly
-load shared object library symbols for files matching a UNIX regular
-expression, but as with files loaded automatically, it will only load
-shared libraries required by your program for a core file or after
-typing @code{run}.  If @var{regex} is omitted all shared libraries
-required by your program are loaded.
+This is an obsolescent command; you can use it to explicitly load shared
+object library symbols for files matching a Unix regular expression, but
+as with files loaded automatically, it will only load shared libraries
+required by your program for a core file or after typing @code{run}.  If
+@var{regex} is omitted all shared libraries required by your program are
+loaded.
 @end table
 @end ifclear
 
@@ -6654,7 +6956,7 @@ to see how many times the problems occur, with the @code{set
 complaints} command (@pxref{Messages/Warnings, ,Optional warnings and
 messages}).
 
-The messages currently printed, and their meanings, are:
+The messages currently printed, and their meanings, include:
 
 @table @code
 @item inner block not inside outer block in @var{symbol}
@@ -6891,11 +7193,7 @@ name of the program to be debugged, as it appears to DOS on the PC.
 @ifset H8
 @item target hms
 @kindex target hms
-A Hitachi
-@c start-sanitize-Hitachi-SH
-SH,
-@c end-sanitize-Hitachi-SH
-H8/300, or H8/500 board, attached via serial line to your host.
+A Hitachi SH, H8/300, or H8/500 board, attached via serial line to your host.
 @ifclear H8EXCLUSIVE
 @c Unix only, not currently of interest for H8-only manual
 Use special commands @code{device} and @code{speed} to control the serial
@@ -6988,7 +7286,7 @@ configuration of GDB; use @code{help targets} to list them.
 @end ifset
 @end menu
 
-@include gdbinv-s.texi
+@include remote.texi
 @end ifset
 
 @node Controlling GDB
@@ -7189,6 +7487,9 @@ commands display the current settings.
 If you specify a height of zero lines, @value{GDBN} will not pause during output
 no matter how long the output is.  This is useful if output is to a file
 or to an editor buffer.
+
+Likewise, you can specify @samp{set width 0} to prevent @value{GDBN}
+from wrapping its output.
 @end table
 
 @node Numbers
@@ -7208,12 +7509,11 @@ both input and output with the @code{set radix} command.
 @kindex set radix
 @item set radix @var{base}
 Set the default base for numeric input and display.  Supported choices
-for @var{base} are decimal 2, 8, 10, 16.  @var{base} must itself be
+for @var{base} are decimal 8, 10, or 16.  @var{base} must itself be
 specified either unambiguously or using the current default radix; for
 example, any of
 
 @example
-set radix 1010
 set radix 012
 set radix 10.
 set radix 0xa
@@ -7453,11 +7753,14 @@ it would from the terminal.
 @cindex init file
 @cindex @file{@value{GDBINIT}}
 When you start @value{GDBN}, it automatically executes commands from its
-@dfn{init files}.  These are files named @file{@value{GDBINIT}}.  @value{GDBN} 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 you use the @samp{-nx} option; @pxref{Mode Options,
-,Choosing modes}.)
+@dfn{init files}.  These are files named @file{@value{GDBINIT}}.
+@value{GDBN} reads the init file (if any) in your home directory, then
+processes command line options and operands, and then reads the init
+file (if any) in the current working directory.  This is so the init
+file in your home directory can set options (such as @code{set
+complaints}) which affect the processing of the command line options and
+operands.  The init files are not executed if you use the @samp{-nx}
+option; @pxref{Mode Options, ,Choosing modes}.
 
 @ifset GENERIC
 @cindex init file name
@@ -7556,9 +7859,10 @@ formats}, for more information.
 @item printf @var{string}, @var{expressions}@dots{}
 @kindex printf
 Print the values of the @var{expressions} under the control of
-@var{string}.  The @var{expressions} are separated by commas and may
-be either numbers or pointers.  Their values are printed as specified
-by @var{string}, exactly as if your program were to execute
+@var{string}.  The @var{expressions} are separated by commas and may be
+either numbers or pointers.  Their values are printed as specified by
+@var{string}, exactly as if your program were to execute the C
+subroutine
 
 @example
 printf (@var{string}, @var{expressions}@dots{});
@@ -8285,6 +8589,8 @@ make
 @noindent
 where @var{host} is an identifier such as @samp{sun4} or
 @samp{decstation}, that identifies the platform where GDB will run.
+(You can often leave off @var{host}; @code{configure} tries to guess the
+correct value by examining your system.)
 
 Running @samp{configure @var{host}} and then running @code{make} builds the
 @file{bfd}, @file{readline}, @file{mmalloc}, and @file{libiberty}
@@ -8306,8 +8612,8 @@ creates configuration files for every directory level underneath (unless
 you tell it not to, with the @samp{--norecursion} option).
 
 You can run the @code{configure} script from any of the
-subordinate directories in the GDB distribution, if you only want to
-configure that subdirectory; but be sure to specify a path to it.
+subordinate directories in the GDB distribution if you only want to
+configure that subdirectory, but be sure to specify a path to it.
 
 For example, with version @value{GDBVN}, type the following to configure only
 the @code{bfd} subdirectory:
@@ -8416,11 +8722,11 @@ abbreviations---for example:
 
 @smallexample
 % sh config.sub sun4
-sparc-sun-sunos411
+sparc-sun-sunos4.1.1
 % sh config.sub sun3
-m68k-sun-sunos411
+m68k-sun-sunos4.1.1
 % sh config.sub decstation
-mips-dec-ultrix42
+mips-dec-ultrix4.2
 % sh config.sub hp300bsd
 m68k-hp-bsd
 % sh config.sub i386v
@@ -8481,7 +8787,7 @@ Configure only the directory level where @code{configure} is executed; do not
 propagate configuration to subdirectories.
 
 @item --rm
-Remove the configuration that the other arguments specify.
+@emph{Remove} files otherwise built during configuration.
 
 @c This does not work (yet if ever).  FIXME.
 @c @item --parse=@var{lang} @dots{}
@@ -8509,403 +8815,6 @@ configuring other GNU tools recursively; but these are the only
 options that affect GDB or its supporting libraries.
 @end ifclear
 
-@ifclear AGGLOMERATION
-@node Copying
-@unnumbered GNU GENERAL PUBLIC LICENSE
-@center Version 2, June 1991
-
-@display
-Copyright @copyright{} 1989, 1991 Free Software Foundation, Inc.
-675 Mass Ave, Cambridge, MA 02139, USA
-
-Everyone is permitted to copy and distribute verbatim copies
-of this license document, but changing it is not allowed.
-@end display
-
-@unnumberedsec Preamble
-
-  The licenses for most software are designed to take away your
-freedom to share and change it.  By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software---to make sure the software is free for all its users.  This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it.  (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.)  You can apply it to
-your programs, too.
-
-  When we speak of free software, we are referring to freedom, not
-price.  Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
-  To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
-  For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have.  You must make sure that they, too, receive or can get the
-source code.  And you must show them these terms so they know their
-rights.
-
-  We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
-  Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software.  If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
-  Finally, any free program is threatened constantly by software
-patents.  We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary.  To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
-  The precise terms and conditions for copying, distribution and
-modification follow.
-
-@iftex
-@unnumberedsec TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-@end iftex
-@ifinfo
-@center TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-@end ifinfo
-
-@enumerate
-@item
-This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License.  The ``Program'', below,
-refers to any such program or work, and a ``work based on the Program''
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language.  (Hereinafter, translation is included without limitation in
-the term ``modification''.)  Each licensee is addressed as ``you''.
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope.  The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
-@item
-You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
-@item
-You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
-@enumerate a
-@item
-You must cause the modified files to carry prominent notices
-stating that you changed the files and the date of any change.
-
-@item
-You must cause any work that you distribute or publish, that in
-whole or in part contains or is derived from the Program or any
-part thereof, to be licensed as a whole at no charge to all third
-parties under the terms of this License.
-
-@item
-If the modified program normally reads commands interactively
-when run, you must cause it, when started running for such
-interactive use in the most ordinary way, to print or display an
-announcement including an appropriate copyright notice and a
-notice that there is no warranty (or else, saying that you provide
-a warranty) and that users may redistribute the program under
-these conditions, and telling the user how to view a copy of this
-License.  (Exception: if the Program itself is interactive but
-does not normally print such an announcement, your work based on
-the Program is not required to print an announcement.)
-@end enumerate
-
-These requirements apply to the modified work as a whole.  If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works.  But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
-@item
-You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
-@enumerate a
-@item
-Accompany it with the complete corresponding machine-readable
-source code, which must be distributed under the terms of Sections
-1 and 2 above on a medium customarily used for software interchange; or,
-
-@item
-Accompany it with a written offer, valid for at least three
-years, to give any third party, for a charge no more than your
-cost of physically performing source distribution, a complete
-machine-readable copy of the corresponding source code, to be
-distributed under the terms of Sections 1 and 2 above on a medium
-customarily used for software interchange; or,
-
-@item
-Accompany it with the information you received as to the offer
-to distribute corresponding source code.  (This alternative is
-allowed only for noncommercial distribution and only if you
-received the program in object code or executable form with such
-an offer, in accord with Subsection b above.)
-@end enumerate
-
-The source code for a work means the preferred form of the work for
-making modifications to it.  For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable.  However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
-@item
-You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License.  Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
-@item
-You are not required to accept this License, since you have not
-signed it.  However, nothing else grants you permission to modify or
-distribute the Program or its derivative works.  These actions are
-prohibited by law if you do not accept this License.  Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
-@item
-Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions.  You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
-@item
-If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License.  If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all.  For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices.  Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
-@item
-If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded.  In such case, this License incorporates
-the limitation as if written in the body of this License.
-
-@item
-The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time.  Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number.  If the Program
-specifies a version number of this License which applies to it and ``any
-later version'', you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation.  If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
-@item
-If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission.  For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this.  Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
-@iftex
-@heading NO WARRANTY
-@end iftex
-@ifinfo
-@center NO WARRANTY
-@end ifinfo
-
-@item
-BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM ``AS IS'' WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
-@item
-IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-@end enumerate
-
-@iftex
-@heading END OF TERMS AND CONDITIONS
-@end iftex
-@ifinfo
-@center END OF TERMS AND CONDITIONS
-@end ifinfo
-
-@page
-@unnumberedsec Applying These Terms to Your New Programs
-
-  If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
-  To do so, attach the following notices to the program.  It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the ``copyright'' line and a pointer to where the full notice is found.
-
-@smallexample
-@var{one line to give the program's name and an idea of what it does.}
-Copyright (C) 19@var{yy}  @var{name of author}
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the 
-Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA.
-@end smallexample
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
-@smallexample
-Gnomovision version 69, Copyright (C) 19@var{yy} @var{name of author}
-Gnomovision comes with ABSOLUTELY NO WARRANTY; for details
-type `show w'.  This is free software, and you are welcome
-to redistribute it under certain conditions; type `show c' 
-for details.
-@end smallexample
-
-The hypothetical commands @samp{show w} and @samp{show c} should show
-the appropriate parts of the General Public License.  Of course, the
-commands you use may be called something other than @samp{show w} and
-@samp{show c}; they could even be mouse-clicks or menu items---whatever
-suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a ``copyright disclaimer'' for the program, if
-necessary.  Here is a sample; alter the names:
-
-@example
-Yoyodyne, Inc., hereby disclaims all copyright
-interest in the program `Gnomovision'
-(which makes passes at compilers) written 
-by James Hacker.
-
-@var{signature of Ty Coon}, 1 April 1989
-Ty Coon, President of Vice
-@end example
-
-This General Public License does not permit incorporating your program into
-proprietary programs.  If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library.  If this is what you want to do, use the GNU Library General
-Public License instead of this License.
-@end ifclear
-
 @node Index
 @unnumbered Index
 
This page took 0.053382 seconds and 4 git commands to generate.