Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Jerome Guitton <guitton@adacore.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: gdb-patches@sourceware.org
Subject: Re: Add support for --with-system-gdbinit
Date: Fri, 23 Jan 2009 17:24:00 -0000	[thread overview]
Message-ID: <20090123172446.GJ58143@adacore.com> (raw)
In-Reply-To: <uocy0v5vs.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 725 bytes --]

Eli Zaretskii (eliz@gnu.org):

> > Index: doc/gdb.texinfo
> > ===================================================================
> > RCS file: /cvs/src/src/gdb/doc/gdb.texinfo,v
> > retrieving revision 1.545
> > diff -u -p -r1.545 gdb.texinfo
> > --- doc/gdb.texinfo	14 Jan 2009 11:47:07 -0000	1.545
> > +++ doc/gdb.texinfo	21 Jan 2009 10:52:02 -0000
> 
> This part is approved, with a few minor comments

Thank you for the review Eli. I have attached the new patch; I will commit
it when the other part is approved.


2009-01-23  Daniel Jacobowitz  <dan@codesourcery.com>
	    Jerome Guitton  <guitton@adacore.com>

	* gdb.texinfo (Startup): Document --with-system-gdbinit.
	(System-wide configuration): New section.







[-- Attachment #2: gdb.texinfo.diff --]
[-- Type: text/x-diff, Size: 3284 bytes --]

Index: gdb.texinfo
===================================================================
RCS file: /cvs/src/src/gdb/doc/gdb.texinfo,v
retrieving revision 1.545
diff -u -p -r1.545 gdb.texinfo
--- gdb.texinfo	14 Jan 2009 11:47:07 -0000	1.545
+++ gdb.texinfo	23 Jan 2009 17:20:08 -0000
@@ -1211,7 +1211,13 @@ Sets up the command interpreter as speci
 
 @item
 @cindex init file
-Reads the @dfn{init file} (if any) in your home directory@footnote{On
+Reads the system-wide @dfn{init file} (if @option{--with-system-gdbinit} was
+used when building @value{GDBN}; @pxref{System-wide configuration,
+ ,System-wide configuration and settings}) and executes all the commands in
+that file.
+
+@item
+Reads the init file (if any) in your home directory@footnote{On
 DOS/Windows systems, the home directory is the one pointed to by the
 @code{HOME} environment variable.} and executes all the commands in
 that file.
@@ -1244,6 +1250,9 @@ complaints}) that affect subsequent proc
 and operands.  Init files are not executed if you use the @samp{-nx}
 option (@pxref{Mode Options, ,Choosing Modes}).
 
+To display the list of init files loaded by gdb at startup, you
+can use @kbd{gdb --help}.
+
 @cindex init file name
 @cindex @file{.gdbinit}
 @cindex @file{gdb.ini}
@@ -24304,6 +24313,7 @@ Then give @file{gdb.dvi} to your @sc{dvi
 * Separate Objdir::             Compiling @value{GDBN} in another directory
 * Config Names::                Specifying names for hosts and targets
 * Configure Options::           Summary of options for configure
+* System-wide configuration::   Having a system-wide init file
 @end menu
 
 @node Requirements
@@ -24646,6 +24656,42 @@ There is no convenient way to generate a
 There are many other options available as well, but they are generally
 needed for special purposes only.
 
+@node System-wide configuration
+@section System-wide configuration and settings
+@cindex system-wide init file
+
+@value{GDBN} can be configured to have a system-wide init file;
+this file will be read and executed at startup (@pxref{Startup, , What
+@value{GDBN} does during startup}).
+
+Here is the corresponding configure option:
+
+@table @code
+@item --with-system-gdbinit=@var{file}
+Specify that the default location of the system-wide init file is
+@var{file}.
+@end table
+
+If @value{GDBN} has been configured with the option @option{--prefix=$prefix},
+it may be subject to relocation.  Two possible cases:
+
+@itemize @bullet
+@item 
+If the default location of this init file contains @file{$prefix},
+it will be subject to relocation.  Suppose that the configure options
+are @option{--prefix=$prefix --with-system-gdbinit=$prefix/etc/gdbinit};
+if @value{GDBN} is moved from @file{$prefix} to @file{$install}, the system
+init file is looked for as @file{$install/etc/gdbinit} instead of
+@file{$prefix/etc/gdbinit}.
+
+@item
+By contrast, if the default location does not contain the prefix,
+it will not be relocated.  E.g.@: if @value{GDBN} has been configured with
+@option{--prefix=/usr/local --with-system-gdbinit=/usr/share/gdb/gdbinit},
+then @value{GDBN} will always look for @file{/usr/share/gdb/gdbinit},
+wherever @value{GDBN} is installed.
+@end itemize
+
 @node Maintenance Commands
 @appendix Maintenance Commands
 @cindex maintenance commands

  reply	other threads:[~2009-01-23 17:24 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-14 13:56 Daniel Jacobowitz
2009-01-14 19:39 ` Eli Zaretskii
2009-01-14 19:50   ` Daniel Jacobowitz
2009-01-14 20:22     ` Eli Zaretskii
2009-01-14 20:38       ` Daniel Jacobowitz
2009-01-14 21:55         ` Eli Zaretskii
2009-01-14 23:07           ` Daniel Jacobowitz
2009-01-15  4:10             ` Eli Zaretskii
2009-01-19 14:11     ` Jerome Guitton
2009-01-19 14:20       ` Daniel Jacobowitz
2009-01-19 18:40       ` Eli Zaretskii
2009-01-21 10:54         ` Jerome Guitton
2009-01-21 19:03           ` Eli Zaretskii
2009-01-23 17:24             ` Jerome Guitton [this message]
2009-01-23 22:55               ` Eli Zaretskii
2009-01-28 18:00                 ` Jerome Guitton
2009-01-23 17:42           ` Daniel Jacobowitz
2009-01-26  9:12             ` Jerome Guitton
2009-01-26 14:59               ` Daniel Jacobowitz
2009-01-28 15:06                 ` Jerome Guitton
2009-01-16 11:54 ` Jerome Guitton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090123172446.GJ58143@adacore.com \
    --to=guitton@adacore.com \
    --cc=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox