(1) Applied some fixes due to comments from Larry Breed (easier ones
authorRoland Pesch <pesch@cygnus>
Sat, 27 Jul 1991 00:49:54 +0000 (00:49 +0000)
committerRoland Pesch <pesch@cygnus>
Sat, 27 Jul 1991 00:49:54 +0000 (00:49 +0000)
through chapsec 5.2)

(2) Eliminated use of @footnote---had my doubts about it anyways, and
it's broken in latest texinfo

(3) Introduced *some* use of [] for optional arguments, where
explanation is not simpler by listing cmd w arg and cmd w/out arg
separately.  Still not using @deffn.

(4) Dropped in GPL-2.  NOTE: one of GPL-2 or texinfo is broken; a
couple of headings are too long.  Need patches to texinfo or revision
to GPL-2.

gdb/doc/gdb.texinfo

index 162b01fe7b9dc190bf4a6e228e859392bbf81eb7..4141fd77319feb51a4f3e63d24988d54380210a9 100644 (file)
@@ -435,7 +435,7 @@ utilities are being converted to use it.
 
 @item Configuration
 Compile-time configuration (to select a particular architecture and
-operating system) is much easier.  The script @code{config.gdb} now
+operating system) is much easier.  The script @code{configure} now
 handles specification of separate host and target configurations.
 
 @item Interaction
@@ -729,8 +729,6 @@ session with the _GDBN__ @code{quit} command.
 
 @smallexample
 (_GDBP__) @i{quit}
-
-$ 
 _1__@end smallexample
 
 @node Invocation, Commands, Sample Session, Top
@@ -961,7 +959,7 @@ documentation for individual commands.  In some cases, even ambiguous
 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}.  You can test abbreviations by using them as
-arguments to the @code{help} command (@pxref{Help}).
+arguments to the @code{help} command.
 
 @cindex repeating commands  
 @kindex RET
@@ -1167,16 +1165,15 @@ option or use shorter file names.  Alternatively, use a version of GNU
 @item run
 @itemx r
 @kindex run
-Use the @code{run} command to start your program under _GDBN__.
-_if__(_VXWORKS__)
-Except on VxWorks, you
+Use the @code{run} command to start your program under _GDBN__.  You
+must first specify the program name
+_if__(_VXWORKS__) 
+(except on VxWorks)
 _fi__(_VXWORKS__)
-_if__(!_VXWORKS__)
-You
-_fi__(!_VXWORKS__)
-must first specify the program name with an argument to _GDBN__
+with an argument to _GDBN__
 (@pxref{Invocation}), or using the @code{file} or @code{exec-file}
-command (@pxref{Files}).@refill
+command (@pxref{Files}).  
+@refill
 @end table
 
 On targets that support processes, @code{run} creates an inferior
@@ -1275,12 +1272,13 @@ Add @var{directory} to the front of the @code{PATH} environment variable
 (the search path for executables), for both _GDBN__ and your program.
 You may specify several directory names, separated by @samp{:} or
 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 _GDBN__ searches the path.  @footnote{If you use @samp{.} instead,
-it refers to the directory where you executed the @code{path} command.
-_GDBN__ fills in the current path where needed in the @var{directory}
-argument, before adding it to the search path.}
+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 _GDBN__ searches the path.  If you use
+@samp{.} instead, it refers to the directory where you executed the
+@code{path} command.  _GDBN__ fills in the current path where needed in
+the @var{directory} argument, before adding it to the search path.
 @c 'path' is explicitly nonrepeatable, but RMS points out it's silly to
 @c document that, since repeating it would be a no-op.
 
@@ -1296,8 +1294,7 @@ your program when it starts.  If you don't supply @var{varname},
 print the names and values of all environment variables to be given to
 your program.  You can abbreviate @code{environment} as @code{env}.
 
-@item set environment @var{varname} @var{value}
-@itemx set environment @var{varname} = @var{value}
+@item set environment @var{varname} @r{[}=@r{]} @var{value}
 @kindex set environment
 Sets environment variable @var{varname} to @var{value}.  The value
 changes for your program only, not for _GDBN__ itself.  @var{value} may
@@ -1508,8 +1505,7 @@ running or not, what process it is, and why it stopped.
 
 @menu
 * Breakpoints::                        Breakpoints, Watchpoints, and Exceptions
-* Stepping::                   Stepping
-* Continuing::                 Continuing
+* Stepping and Continuing::    Stepping and Continuing
 * Signals::                    Signals
 @end menu
 
@@ -2132,19 +2128,20 @@ linker option @samp{-N}.  The operating system limitation may not apply
 to nonsharable executables.
 @end enumerate
 
-@node Stepping, Continuing, Breakpoints, Stopping
-@section Stepping
+@node Stepping and Continuing, Signals, Breakpoints, Stopping
+@section Stepping and Continuing
 
 @cindex stepping
-@dfn{Stepping} means setting your program in motion for a limited time,
-so that control will return automatically to _GDBN__ after one line of
-code or one machine instruction.  @footnote{Your program might stop even
-sooner, during stepping, since a signal may arrive before your program
-reaches the next source line.  Also, since breakpoints are active during
-stepping, your program will stop for them even if it has not gone as far
-as the stepping command specifies.}
-
-A typical technique for using stepping is to put a breakpoint
+@cindex continuing
+@cindex resuming execution
+@dfn{Stepping} means resuming program execution for a very limited time:
+one line of source code, or one machine instruction.  @dfn {Continuing}
+means resuming program execution until the program completes normally.
+In either case, the program may stop even sooner, due to a breakpoint or
+to a signal.  (If due to a signal, you may want to use @code{handle}, or
+use @samp{signal 0} to resume execution; @pxref{Signals}.)
+
+A typical technique for using stepping is to set a breakpoint
 (@pxref{Breakpoints}) at the beginning of the function or the section of
 the program in which a problem is believed to lie, run the program until
 it stops at that breakpoint, and then step through the suspect area,
@@ -2156,11 +2153,11 @@ happen.
 @kindex step
 @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
+line, then stop it and return control to _GDBN__.  This command is
 abbreviated @code{s}.
 
-You may use the @code{step} command when control is within a function
-for which there is no debugging information.  In that case, execution
+You may use the @code{step} command even when control is within a function
+compiled without debugging information.  In that case, execution
 will proceed until control reaches a different function, or is about to
 return from this function.
 
@@ -2169,16 +2166,17 @@ 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.
 
-@item next
+@item next @r{[}@var{count}@r{]}
 @kindex next
 @kindex n
-Continue to the next source line in the current stack frame.  Similar to
-@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
-@code{next} command was given.  This command is abbreviated @code{n}.
+Continue to the next source line in the current (innermost) stack frame.
+Similar to @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 @code{next} command was given.  This command is abbreviated
+@code{n}.
 
-An argument is a repeat count, as in @code{step}.
+An argument @var{count} is a repeat count, as for @code{step}.
 
 @code{next} within a function that lacks debugging information acts like
 @code{step}, but any function calls appearing within the code of the
@@ -2186,10 +2184,8 @@ function are executed without stopping.
 
 @item finish
 @kindex finish
-Continue running until just after the selected stack frame returns (or
-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).
+Continue running until just after function in the selected stack frame
+returns.  Print the returned value (if any).
 
 Contrast this with the @code{return} command (@pxref{Returning}).
 
@@ -2214,7 +2210,7 @@ would force you to step through the next iteration.
 stack frame.
 
 @code{until} may produce somewhat counterintuitive results if the order
-of the source lines does not match the actual order of execution.  For
+of machine code does not match the order of the source lines.  For
 example, in the following excerpt from a debugging session, the @code{f}
 (@code{frame}) command shows that execution is stopped at line
 @code{206}; yet when we use @code{until}, we get to line @code{195}:
@@ -2227,12 +2223,13 @@ example, in the following excerpt from a debugging session, the @code{f}
 195            for ( ; argc > 0; NEXTARG) @{
 @end example
 
-In this case, (as for any C @code{for}-loop), the loop-step expression
-(here, @samp{argc > 0}) is executed @emph{after} the statements in the
-body of the loop, but is written before them.  Therefore, the
-@code{until} command appeared to step back to the beginning of the loop
-when it advanced to this expression.  However, it has not really gone to
-an earlier statement---not in terms of the actual machine code.
+This happened because, for execution efficiency, the compiler had
+generated code for the loop closure test at the end, rather than the
+start, of the loop---even though the test in a C @code{for}-loop is
+written before the body of the loop.  The @code{until} command appeared
+to step back to the beginning of the loop when it advanced to this
+expression; however, it has not really gone to an earlier
+statement---not in terms of the actual machine code.
 
 @code{until} with no argument works by means of single
 instruction stepping, and hence is slower than @code{until} with an
@@ -2241,7 +2238,7 @@ 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}
+reached, or the current stack frame returns.  @var{location}
 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 @code{until} without an argument.
@@ -2266,44 +2263,23 @@ Execute one machine instruction, but if it is a function call,
 proceed until the function returns.
 
 An argument is a repeat count, as in @code{next}.
-@end table
 
-The @code{continue} command can be used after stepping to resume execution
-until the next breakpoint or signal.
-
-@node Continuing, Signals, Stepping, Stopping
-@section Continuing
+@item continue @r{[}@var{ignore-count}@r{]}
+@kindex continue
+Resume program execution, at the address where the 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}).
 
-After your program stops, most likely you will want it to run some more if
-the bug you are looking for has not happened yet.
+To resume execution at a different place, you can use @code{return}
+(@pxref{Returning}) to go back to the calling function; or @code{jump}
+(@pxref{Jumping}) to go to an arbitrary location in your program.
 
-@table @code
-@item continue
-@kindex continue
-Continue running the program at the place where it stopped.
 @end table
 
-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, @code{continue}
-takes special care to prevent that from happening.  You do not need
-to disable the breakpoint to proceed through it after stopping there.
-You can, however, specify an ignore-count for the breakpoint that the
-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
-@code{SIGTRAP}, continuing will cause the program to see that signal.
-You may not want this to happen.  For example, if the program stopped
-due to some sort of memory reference error, you might store correct
-values into the erroneous variables and continue, hoping to see more
-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 @code{handle} command (@pxref{Signals}). 
 
-@node Signals,  , Continuing, Stopping
+@node Signals,  , Stepping and Continuing, Stopping
 @section Signals
 @cindex signals
 
@@ -2387,7 +2363,12 @@ the program when you later continue it.
 
 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}.
+or to give it any signal at any time.  For example, if the program stopped
+due to some sort of memory reference error, you might store correct
+values into the erroneous variables and continue, hoping to see more
+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}.
 
 @node Stack, Source, Stopping, Top
 @chapter Examining the Stack
@@ -2850,13 +2831,14 @@ To add other directories, use the @code{directory} command.
 Add directory @var{dirname} to the front of the source path.  Several
 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.  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.
-@footnote{@samp{$cwd} is not the same as @samp{.}---the former tracks
-the current working directory as it changes during your _GDBN__ session,
-while the latter is immediately expanded to the current directory at the
-time you add an entry to the source path.}
+path; this moves it forward, so it will be searched sooner.  
+
+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
+tracks the current working directory as it changes during your _GDBN__
+session, while the latter is immediately expanded to the current
+directory at the time you add an entry to the source path.
 
 @item directory
 Reset the source path to empty again.  This requires confirmation.
@@ -5672,68 +5654,114 @@ unset                     &&\rm(No longer an alias for delete)\cr
 @cindex configuring _GDBN__
 @cindex installation
 
-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
+_GDBN__ is distributed with a script @code{configure} that automates the
+process of preparing _GDBN__ for installation; you can then use
+@code{make} to actually build it.  
+
+You can find the @code{configure} script that's specific to _GDBN__ in
+the main _GDBN__ source directory.  However, @code{configure} is
+designed to be called recursively, so it is most convenient to run the
+version of @code{configure} for the @emph{parent} of that directory,
+which should include not only @code{_GDBP__} but also other @sc{gnu}
+tools and libraries.  Building _GDBN__ requires some of these associated
+directories; at a minimum, you need a source directory that includes the
+directories
+@example
+bfd gdb include libiberty readline
+@end example
+@noindent
+to build _GDBN__.  It should also include @file{texinfo} if you want to
+format and print copies of this manual. 
+
+The simplest way to configure and build _GDBN__ is the following:
+@example
+cd @var{gnusrc}
+./configure @var{machine}
+make
+@end example
+@noindent
+where @var{gnusrc} is the directory containing both _GDBN__ source and
+source for supporting libraries, in subdirectories; and @var{machine} is
+something like @samp{sun4} or @samp{vax}, that identifies the platform
+where _GDBN__ will run.
+
+The best way to build _GDBN__ is to use subdirectories that record the
 configuration options used; this gives you a clean way of building
 _GDBN__ binaries with several different configuration options.
-@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}'': 
+@code{configure} only requires this when you simultaneously create
+several configurations; but it's a good habit even for a single
+configuration.  You can specify the use of subdirectories using the
+@samp{+forcesubdirs} option (abbreviated @samp{+f}).  For example,
+assuming the @sc{gnu} source directory that includes _GDBN__ source and
+the supporting libraries is in a directory called @file{gnusrc}:
 
 @example
-cd gdb-4.0
-mkdir =sun3os4
-cd =sun3os4
-../config.gdb sun3os4
+cd gnusrc
+./configure +f sun4
+cd Host-sun4/Target-sun4
 make
 @end example
 
 @noindent
-will install _GDBN__ on a Sun 3 running SunOS 4.  
+will build _GDBN__ on a Sun 4.
+
+Here is a summary of all the @code{configure} options and arguments that
+you might use for building _GDBN__:
+
+@example
+configure @rm{[}+destdir=@var{dir}@rm{]} @rm{[}+forcesubdirs@rm{]} @rm{[}+norecur@rm{]} @rm{[}+rm@rm{]}
+          @rm{[}+target=@var{machine}@dots{}@rm{]} @var{host}@dots{}
+@end example
+
+You may introduce options with the character @samp{-} rather than
+@samp{+} if you prefer; but options introduced with @samp{+} may be truncated.
+@code{configure} accepts other options, for compatibility with
+configuring other @sc{gnu} tools recursively; but these are the only
+options that affect _GDBN__ or its supporting libraries.
 
 @table @code
-@kindex config.gdb
-@item config.gdb @var{machine}
-@itemx config.gdb -srcdir=@var{dir} @var{machine}
-This is the most usual way of configuring _GDBN__; to debug programs running
-on the same machine as _GDBN__ itself.  If you wish to build the _GDBN__ binaries
-in a completely different directory from the sources, specify a path to
-the source directory using the @samp{-srcdir} option.
-
-@item config.gdb -host
-@cindex host environments
-Display a list of supported host environments for _GDBN__.
-
-@item config.gdb @var{host} @var{target}
-@itemx config.gdb -srcdir=@var{dir} @var{host} @var{target}
-@cindex cross-debugging
-_GDBN__ can also be used as a cross-debugger, running on a machine of one
-type while debugging a program running on a machine of another type.
-You configure it this way by specifying first the @var{host}, then the
-@var{target} environment on the @code{config.gdb} argument list; the
-@var{host} is where _GDBN__ runs, and the @var{target} is where your program
-runs. @xref{Remote}.  Again, you can use @samp{-srcdir} to specify a
-path to the _GDBN__ source.
-
-@item config.gdb -target
-@cindex target environments
-Display a list of supported target environments for _GDBN__.
+@item +destdir=@var{dir}
+@var{dir} is an installation directory for use by @code{make install}.
+
+@item +forcesubdirs
+Build binaries in subdirectories of the form
+@example
+Host-@var{machine}/Target-@var{machine}
+@end example
+@noindent
+Without this option, if you specify only one configuration for _GDBN__,
+@code{configure} will use the same directory for source, configured
+files, and binaries.  This option is used automatically if you specify
+more than one @var{host} or more than one @samp{+target=@var{machine}}
+option on the @code{configure} command line.
+
+@item +norecur
+Configure only the directory where @code{configure} is executed; do not
+propagate configuration to subdirectories.
+
+@item +rm
+Remove the configuration specified by other arguments.
+
+@item +target=@var{machine} @dots{}
+Configure _GDBN__ for cross-debugging programs running on specified
+@var{machine}s.  You may specify as many @samp{+target} options as you
+wish.  To see a list of available targets, execute @samp{ls tconfig} in
+the _GDBN__ source directory.  Without this option, _GDBN__ is
+configured to debug programs that run on the same machine (@var{host})
+as _GDBN__ itself.
+
+@item @var{host} @dots{}
+Configure _GDBN__ to run on specified @var{host}s.  You may specify as
+many host names as you wish.  To see a list of available hosts, execute
+@samp{ls xconfig} in the _GDBN__ source directory.
 @end table
 
 @node Copying, Index, Installing _GDBN__, Top
-@appendix Copying GDB
-@c this is an attempt to kluge around what may be a bug in texinfo;
-@c @xrefs to this node came out pointing several pages further down when
-@c the @node was immediately followed by @unnumbered.
-@c While we're at it, might as well give an Appendix heading that
-@c matches RMS' preferred nodename "Copying".
-
 @unnumbered GNU GENERAL PUBLIC LICENSE
-@center Version 1, February 1989
+@center Version 2, June 1991
 
 @display
-Copyright @copyright{} 1989 Free Software Foundation, Inc.
+Copyright @copyright{} 1989, 1991 Free Software Foundation, Inc.
 675 Mass Ave, Cambridge, MA 02139, USA
 
 Everyone is permitted to copy and distribute verbatim copies
@@ -5742,30 +5770,33 @@ of this license document, but changing it is not allowed.
 
 @unnumberedsec Preamble
 
-  The license agreements of most software companies try to keep users
-at the mercy of those companies.  By contrast, our General Public
+  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.  The
-General Public License applies to the Free Software Foundation's
-software and to any other program whose authors commit to using it.
-You can use it for your programs, too.
+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.  Specifically, the General Public License is designed to make
-sure that you have the freedom to give away or sell copies of free
-software, 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.
+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
+  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 tell them their rights.
+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,
@@ -5778,128 +5809,216 @@ 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
+@unnumberedsec TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
 @end iftex
 @ifinfo
-@center TERMS AND CONDITIONS
+@center TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
 @end ifinfo
 
 @enumerate
 @item
-This License Agreement 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 work containing the
-Program or a portion of it, either verbatim or with modifications.  Each
-licensee is addressed as ``you''.
+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
-General Public License and to the absence of any warranty; and give any
-other recipients of the Program a copy of this General Public License
-along with the Program.  You may charge a fee for the physical act of
-transferring a copy.
+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.
 
-@item
-You may modify your copy or copies of the Program or any portion of
-it, and copy and distribute such modifications under the terms of Paragraph
-1 above, provided that you also do the following:
+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.
 
-@itemize @bullet
 @item
-cause the modified files to carry prominent notices stating that
-you changed the files and the date of any change; and
+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:
 
+@alphaenumerate
 @item
-cause the whole of any work that you distribute or publish, that
-in whole or in part contains the Program or any part thereof, either
-with or without modifications, to be licensed at no charge to all
-third parties under the terms of this General Public License (except
-that you may choose to grant warranty protection to some or all
-third parties, at your option).
+You must cause the modified files to carry prominent notices
+stating that you changed the files and the date of any change.
 
 @item
-If the modified program normally reads commands interactively when
-run, you must cause it, when started running for such interactive use
-in the simplest and most usual 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 General
-Public License.
+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
-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.
-@end itemize
-
-Mere aggregation of another independent work with the Program (or its
-derivative) on a volume of a storage or distribution medium does not bring
-the other work under the scope of these terms.
+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 alphaenumerate
+
+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 portion or derivative of
-it, under Paragraph 2) in object code or executable form under the terms of
-Paragraphs 1 and 2 above provided that you also do one of the following:
+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:
 
-@itemize @bullet
+@alphaenumerate
 @item
-accompany it with the complete corresponding machine-readable
-source code, which must be distributed under the terms of
-Paragraphs 1 and 2 above; or,
+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 free (except for a nominal charge
-for the cost of distribution) a complete machine-readable copy of the
-corresponding source code, to be distributed under the terms of
-Paragraphs 1 and 2 above; or,
+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 where the
-corresponding source code may be obtained.  (This alternative is
+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 alone.)
-@end itemize
-
-Source code for a work means the preferred form of the work for making
-modifications to it.  For an executable file, complete source code means
-all the source code for all modules it contains; but, as a special
-exception, it need not include source code for modules which are standard
-libraries that accompany the operating system on which the executable
-file runs, or for standard header files or definitions files that
-accompany that operating system.
+received the program in object code or executable form with such
+an offer, in accord with Subsection b above.)
+@end alphaenumerate
+
+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, distribute or transfer the
-Program except as expressly provided under this General Public License.
-Any attempt otherwise to copy, modify, sublicense, distribute or transfer
-the Program is void, and will automatically terminate your rights to use
-the Program under this License.  However, parties who have received
-copies, or rights to use copies, from you under this General Public
-License will not have their licenses terminated so long as such parties
-remain in full compliance.
+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
-By copying, distributing or modifying 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.
+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.
+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
@@ -5908,11 +6027,11 @@ 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 the license which applies to it and ``any
+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
-the license, you may choose any version ever published by the Free Software
+this License, you may choose any version ever published by the Free Software
 Foundation.
 
 @item
@@ -5943,15 +6062,15 @@ 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
+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.
+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
@@ -5962,17 +6081,16 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
 @end ifinfo
 
 @page
-@unnumberedsec Applying These Terms to Your New Programs
+@unnumberedsec Appendix: How to Apply These Terms to Your New Programs
 
   If you develop a new program, and you want it to be of the greatest
-possible use to humanity, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these
-terms.
+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.
+  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 a brief idea of what it does.}
@@ -5980,8 +6098,8 @@ 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 1, or (at your option)
-any later version.
+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
@@ -6005,26 +6123,30 @@ This is free software, and you are welcome to redistribute it
 under certain conditions; type `show c' for details.
 @end smallexample
 
-The hypothetical commands `show w' and `show c' should show the
-appropriate parts of the General Public License.  Of course, the
-commands you use may be called something other than `show w' and `show
-c'; they could even be mouse-clicks or menu items---whatever suits your
-program.
+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:
 
-@smallexample
-Yoyodyne, Inc., hereby disclaims all copyright interest in the
-program `Gnomovision' (a program to direct compilers to make passes
-at assemblers) written by James Hacker.
+@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 smallexample
+@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.
 
-That's all there is to it!
 
 @node Index,  , Copying, Top
 @unnumbered Index