* gdbint.texinfo (Releasing GDB): Add the section``Branch Commit
[deliverable/binutils-gdb.git] / gdb / doc / gdbint.texinfo
index 3a2108d23cd43b6ed413b4a3b54cbe1e005b0a33..5f5f93692ccc397960728d750a4e5d334fcee86e 100644 (file)
@@ -8,7 +8,7 @@
 
 @ifinfo
 This file documents the internals of the GNU debugger @value{GDBN}.
-Copyright 1990,1991,1992,1993,1994,1996,1998,1999,2000,2001
+Copyright 1990,1991,1992,1993,1994,1996,1998,1999,2000,2001,2002
    Free Software Foundation, Inc.
 Contributed by Cygnus Solutions.  Written by John Gilmore.
 Second Edition by Stan Shebs.
@@ -64,10 +64,7 @@ this GNU Manual, like GNU software.  Copies published by the Free
 Software Foundation raise funds for GNU development.''
 @end titlepage
 
-@c TeX can handle the contents at the start but makeinfo 3.12 can not
-@iftex
 @contents
-@end iftex
 
 @node Top
 @c Perhaps this should be the title of the document (but only for info,
@@ -93,8 +90,11 @@ as the mechanisms that adapt @value{GDBN} to specific hosts and targets.
 * Support Libraries::
 * Coding::
 * Porting GDB::
+* Releasing GDB::
 * Testsuite::
 * Hints::
+
+* GNU Free Documentation License::  The license for this documentation
 * Index::
 @end menu
 
@@ -291,7 +291,7 @@ for something to happen.
 Since they depend on hardware resources, hardware breakpoints may be
 limited in number; when the user asks for more, @value{GDBN} will
 start trying to set software breakpoints.  (On some architectures,
-notably the 32-bit x86 platforms, @value{GDBN} cannot alsways know
+notably the 32-bit x86 platforms, @value{GDBN} cannot always know
 whether there's enough hardware resources to insert all the hardware
 breakpoints and watchpoints.  On those platforms, @value{GDBN} prints
 an error message only when the program being debugged is continued.)
@@ -628,8 +628,8 @@ looks for a debug register which is already set to watch the same
 region for the same access types; if found, it just increments the
 reference count of that debug register, thus implementing debug
 register sharing between watchpoints.  If no such register is found,
-the function looks for a vacant debug register, sets its mirrorred
-value to @var{addr}, sets the mirrorred value of DR7 Debug Control
+the function looks for a vacant debug register, sets its mirrored
+value to @var{addr}, sets the mirrored value of DR7 Debug Control
 register as appropriate for the @var{len} and @var{type} parameters,
 and then passes the new values of the debug register and DR7 to the
 inferior by calling @code{I386_DR_LOW_SET_ADDR} and
@@ -638,8 +638,8 @@ required to cover the given region, the above process is repeated for
 each debug register.
 
 @code{i386_remove_watchpoint} does the opposite: it resets the address
-in the mirrorred value of the debug register and its read/write and
-length bits in the mirrorred value of DR7, then passes these new
+in the mirrored value of the debug register and its read/write and
+length bits in the mirrored value of DR7, then passes these new
 values to the inferior via @code{I386_DR_LOW_RESET_ADDR} and
 @code{I386_DR_LOW_SET_CONTROL}.  If a register is shared by several
 watchpoints, each time a @code{i386_remove_watchpoint} is called, it
@@ -2019,47 +2019,45 @@ distribution!
 
 @chapter Host Definition
 
-@emph{Maintainer's note: In theory, new targets no longer need to use
-the host framework described below.  Instead it should be possible to
-handle everything using autoconf.  Patches eliminating this framework
-welcome.}
-
 With the advent of Autoconf, it's rarely necessary to have host
-definition machinery anymore.
+definition machinery anymore.  The following information is provided,
+mainly, as an historical reference.
 
 @section Adding a New Host
 
 @cindex adding a new host
 @cindex host, adding
-Most of @value{GDBN}'s host configuration support happens via
-Autoconf.  New host-specific definitions should be rarely needed.
-@value{GDBN} still uses the host-specific definitions and files listed
-below, but these mostly exist for historical reasons, and should
+@value{GDBN}'s host configuration support normally happens via Autoconf.
+New host-specific definitions should not be needed.  Older hosts
+@value{GDBN} still use the host-specific definitions and files listed
+below, but these mostly exist for historical reasons, and will
 eventually disappear.
 
-Several files control @value{GDBN}'s configuration for host systems:
-
 @table @file
-@vindex XDEPFILES
 @item gdb/config/@var{arch}/@var{xyz}.mh
-Specifies Makefile fragments needed when hosting on machine @var{xyz}.
-In particular, this lists the required machine-dependent object files,
-by defining @samp{XDEPFILES=@dots{}}.  Also specifies the header file
-which describes host @var{xyz}, by defining @code{XM_FILE=
-xm-@var{xyz}.h}.  You can also define @code{CC}, @code{SYSV_DEFINE},
-@code{XM_CFLAGS}, @code{XM_ADD_FILES}, @code{XM_CLIBS}, @code{XM_CDEPS},
-etc.; see @file{Makefile.in}.
+This file once contained both host and native configuration information
+(@pxref{Native Debugging}) for the machine @var{xyz}.  The host
+configuration information is now handed by Autoconf.
+
+Host configuration information included a definition of
+@code{XM_FILE=xm-@var{xyz}.h} and possibly definitions for @code{CC},
+@code{SYSV_DEFINE}, @code{XM_CFLAGS}, @code{XM_ADD_FILES},
+@code{XM_CLIBS}, @code{XM_CDEPS}, etc.; see @file{Makefile.in}.
+
+New host only configurations do not need this file.
 
 @item gdb/config/@var{arch}/xm-@var{xyz}.h
-(@file{xm.h} is a link to this file, created by @code{configure}).  Contains C
-macro definitions describing the host system environment, such as byte
-order, host C compiler and library.
-
-@item gdb/@var{xyz}-xdep.c
-Contains any miscellaneous C code required for this machine as a host.
-On most machines it doesn't exist at all.  If it does exist, put
-@file{@var{xyz}-xdep.o} into the @code{XDEPFILES} line in
-@file{gdb/config/@var{arch}/@var{xyz}.mh}.
+This file once contained definitions and includes required when hosting
+gdb on machine @var{xyz}.  Those definitions and includes are now
+handled by Autoconf.
+
+New host and native configurations do not need this file.
+
+@emph{Maintainer's note: Some hosts continue to use the @file{xm-xyz.h}
+file to define the macros @var{HOST_FLOAT_FORMAT},
+@var{HOST_DOUBLE_FORMAT} and @var{HOST_LONG_DOUBLE_FORMAT}.  That code
+also needs to be replaced with either an Autoconf or run-time test.}
+
 @end table
 
 @subheading Generic Host Support Files
@@ -2213,10 +2211,6 @@ This macro is used as the argument to @code{lseek} (or, most commonly,
 @code{bfd_seek}).  FIXME, should be replaced by SEEK_SET instead,
 which is the POSIX equivalent.
 
-@item MALLOC_INCOMPATIBLE
-Define this if the system's prototype for @code{malloc} differs from the
-@sc{ansi} definition.
-
 @item MMAP_BASE_ADDRESS
 When using HAVE_MMAP, the first mapping should go at this address.
 
@@ -2425,7 +2419,7 @@ If @var{type} is not a pointer or reference type, then this function
 will signal an internal error.
 @end deftypefun
 
-@deftypefun CORE_ADDR value_as_address (value_ptr @var{val})
+@deftypefun CORE_ADDR value_as_address (struct value *@var{val})
 Assuming that @var{val} is a pointer, return the address it represents,
 as appropriate for the current architecture.
 
@@ -2736,7 +2730,7 @@ reason.
 
 @item CALL_DUMMY_P
 @findex CALL_DUMMY_P
-A C expresson that is non-zero when the target suports inferior function
+A C expression that is non-zero when the target supports inferior function
 calls.
 
 @item CALL_DUMMY_WORDS
@@ -2872,6 +2866,11 @@ library in which breakpoints cannot be set and so should be disabled.
 @findex DO_REGISTERS_INFO
 If defined, use this to print the value of a register or all registers.
 
+@item PRINT_FLOAT_INFO()
+#findex PRINT_FLOAT_INFO
+If defined, then the @samp{info float} command will print information about
+the processor's floating point unit.
+
 @item DWARF_REG_TO_REGNUM
 @findex DWARF_REG_TO_REGNUM
 Convert DWARF register number into @value{GDBN} regnum.  If not defined,
@@ -2912,8 +2911,7 @@ Predicate for @code{EXTRACT_STRUCT_VALUE_ADDRESS}.
 
 @item FLOAT_INFO
 @findex FLOAT_INFO
-If defined, then the @samp{info float} command will print information about
-the processor's floating point unit.
+Deprecated in favor of @code{PRINT_FLOAT_INFO}.
 
 @item FP_REGNUM
 @findex FP_REGNUM
@@ -3020,12 +3018,12 @@ respectively.  (Currently only defined for the Delta 68.)
 
 @item @value{GDBN}_MULTI_ARCH
 @findex @value{GDBN}_MULTI_ARCH
-If defined and non-zero, enables suport for multiple architectures
+If defined and non-zero, enables support for multiple architectures
 within @value{GDBN}.
 
 This support can be enabled at two levels.  At level one, only
 definitions for previously undefined macros are provided; at level two,
-a multi-arch definition of all architecture dependant macros will be
+a multi-arch definition of all architecture dependent macros will be
 defined.
 
 @item @value{GDBN}_TARGET_IS_HPPA
@@ -3039,7 +3037,7 @@ used instead.
 @findex GET_LONGJMP_TARGET
 For most machines, this is a target-dependent parameter.  On the
 DECstation and the Iris, this is a native-dependent parameter, since
-trhe header file @file{setjmp.h} is needed to define it.
+the header file @file{setjmp.h} is needed to define it.
 
 This macro determines the target PC address that @code{longjmp} will jump to,
 assuming that we have just stopped at a @code{longjmp} breakpoint.  It takes a
@@ -3082,10 +3080,6 @@ On HP-UX, certain system routines (millicode) have names beginning with
 @samp{$} or @samp{$$}.  For example, @code{$$dyncall} is a millicode
 routine that handles inter-space procedure calls on PA-RISC.
 
-@item IEEE_FLOAT
-@findex IEEE_FLOAT
-Define this if the target system uses IEEE-format floating point numbers.
-
 @item INIT_EXTRA_FRAME_INFO (@var{fromleaf}, @var{frame})
 @findex INIT_EXTRA_FRAME_INFO
 If additional information about the frame is required this should be
@@ -3483,18 +3477,6 @@ where @var{valbuf} is the address of the value to be stored.
 The default value of the ``symbol-reloading'' variable.  (Never defined in
 current sources.)
 
-@item TARGET_BYTE_ORDER_DEFAULT
-@findex TARGET_BYTE_ORDER_DEFAULT
-The ordering of bytes in the target.  This must be either
-@code{BIG_ENDIAN} or @code{BFD_ENDIAN_LITTLE}.  This macro replaces
-@code{TARGET_BYTE_ORDER} which is deprecated.
-
-@item TARGET_BYTE_ORDER_SELECTABLE_P
-@findex TARGET_BYTE_ORDER_SELECTABLE_P
-Non-zero if the target has both @code{BIG_ENDIAN} and
-@code{BFD_ENDIAN_LITTLE} variants.  This macro replaces
-@code{TARGET_BYTE_ORDER_SELECTABLE} which is deprecated.
-
 @item TARGET_CHAR_BIT
 @findex TARGET_CHAR_BIT
 Number of bits in a char; defaults to 8.
@@ -3777,7 +3759,7 @@ Several files control @value{GDBN}'s configuration for native support:
 @table @file
 @vindex NATDEPFILES
 @item gdb/config/@var{arch}/@var{xyz}.mh
-Specifies Makefile fragments needed when hosting @emph{or native} on
+Specifies Makefile fragments needed by a @emph{native} configuration on
 machine @var{xyz}.  In particular, this lists the required
 native-dependent object files, by defining @samp{NATDEPFILES=@dots{}}.
 Also specifies the header file which describes native support on
@@ -3785,6 +3767,13 @@ Also specifies the header file which describes native support on
 define @samp{NAT_CFLAGS}, @samp{NAT_ADD_FILES}, @samp{NAT_CLIBS},
 @samp{NAT_CDEPS}, etc.; see @file{Makefile.in}.
 
+@emph{Maintainer's note: The @file{.mh} suffix is because this file
+originally contained @file{Makefile} fragments for hosting @value{GDBN}
+on machine @var{xyz}.  While the file is no longer used for this
+purpose, the @file{.mh} suffix remains.  Perhaps someone will
+eventually rename these fragments so that they have a @file{.mn}
+suffix.}
+
 @item gdb/config/@var{arch}/nm-@var{xyz}.h
 (@file{nm.h} is a link to this file, created by @code{configure}).  Contains C
 macro definitions describing the native system environment, such as
@@ -4154,14 +4143,16 @@ algorithms of @value{GDBN}.
 @cindex cleanups
 
 Cleanups are a structured way to deal with things that need to be done
-later.  When your code does something (like @code{malloc} some memory,
-or open a file) that needs to be undone later (e.g., free the memory or
-close the file), it can make a cleanup.  The cleanup will be done at
-some future point: when the command is finished, when an error occurs,
-or when your code decides it's time to do cleanups.
+later.
 
-You can also discard cleanups, that is, throw them away without doing
-what they say.  This is only done if you ask that it be done.
+When your code does something (e.g., @code{xmalloc} some memory, or
+@code{open} a file) that needs to be undone later (e.g., @code{xfree}
+the memory or @code{close} the file), it can make a cleanup.  The
+cleanup will be done at some future point: when the command is finished
+and control returns to the top level; when an error occurs and the stack
+is unwound; or when your code decides it's time to explicitly perform
+cleanups.  Alternatively you can elect to discard the cleanups you
+created.
 
 Syntax:
 
@@ -4173,32 +4164,75 @@ Declare a variable which will hold a cleanup chain handle.
 @item @var{old_chain} = make_cleanup (@var{function}, @var{arg});
 Make a cleanup which will cause @var{function} to be called with
 @var{arg} (a @code{char *}) later.  The result, @var{old_chain}, is a
-handle that can be passed to @code{do_cleanups} or
-@code{discard_cleanups} later.  Unless you are going to call
-@code{do_cleanups} or @code{discard_cleanups} yourself, you can ignore
-the result from @code{make_cleanup}.
+handle that can later be passed to @code{do_cleanups} or
+@code{discard_cleanups}.  Unless you are going to call
+@code{do_cleanups} or @code{discard_cleanups}, you can ignore the result
+from @code{make_cleanup}.
 
 @findex do_cleanups
 @item do_cleanups (@var{old_chain});
-Perform all cleanups done since @code{make_cleanup} returned
-@var{old_chain}.  E.g.:
+Do all cleanups added to the chain since the corresponding
+@code{make_cleanup} call was made.
+
+@findex discard_cleanups
+@item discard_cleanups (@var{old_chain});
+Same as @code{do_cleanups} except that it just removes the cleanups from
+the chain and does not call the specified functions.
+@end table
+
+Cleanups are implemented as a chain.  The handle returned by
+@code{make_cleanups} includes the cleanup passed to the call and any
+later cleanups appended to the chain (but not yet discarded or
+performed).  E.g.:
 
 @example
 make_cleanup (a, 0); 
-old = make_cleanup (b, 0); 
-do_cleanups (old);
+@{
+  struct cleanup *old = make_cleanup (b, 0); 
+  make_cleanup (c, 0)
+  ...
+  do_cleanups (old);
+@}
 @end example
 
 @noindent
-will call @code{b()} but will not call @code{a()}.  The cleanup that
-calls @code{a()} will remain in the cleanup chain, and will be done
-later unless otherwise discarded.@refill
+will call @code{c()} and @code{b()} but will not call @code{a()}.  The
+cleanup that calls @code{a()} will remain in the cleanup chain, and will
+be done later unless otherwise discarded.@refill
+
+Your function should explicitly do or discard the cleanups it creates.
+Failing to do this leads to non-deterministic behavior since the caller
+will arbitrarily do or discard your functions cleanups.  This need leads
+to two common cleanup styles.
+
+The first style is try/finally.  Before it exits, your code-block calls
+@code{do_cleanups} with the old cleanup chain and thus ensures that your
+code-block's cleanups are always performed.  For instance, the following
+code-segment avoids a memory leak problem (even when @code{error} is
+called and a forced stack unwind occurs) by ensuring that the
+@code{xfree} will always be called:
 
-@findex discard_cleanups
-@item discard_cleanups (@var{old_chain});
-Same as @code{do_cleanups} except that it just removes the cleanups from
-the chain and does not call the specified functions.
-@end table
+@example
+struct cleanup *old = make_cleanup (null_cleanup, 0);
+data = xmalloc (sizeof blah);
+make_cleanup (xfree, data);
+... blah blah ...
+do_cleanups (old);
+@end example
+
+The second style is try/except.  Before it exits, your code-block calls
+@code{discard_cleanups} with the old cleanup chain and thus ensures that
+any created cleanups are not performed.  For instance, the following
+code segment, ensures that the file will be closed but only if there is
+an error:
+
+@example
+FILE *file = fopen ("afile", "r");
+struct cleanup *old = make_cleanup (close_file, file);
+... blah blah ...
+discard_cleanups (old);
+return file;
+@end example
 
 Some functions, e.g. @code{fputs_filtered()} or @code{error()}, specify
 that they ``should not be called when cleanups are not in place''.  This
@@ -4469,8 +4503,8 @@ During its execution, @value{GDBN} can encounter two types of errors.
 User errors and internal errors.  User errors include not only a user
 entering an incorrect command but also problems arising from corrupt
 object files and system errors when interacting with the target.
-Internal errors include situtations where @value{GDBN} has detected, at
-run time, a corrupt or erroneous situtation.
+Internal errors include situations where @value{GDBN} has detected, at
+run time, a corrupt or erroneous situation.
 
 When reporting an internal error, @value{GDBN} uses
 @code{internal_error} and @code{gdb_assert}.
@@ -4517,7 +4551,7 @@ declarations they refer to.  They should not rely on files being
 included indirectly.
 
 With the exception of the global definitions supplied by @file{defs.h},
-a header file should explictily include the header declaring any
+a header file should explicitly include the header declaring any
 @code{typedefs} et.al.@: it refers to.
 
 @code{extern} declarations should never appear in @code{.c} files.
@@ -4715,6 +4749,13 @@ desired target is already available) also edit @file{gdb/configure.tgt},
 setting @code{gdb_target} to something appropriate (for instance,
 @var{xyz}).
 
+@emph{Maintainer's note: Work in progress.  The file
+@file{gdb/configure.host} originally needed to be modified when either a
+new native target or a new host machine was being added to @value{GDBN}.
+Recent changes have removed this requirement.  The file now only needs
+to be modified when adding a new native configuration.  This will likely
+changed again in the future.}
+
 @item
 Finally, you'll need to specify and define @value{GDBN}'s host-, native-, and
 target-dependent @file{.h} and @file{.c} files used for your
@@ -4776,6 +4817,484 @@ files @file{gdb.info*} in the distribution.  Note the plural;
 @code{makeinfo} will split the document into one overall file and five
 or so included files.
 
+@node Releasing GDB
+
+@chapter Releasing @value{GDBN}
+@cindex making a new release of gdb
+
+@section Branch Commit Policy
+
+The branch commit policy is pretty slack.  @value{GDBN} releases 5.0,
+5.1 and 5.2 all used the below:
+
+@itemize @bullet
+@item
+The @file{gdb/MAINTAINERS} file still holds.
+@item
+Don't fix something on the branch unless/until it is also fixed in the
+trunk.  If this isn't possible, mentioning it in the @file{gdb/PROBLEMS}
+file is better than committing a hack
+@item
+When considering a patch for the branch, suggested criteria include:
+Does it fix a build?  Does it fix the sequence @kbd{break main; run}
+when debugging a static binary?
+@item
+The further a change is from the core of @value{GDBN}, the less likely
+the change will worry anyone (e.g., target specific code).
+@item
+Only post a proposal to change the core of @value{GDBN} after you've
+sent individual bribes to all the people listed in the
+@file{MAINTAINERS} file @t{;-)}
+@end itemize
+
+@emph{Pragmatics: Provided updates are restricted to non-core
+functionality there is little chance that a broken change will be fatal.
+This means that changes such as adding a new architectures or (within
+reason) support for a new host are considered acceptable.}
+
+
+@section Obsolete any code
+
+Before anything else, poke the other developers (and around the source
+code) to see there is anything that can be removed from @value{GDBN} (an
+old target, an unused file).
+
+Obsolete code is identified by adding an @code{OBSOLETE} prefix to every
+line.  Doing this means that it is easy to identify obsolete code when
+grepping through the sources.
+
+The process has a number of steps and is intentionally slow --- this is
+to mainly ensure that people have had a reasonable chance to respond.
+Remember, everything on the internet takes a week.
+
+@itemize @bullet
+@item
+announce the change on @email{gdb@@sources.redhat.com, GDB mailing list}
+@item
+wait a week or so
+@item
+announce the change on @email{gdb-announce@@sources.redhat.com, GDB
+Announcement mailing list}
+@item
+wait a week or so
+@item
+go through and edit all relevant files and lines (e.g., in
+@file{configure.tgt}) so that they are prefixed with the word
+@code{OBSOLETE}.
+@end itemize
+
+@emph{Maintainer note: Removing old code, while regrettable, is a good
+thing.  Firstly it helps the developers by removing code that is either
+no longer relevant or simply wrong.  Secondly since it removes any
+history associated with the file (effectively clearing the slate) the
+developer has a much freer hand when it comes to fixing broken files.}
+
+@section Before the branch
+
+The most important objective at this stage is to find and fix simple
+changes that become a pain to track once the branch is created.  For
+instance, configuration problems that stop @value{GDBN} from even
+building.  If you can't get the problem fixed, document it in the
+@file{gdb/PROBLEMS} file.
+
+@subheading Organize and announce the schedule.
+
+The following is a possible schedule.  It is based on the rule-of-thumb
+that everything on the Internet takes a week.  You may want to even
+increase those times further since an analysis of the actual data
+strongly suggests that the below is far to aggressive.
+
+@itemize @bullet
+@item
+announce it
+@item
+wait a week
+@item
+announce branch date
+@item
+wait a week
+@item
+Cut the branch
+@item
+wait a week
+@item
+start enjoying all the fun
+@end itemize
+
+As an aside, the branch tag name is probably regrettable vis:
+@example
+gdb_N_M-YYYY-MM-DD-@{branch,branchpoint@}
+@end example
+
+@subheading Refresh any imported files.
+
+A number of files are taken from external repositories.  They include:
+
+@itemize @bullet
+@item
+@file{texinfo/texinfo.tex}
+@item
+@file{config.guess} et.@: al.@: 
+@end itemize
+
+and should be refreshed.
+
+@subheading Prompt for @file{gdb/NEWS}
+
+People always forget.  Send a post reminding them but also if you know
+something interesting happened add it your self.
+
+@subheading Review @file{gdb/README}
+
+Grab one of the nightly snapshots and then walk through the
+@file{gdb/README} looking for anything that can be improved.
+
+@subheading Check the ARI
+
+ARI is an @code{awk} script (Awk Regression Indicator?) that checks for a
+number of errors and coding conventions.  The checks include things like
+using @code{malloc} instead of @code{xmalloc} and file naming problems.
+There shouldn't be any regressions.
+
+@section Cut the branch
+
+@subheading The dirty work
+
+I think something like the below was used:
+
+@example
+$  d=`date -u +%Y-%m-%d`
+$  echo $d
+2002-01-24
+$  cvs -f -d /cvs/src rtag -D $d-gmt \
+gdb_5_1-$d-branchpoint insight+dejagnu
+$  cvs -f -d /cvs/src rtag -b -r gdb_V_V-$d-branchpoint \
+gdb_5_1-$d-branch insight+dejagnu
+$
+@end example
+
+@itemize @bullet
+@item
+the @kbd{-D YYYY-MM-DD-gmt} forces the branch to an exact date/time.
+@item
+the trunk is first tagged so that the branch point can easily be found
+@item
+Insight (which includes GDB) and dejagnu are tagged at the same time
+@end itemize
+
+@subheading Post the branch info
+
+@subheading Update the web and news pages
+
+@subheading Tweak cron to track the new branch
+
+@section Stabilize the branch
+
+Something goes here.
+
+@section Create a Release
+
+This procedure can be followed when creating beta and final final
+releases.  With a beta many of the steps can be skipped.
+
+@subheading Establish a few defaults.
+
+@example
+$  b=gdb_5_1-2001-07-29-branch
+$  v=5.1.1
+$  t=/sourceware/snapshot-tmp/gdbadmin-tmp
+$  echo $t/$b/$v
+$  mkdir -p $t/$b/$v
+$  cd $t/$b/$v
+$  pwd
+/sourceware/snapshot-tmp/gdbadmin-tmp/gdb_5_1-2001-07-29-branch/5.1.1
+$  which autoconf
+/home/gdbadmin/bin/autoconf
+$
+@end example
+
+NB: Check the autoconf version carefully.  You want to be using the
+version taken from the binutils snapshot directory.  It is most likely
+that your system's installed version (@file{/usr/bin}?) is probably
+correct.
+
+@subheading Check out the relevant modules:
+
+@example
+$  for m in gdb insight dejagnu
+do
+( mkdir -p $m && cd $m && cvs -q -f -d /cvs/src co -P -r $b $m )
+done
+$
+@end example
+
+NB: The reading of @file{.cvsrc} is disabled (@file{-f}) so that there
+isn't any confusion between what is written here and what your local CVS
+really does.
+
+@subheading Update relevant files.
+
+@subsubheading @file{gdb/NEWS}
+
+Major releases get their comments added as part of the mainline.  Minor
+releases should probably mention any significant bugs that were fixed.
+
+Don't forget to update the ChangeLog.
+
+@example
+$  emacs gdb/src/gdb/NEWS
+...
+c-x 4 a
+...
+c-x c-s c-x c-c
+$  cp gdb/src/gdb/NEWS insight/src/gdb/NEWS 
+$  cp gdb/src/gdb/ChangeLog insight/src/gdb/ChangeLog 
+@end example
+
+@subsubheading @file{gdb/README}
+
+You'll need to update: the version, the update date, and who did it.
+
+@example
+$  emacs gdb/src/gdb/README
+...
+c-x 4 a
+...
+c-x c-s c-x c-c
+$  cp gdb/src/gdb/README insight/src/gdb/README 
+$  cp gdb/src/gdb/ChangeLog insight/src/gdb/ChangeLog 
+@end example
+
+@emph{Maintainer note: Hopefully the README file was reviewed before the
+initial branch was cut so just a simple substitute is needed to get it
+updated.}
+
+@emph{Maintainer note: Other projects generate @file{README} and
+@file{INSTALL} from the core documentation.  This might be worth
+pursuing.}
+
+@subsubheading @file{gdb/version.in}
+
+@example
+$  echo $v > gdb/src/gdb/version.in
+$  emacs gdb/src/gdb/version.in
+...
+c-x 4 a
+...
+c-x c-s c-x c-c
+$  cp gdb/src/gdb/version.in insight/src/gdb/version.in 
+$  cp gdb/src/gdb/ChangeLog insight/src/gdb/ChangeLog 
+@end example
+
+@subsubheading @file{dejagnu/src/dejagnu/configure.in}
+
+Dejagnu is more complicated.  The version number is a parameter to
+@var{AM_INIT_AUTOMAKE}.  Tweak it to read something like
+@var{gdb-5.1.1}.
+
+Re-generate configure.
+
+Add a ChangeLog.
+
+@subheading Do the dirty work
+
+This is identical to the process used when creating the daily snapshot.
+
+@example
+$  for m in gdb insight dejagnu
+do
+( cd $m/src && gmake -f Makefile.in $m.tar.bz2 )
+done
+@end example
+
+@subheading Check the source files
+
+You're looking for files that have mysteriously disappeared as the
+@kbd{distclean} has the habit of deleting files it shouldn't.  Watch out
+for the @file{version.in} update @kbd{cronjob}.
+
+@example
+$  ( cd gdb/src && cvs -f -q -n update )
+M djunpack.bat
+? proto-toplev
+? gdb-5.1.1.tar.bz2
+M gdb/ChangeLog
+M gdb/NEWS
+M gdb/README
+M gdb/version.in
+? gdb/p-exp.tab.c
+? gdb/doc/gdb.info-11
+? gdb/doc/gdb.info-12
+? gdb/doc/gdb.info-13
+? gdb/doc/gdb.info-14
+? gdb/doc/gdb.info-15
+? gdb/doc/gdbint.info-4
+? gdb/doc/gdbint.info-5
+$
+@end example
+
+@emph{Don't worry about the @file{gdb.info-??} or
+@file{gdb/p-exp.tab.c}.  They were generated (and yes @file{gdb.info-1}
+was also generated only something strange with CVS means that they
+didn't get supressed).  Fixing it would be nice though.}
+
+@subheading Re-pack the release with @code{gzip}
+
+@example
+$  cp */*/*.bz2 .
+$  bunzip2 -k -v *.bz2
+$  gzip -9 -v *.tar
+@end example
+
+NB: A pipe such as @kbd{bunzip2 < xxx.bz2 | gzip -9 > xxx.gz} shouldn't
+be used since, in that mode, gzip doesn't know the file name information
+and consequently can't include it.  This is also why the release process
+runs @code{tar} and @code{bzip2} as separate passes.
+
+@emph{Maintainer note: The release process could be changed to create
+@file{.tar} rather than @file{.tar.bz2} files.}
+
+@section Check the release
+
+Grab the @file{gdb.tar.bz2}, copy it to your local machine and then try
+a simple build using it.
+
+If this is a pre-release just copy the @file{.bz2} files to the snapshot
+directory and skip the remaining steps.
+
+If it is a final release, also make it available under a bogus name so
+that others can download and check it.
+
+@emph{Maintainer note: This adds an extra day to the release process but
+is very much worth it.  Other developers are given the opportunity to
+check that things like your @file{NEWS} entries are correct or that
+other changes actually work.}
+
+@section Release the tar ball
+
+This is where, unfortunately, the notes just get vague.
+
+@subheading Install on sware
+
+@example
+$  cp *.bz2 *.gz ~ftp/pub/gdb/releases
+@end example
+
+@subheading Create and update the web pages.
+
+Try the following:
+
+@itemize @bullet
+@item
+create the directory @file{htdocs/@var{version}} (e.g., @file{htdocs/5.1.1}
+@item
+copy @file{index.html} and @file{ANNOUNCE} from the previous release
+into the @file{htdocs/@var{version}} directory and edit for content.
+Things like the MD5 sums, @kbd{ls -l} output, the version number and so
+on will need updating.  Add NEWS entries to the @file{ANNOUNCE}.  This
+ensures that the previous announcement is kept somewhere handy.
+@item
+copy the @file{NEWS} from the distro into the
+@file{htdocs/@var{version}} directory, trim down to just the most recent
+news items
+@item
+Add a short (identical) announcement to both @file{htdocs/index.html}
+and @file{htdocs/news/index.html}
+@item
+edit the script @file{htdocs/index.sh} to link in the new release
+number.  Run it across all @file{index.html} files vis @kbd{./index.sh
+index.html */index.html}.
+@item
+grep the @file{htdocs} tree for references to the previous release
+version (@file{htdocs/download/index.html})
+@end itemize
+
+@emph{Maintainer note: This step is too fragile --- it is too easy to
+mis one of the entries and forget to update it.}
+
+@subheading Generate online docs
+
+You need to find the magic command that is used to generate the online
+docs from the @file{.tar.bz2}.  The best way is to look in the output
+from one of the nightly cronjobs and then just edit accordingly.
+Something like:
+
+@example
+$  ~/ss/update-web-docs \
+ ~ftp/pub/gdb/releases/gdb-5.1.1.tar.bz2 \
+ $PWD/www \
+ /www/sourceware/htdocs/gdb/5.1.1/onlinedocs \
+ gdb
+@end example
+
+@subheading Something about @file{ANNOUNCEMENT}
+
+Send the @file{ANNOUNCEMENT} file you created above to:
+
+@itemize @bullet
+@item
+@email{gdb-announce@@sources.redhat.com, GDB Announcement mailing list}
+@item
+The gnu announce list (but delay it a day or so to let things get out).
+@end itemize
+
+@subheading Install it on GNU
+
+At the time of writing, the GNU machine was @kbd{gnudist.gnu.org} in
+@file{~ftp/gnu/gdb} (I think, I'm still waiting for it to copy into my
+home directory).
+
+@section Cleanup
+
+@subheading Commit outstanding changes
+
+In particular you'll need to commit the changes to:
+
+@itemize @bullet
+@item
+@file{gdb/ChangeLog}
+@item
+@file{gdb/version.in}
+@item
+@file{gdb/NEWS}
+@item
+@file{gdb/README}
+@end itemize
+
+@subheading Tag the release
+
+Something like:
+
+@example
+$  d=`date -u +%Y-%m-%d`
+$  echo $d
+2002-01-24
+$  ( cd insight/src/gdb && cvs -f -q update )
+$  ( cd insight/src && cvs -f -q tag gdb_5_1_1-$d-release )
+@end example
+
+Insight is used since that contains more of the release than GDB (yes
+dejagnu doesn't get tagged but I think we can live with that.).
+
+@subheading Restart @file{gdb/version.in}
+
+If @file{gdb/version.in} does not contain an ISO date such as
+@kbd{2002-01-24} then the daily @code{cronjob} won't update it.  Having
+committed all the release changes it can be set to
+@file{5.1.0_0000-00-00-cvs} which will restart things (yes the @kbd{_}
+is important - it affects the snapshot process).
+
+Don't forget the @file{ChangeLog}.
+
+@subheading Merge into trunk
+
+The files committed to the branch may also need changes merged into the
+trunk.
+
+@section Post release
+
+Remove any @code{OBSOLETE} code.
+
 @node Testsuite
 
 @chapter Testsuite
@@ -5106,7 +5625,7 @@ permits, which, since the maintainers have many demands to meet, may not
 be for quite some time.
 
 Please send patches directly to
-@email{gdb-patches@@sourceware.cygnus.com, the @value{GDBN} maintainers}.
+@email{gdb-patches@@sources.redhat.com, the @value{GDBN} maintainers}.
 
 @section Obsolete Conditionals
 @cindex obsolete code
@@ -5139,17 +5658,11 @@ exec.c
 
 @end table
 
+@include fdl.texi
+
 @node Index
 @unnumbered Index
 
 @printindex cp
 
-@c TeX can handle the contents at the start but makeinfo 3.12 can not
-@ifinfo
-@contents
-@end ifinfo
-@ifhtml
-@contents
-@end ifhtml
-
 @bye
This page took 0.050305 seconds and 4 git commands to generate.