From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32002 invoked by alias); 14 Sep 2018 04:30:50 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 31718 invoked by uid 89); 14 Sep 2018 04:30:30 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-25.6 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KAM_SHORT,RCVD_IN_DNSWL_NONE,RCVD_IN_RP_RNBL,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=bug-gdb@gnu.org, U*bug-gdb, buggdbgnuorg, need X-HELO: gateway33.websitewelcome.com Received: from gateway33.websitewelcome.com (HELO gateway33.websitewelcome.com) (192.185.145.24) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 14 Sep 2018 04:30:25 +0000 Received: from cm11.websitewelcome.com (cm11.websitewelcome.com [100.42.49.5]) by gateway33.websitewelcome.com (Postfix) with ESMTP id D71CE19AEFC for ; Thu, 13 Sep 2018 23:30:05 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id 0fjqgrGHfRPoj0fjygEQCJ; Thu, 13 Sep 2018 23:30:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:MIME-Version :Content-Type:Content-Transfer-Encoding:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=Rpg57/oA5jzrqpKMc+Hovd9jdraXafhp7+uMc05swRg=; b=e63iZfsJ0vmewsmjqoI3GdxGmm YH2doaTe47sqOtsnQdK93tu8DQVOAYeGgSJAmZ+rBElsWQFePgpx4xhz7c2g9uFVobp5eN4AqjzzJ Ya0TWa+Gqm8zVFaaN8sqHEE0W; Received: from 97-122-190-66.hlrn.qwest.net ([97.122.190.66]:38838 helo=bapiya.Home) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from ) id 1g0fjq-000RQB-2q; Thu, 13 Sep 2018 23:29:50 -0500 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [RFA] Update gdb's configure instructions Date: Fri, 14 Sep 2018 04:30:00 -0000 Message-Id: <20180914042946.29248-1-tom@tromey.com> X-SW-Source: 2018-09/txt/msg00448.txt.bz2 gdb's README and configure instructions in the manual are quite out of date. They mention options that haven't existed for many years, among other things. This patch attempts to modernize the instructions somewhat. It is not exhaustive, just an improvement -- more could be done. Perhaps even a couple of the nodes should simply be removed and replaced by references to the Autoconf manual. This also removes the PROBLEMS file, as it seems unused. It hasn't been updated since before the 7.3 release. The README file seems to have been generated from the Texinfo at some point in the past. I did not continue this, but instead edited it separately. gdb/ChangeLog 2018-09-13 Tom Tromey * PROBLEMS: Remove. * README: Update. gdb/doc/ChangeLog 2018-09-13 Tom Tromey * gdb.texinfo (Requirements): Mention C++, GNU make. (Requirements): Sort the table. Add more libraries. (Running Configure): Remove obsolete text. (Separate Objdir): Likewise. (Configure Options): Likewise. --- gdb/ChangeLog | 5 ++ gdb/PROBLEMS | 6 -- gdb/README | 68 +++++++-------------- gdb/doc/ChangeLog | 8 +++ gdb/doc/gdb.texinfo | 143 +++++++++++++++++++++----------------------- 5 files changed, 103 insertions(+), 127 deletions(-) delete mode 100644 gdb/PROBLEMS diff --git a/gdb/PROBLEMS b/gdb/PROBLEMS deleted file mode 100644 index 974f4f0108a..00000000000 --- a/gdb/PROBLEMS +++ /dev/null @@ -1,6 +0,0 @@ - - Known problems in GDB 7.2.50 - - See also: http://www.gnu.org/software/gdb/bugs/ - -None worth mentioning here. diff --git a/gdb/README b/gdb/README index e43887ffcdf..d7ab18ccc6a 100644 --- a/gdb/README +++ b/gdb/README @@ -7,10 +7,8 @@ A summary of new features is in the file `gdb/NEWS'. Check the GDB home page at http://www.gnu.org/software/gdb/ for up to date release information, mailing list links and archives, etc. -The file `gdb/PROBLEMS' contains information on problems identified -late in the release cycle. GDB's bug tracking data base at -http://www.gnu.org/software/gdb/bugs/ contains a more complete list of -bugs. +GDB's bug tracking data base can be found at +http://www.gnu.org/software/gdb/bugs/ Unpacking and Installation -- quick overview @@ -37,9 +35,8 @@ source directory called `gdb-VERSION'. You can build GDB right in the source directory: cd gdb-VERSION - ./configure - make - cp gdb/gdb /usr/local/bin/gdb (or wherever you want) + ./configure --prefix=/usr/local (or wherever you want) + make all install However, we recommend that an empty directory be used instead. This way you do not clutter your source tree with binary files @@ -50,9 +47,8 @@ You can build GDB in any empty build directory: mkdir build cd build - /gdb-VERSION/configure - make - cp gdb/gdb /usr/local/bin/gdb (or wherever you want) + /gdb-VERSION/configure [etc...] + make all install (Building GDB with DJGPP tools for MS-DOS/MS-Windows is slightly different; see the file gdb-VERSION/gdb/config/djgpp/README for details.) @@ -77,8 +73,8 @@ such as: If you get other compiler errors during this stage, see the `Reporting Bugs' section below; there are a few known problems. - GDB requires an ISO C (ANSI C) compiler. If you do not have an ISO -C compiler for your system, you may be able to download and install + GDB requires a C++ compiler. If you do not have a +C++ compiler for your system, you may be able to download and install the GNU CC compiler. It is available via anonymous FTP from the directory `ftp://ftp.gnu.org/pub/gnu/gcc'. GDB also requires an ISO C standard library. The GDB remote server, GDBserver, builds with some @@ -348,14 +344,14 @@ you can use it to test your guesses on abbreviations--for example: Here is a summary of the `configure' options and arguments that are most often useful for building GDB. `configure' also has several other -options not listed here. *note : (configure.info)What Configure Does, -for a full explanation of `configure'. +options not listed here. There are many options to gdb's `configure' +script, some of which are only useful in special situation. +*note : (autoconf.info)Running configure scripts, for a full +explanation of `configure'. configure [--help] [--prefix=DIR] [--srcdir=PATH] - [--norecursion] [--rm] - [--enable-build-warnings] [--target=TARGET] [--host=HOST] [HOST] @@ -392,25 +388,12 @@ prefer; but you may abbreviate option names if you use `--'. Same as `--host=HOST'. If you omit this, GDB will guess; it's quite accurate. -`--norecursion' - Configure only the directory level where `configure' is executed; - do not propagate configuration to subdirectories. - -`--rm' - Remove the configuration that the other arguments specify. - `--enable-build-warnings' When building the GDB sources, ask the compiler to warn about any code which looks even vaguely suspicious. You should only using - this feature if you're compiling with GNU CC. It passes the - following flags: - -Wimplicit - -Wreturn-type - -Wcomment - -Wtrigraphs - -Wformat - -Wparentheses - -Wpointer-arith + this feature if you're compiling with the GNU C++ compiler. It + passes many different warning flags, depending on the exact + version of the compiler you are using. `--enable-werror' Treat compiler warnings as werrors. Use this only with GCC. It @@ -450,10 +433,6 @@ prefer; but you may abbreviate option names if you use `--'. Requires a curses library (ncurses and cursesX are also supported). -`--enable-gdbtk' - Build GDB with the gdbtk GUI interface. Requires TCL/Tk to be - installed. - `--with-libunwind-ia64' Use the libunwind library for unwinding function call stack on ia64 target platforms. @@ -463,7 +442,8 @@ prefer; but you may abbreviate option names if you use `--'. Use the curses library instead of the termcap library, for text-mode terminal operations. -`--enable-profiling' Enable profiling of GDB itself. Necessary if you +`--enable-profiling' + Enable profiling of GDB itself. Necessary if you want to use the "maint set profile" command for profiling GDB. Requires the functions `monstartup' and `_mcleanup' to be present in the standard C library used to build GDB, and also requires a @@ -541,18 +521,12 @@ with the remote.c stub over a serial line. allows remote debugging for Unix applications. GDBserver is only supported for some native configurations, including Sun 3, Sun 4, and Linux. -The file gdb/gdbserver/README includes further notes on GDBserver; in + + The file gdb/gdbserver/README includes further notes on GDBserver; in particular, it explains how to build GDBserver for cross-debugging (where GDBserver runs on the target machine, which is of a different architecture than the host machine running GDB). - There are a number of remote interfaces for talking to existing ROM -monitors and other hardware: - - remote-mips.c MIPS remote debugging protocol - remote-sds.c PowerPC SDS monitor - remote-sim.c Generalized simulator protocol - Reporting Bugs in GDB ===================== @@ -567,7 +541,7 @@ address "bug-gdb@gnu.org". When submitting a bug, please include the GDB version number, and how you configured it (e.g., "sun4" or "mach386 host, -i586-intel-synopsys target"). Since GDB now supports so many +i586-intel-synopsys target"). Since GDB supports so many different configurations, it is important that you be precise about this. If at all possible, you should include the actual banner that GDB prints when it starts up, or failing that, the actual @@ -583,7 +557,7 @@ Graphical interface to GDB -- X Windows, MS Windows Several graphical interfaces to GDB are available. You should check: - http://www.gnu.org/software/gdb/links/ + https://sourceware.org/gdb/wiki/GDB%20Front%20Ends for an up-to-date list. diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index efbec3debff..ce90a862179 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -35131,10 +35131,13 @@ Other packages will be used only if they are found. @heading Tools/Packages Necessary for Building @value{GDBN} @table @asis -@item ISO C90 compiler -@value{GDBN} is written in ISO C90. It should be buildable with any -working C90 compiler, e.g.@: GCC. +@item C@t{++} compiler +@value{GDBN} is written in C@t{++}11. It should be buildable with any +recent C@t{++} compiler, e.g.@: GCC. +@item GNU make +@value{GDBN}'s build system relies on features only found in the GNU +make program. Other variants of @code{make} will not work. @end table @heading Tools/Packages Optional for Building @value{GDBN} @@ -35167,6 +35170,46 @@ Branch trace (@pxref{Branch Trace Format}, @pxref{Branch Trace Configuration Format}) @end itemize +@item Guile +@value{GDBN} can be scripted using GNU Guile. @xref{Guile}. By +default, @value{GDBN} will be compiled if the Guile libraries are +available. You can use the @code{--with-guile} option to request +Guile, and pass either the Guile version number or the file name of +the relevant @code{pkg-config} program to choose a particular version +of Guile. + +@item iconv +@value{GDBN}'s features related to character sets (@pxref{Character +Sets}) require a functioning @code{iconv} implementation. If you are +on a GNU system, then this is provided by the GNU C Library. Some +other systems also provide a working @code{iconv}. + +If @value{GDBN} is using the @code{iconv} program which is installed +in a non-standard place, you will need to tell @value{GDBN} where to find it. +This is done with @option{--with-iconv-bin} which specifies the +directory that contains the @code{iconv} program. + +On systems without @code{iconv}, you can install GNU Libiconv. If you +have previously installed Libiconv, you can use the +@option{--with-libiconv-prefix} option to configure. + +@value{GDBN}'s top-level @file{configure} and @file{Makefile} will +arrange to build Libiconv if a directory named @file{libiconv} appears +in the top-most source directory. If Libiconv is built this way, and +if the operating system does not provide a suitable @code{iconv} +implementation, then the just-built library will automatically be used +by @value{GDBN}. One easy way to set this up is to download GNU +Libiconv, unpack it, and then rename the directory holding the +Libiconv source code to @samp{libiconv}. + +@item lzma +@value{GDBN} can support debugging sections that are compressed with +the LZMA library. @xref{MiniDebugInfo}. If this library is not +included with your operating system, you can find it in the xz package +at @url{http://tukaani.org/xz/}. If it is installed in an unusual +path, you can use the @option{--with-lzma-prefix} option to specify +its location. + @item MPFR @anchor{MPFR} @value{GDBN} can use the GNU MPFR multiple-precision floating-point @@ -35182,6 +35225,13 @@ expression evaluation when the target uses different floating-point formats than the host. If GNU MPFR it is not available, @value{GDBN} will fall back to using host floating-point arithmetic. +@item Python +@value{GDBN} can be scripted using Python language. @xref{Python}. +By default, @value{GDBN} will be compiled if the Python libraries are +available. You can use the @code{--with-python} option to request +Python, and pass the file name of the relevant @code{python} +executable to choose a particular installation of Python. + @item zlib @cindex compressed debug sections @value{GDBN} will use the @samp{zlib} library, if available, to read @@ -35193,30 +35243,6 @@ information in such binaries. The @samp{zlib} library is likely included with your operating system distribution; if it is not, you can get the latest version from @url{http://zlib.net}. - -@item iconv -@value{GDBN}'s features related to character sets (@pxref{Character -Sets}) require a functioning @code{iconv} implementation. If you are -on a GNU system, then this is provided by the GNU C Library. Some -other systems also provide a working @code{iconv}. - -If @value{GDBN} is using the @code{iconv} program which is installed -in a non-standard place, you will need to tell @value{GDBN} where to find it. -This is done with @option{--with-iconv-bin} which specifies the -directory that contains the @code{iconv} program. - -On systems without @code{iconv}, you can install GNU Libiconv. If you -have previously installed Libiconv, you can use the -@option{--with-libiconv-prefix} option to configure. - -@value{GDBN}'s top-level @file{configure} and @file{Makefile} will -arrange to build Libiconv if a directory named @file{libiconv} appears -in the top-most source directory. If Libiconv is built this way, and -if the operating system does not provide a suitable @code{iconv} -implementation, then the just-built library will automatically be used -by @value{GDBN}. One easy way to set this up is to download GNU -Libiconv, unpack it, and then rename the directory holding the -Libiconv source code to @samp{libiconv}. @end table @node Running Configure @@ -35260,14 +35286,10 @@ source for the library of opcode tables and disassemblers @item gdb-@value{GDBVN}/readline source for the @sc{gnu} command-line interface - -@item gdb-@value{GDBVN}/glob -source for the @sc{gnu} filename pattern-matching subroutine - -@item gdb-@value{GDBVN}/mmalloc -source for the @sc{gnu} memory-mapped malloc package @end table +There may be other subdirectories as well. + The simplest way to configure and build @value{GDBN} is to run @file{configure} from the @file{gdb-@var{version-number}} source directory, which in this example is the @file{gdb-@value{GDBVN}} directory. @@ -35281,20 +35303,14 @@ For example: @smallexample cd gdb-@value{GDBVN} -./configure @var{host} +./configure make @end smallexample -@noindent -where @var{host} is an identifier such as @samp{sun4} or -@samp{decstation}, that identifies the platform where @value{GDBN} will run. -(You can often leave off @var{host}; @file{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} -libraries, then @code{gdb} itself. The configured source files, and the -binaries, are left in the corresponding source directories. +Running @samp{configure} and then running @code{make} builds the +included supporting libraries, then @code{gdb} itself. The configured +source files, and the binaries, are left in the corresponding source +directories. @need 750 @file{configure} is a Bourne-shell (@code{/bin/sh}) script; if your @@ -35302,16 +35318,9 @@ system does not recognize this automatically when you run a different shell, you may need to run @code{sh} on it explicitly: @smallexample -sh configure @var{host} +sh configure @end smallexample -If you run @file{configure} from a directory that contains source -directories for multiple libraries or programs, such as the -@file{gdb-@value{GDBVN}} source directory for version @value{GDBVN}, -@file{configure} -creates configuration files for every directory level underneath (unless -you tell it not to, with the @samp{--norecursion} option). - You should run the @file{configure} script from the top directory in the source tree, the @file{gdb-@var{version-number}} directory. If you run @file{configure} from one of the subdirectories, you will configure only @@ -35322,11 +35331,9 @@ configuration of @file{bfd}, @file{readline}, and other sibling directories of the @file{gdb} subdirectory. This leads to build errors about missing include files such as @file{bfd/bfd.h}. -You can install @code{@value{GDBP}} anywhere; it has no hardwired paths. -However, you should make sure that the shell on your path (named by -the @samp{SHELL} environment variable) is publicly readable. Remember -that @value{GDBN} uses the shell to start your program---some systems refuse to -let @value{GDBN} debug child processes whose programs are not readable. +You can install @code{@value{GDBP}} anywhere. The best way to do this +is to pass the @code{--prefix} option to @code{configure}, and then +install it with @code{make install}. @node Separate Objdir @section Compiling @value{GDBN} in Another Directory @@ -35355,7 +35362,7 @@ separate directory for a Sun 4 like this: cd gdb-@value{GDBVN} mkdir ../gdb-sun4 cd ../gdb-sun4 -../gdb-@value{GDBVN}/configure sun4 +../gdb-@value{GDBVN}/configure make @end group @end smallexample @@ -35441,18 +35448,17 @@ directory (@file{gdb-@value{GDBVN}}, for version @value{GDBVN}). @section @file{configure} Options Here is a summary of the @file{configure} options and arguments that -are most often useful for building @value{GDBN}. @file{configure} also has -several other options not listed here. @inforef{What Configure -Does,,configure.info}, for a full explanation of @file{configure}. +are most often useful for building @value{GDBN}. @file{configure} +also has several other options not listed here. @inforef{Running +configure scripts,,autoconf.info}, for a full +explanation of @file{configure}. @smallexample configure @r{[}--help@r{]} @r{[}--prefix=@var{dir}@r{]} @r{[}--exec-prefix=@var{dir}@r{]} @r{[}--srcdir=@var{dirname}@r{]} - @r{[}--norecursion@r{]} @r{[}--rm@r{]} @r{[}--target=@var{target}@r{]} - @var{host} @end smallexample @noindent @@ -35475,8 +35481,6 @@ Configure the source to install programs under directory @c avoid splitting the warning from the explanation: @need 2000 @item --srcdir=@var{dirname} -@strong{Warning: using this option requires @sc{gnu} @code{make}, or another -@code{make} that implements the @code{VPATH} feature.}@* Use this option to make configurations in directories separate from the @value{GDBN} source directories. Among other things, you can use this to build (or maintain) several configurations simultaneously, in separate @@ -35486,21 +35490,12 @@ directory @var{dirname}. @file{configure} creates directories under the working directory in parallel to the source directories below @var{dirname}. -@item --norecursion -Configure only the directory level where @file{configure} is executed; do not -propagate configuration to subdirectories. - @item --target=@var{target} Configure @value{GDBN} for cross-debugging programs running on the specified @var{target}. Without this option, @value{GDBN} is configured to debug programs that run on the same machine (@var{host}) as @value{GDBN} itself. There is no convenient way to generate a list of all available targets. - -@item @var{host} @dots{} -Configure @value{GDBN} to run on the specified @var{host}. - -There is no convenient way to generate a list of all available hosts. @end table There are many other options available as well, but they are generally -- 2.17.1