Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Jerome Guitton <guitton@adacore.com>
To: gdb@sourceware.org
Subject: Re: global, target-specific, init files
Date: Mon, 15 Dec 2008 11:59:00 -0000	[thread overview]
Message-ID: <20081215115830.GI34644@adacore.com> (raw)
In-Reply-To: <20081214183532.GB28806@caradoc.them.org>

Daniel Jacobowitz (drow@false.org):

> On Sun, Dec 14, 2008 at 01:45:49PM +0100, Jerome Guitton wrote:
> > To deal with these two problems, here is what I would suggest:
> > 1) Have target-specific gdb init files, named after the configure target
> > name (e.g. .powerpc-elf-gdbinit). .gdbinit would be the target-independant
> > gdb init file;
> > 2) Have "global" init files located in <prefix>/etc (if the gdb executable
> > is installed in <prefix>/bin; <prefix> would be re-computed by gdb at run
> > time, just like gcc does for GCC_PREFIX).
> 
> You should be able to use one solution to solve both of your
> problems.  Pass the name of the global initialization file on GDB's
> configure line, and put $target in the name of the file.  Have
> the target-specific file load any global file.

Let me make sure that I understand your suggestion. We would have a new
configure option in gdb, let's say --global-init-file=GDBINIT;
GDBINIT would be the name of this global init file; the path to
this init file would be <prefix>/etc/GDBINIT (would it)?

About the target-specific file, I am not sure I understand your
suggestion. I am confused: I was talking about three target-specific
files, actually. Let's say: the global target-specific init, the
user-specific target-specific init (in $HOME), the local
target-specific init (in current dir). Not sure that these three
options are really useful. In the scenario that I gave, only the
global target-specific init is needed. So my question would be: which
target-specific are you actually referring to?


> I can save you some time, if you'd like.  I recently posted a patch
> for user-defined subcommands; the other half of the project which
> produced that patch was a global gdbinit file, and I can separate out
> the rest of that patch for you this week.

That would certainly be very useful, thanks!


  reply	other threads:[~2008-12-15 11:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-14 12:46 Jerome Guitton
2008-12-14 18:36 ` Daniel Jacobowitz
2008-12-15 11:59   ` Jerome Guitton [this message]
2008-12-15 15:43     ` Daniel Jacobowitz
2008-12-15 16:46       ` Jerome Guitton
2008-12-18 19:50         ` Michael Snyder
2009-01-14 13:37           ` 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=20081215115830.GI34644@adacore.com \
    --to=guitton@adacore.com \
    --cc=gdb@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