From: Jerome Guitton <guitton@adacore.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Daniel Jacobowitz <drow@false.org>, gdb-patches@sourceware.org
Subject: Re: Setting up GDB init files broken in DJGPP
Date: Fri, 17 Apr 2009 17:41:00 -0000 [thread overview]
Message-ID: <20090417174113.GA4851@adacore.com> (raw)
In-Reply-To: <83ljq3m999.fsf@gnu.org>
[-- Attachment #1: Type: text/plain, Size: 998 bytes --]
Eli Zaretskii (eliz@gnu.org):
> AFAICS, this change:
>
> 2009-01-28 Daniel Jacobowitz <dan@codesourcery.com>
> Jerome Guitton <guitton@adacore.com>
>
> * configure, config.in: Regenerated.
> * configure.ac: Add --with-system-gdbinit.
> * main.c (get_init_files): New.
> (captured_main): Use get_init_files. Load system gdbinit before
> $HOME/.gdbinit.
> (print_gdb_help): Print location of init files.
>
> broke the DJGPP port, in that it now looks for ~/.gdbinit rather than
> ~/gdb.ini. (The former is an invalid file name on DOS filesystems.)
Sorry about that. I confirm that the fix that you suggest is OK:
moving get_init_files before gdb_init was obviously an error. I've
tested the patch in attachment, it works fine and the testsuite showed
no regression on x86-linux. Can you confirm that it fixes the problem
you are seeing?
2009-04-17 Jerome Guitton <guitton@adacore.com>
* main.c (captured_main): Move gdbinit lookups after gdb_init.
[-- Attachment #2: main.c.diff --]
[-- Type: text/plain, Size: 1216 bytes --]
Index: gdb/main.c
===================================================================
RCS file: /cvs/src/src/gdb/main.c,v
retrieving revision 1.73
diff -u -p -r1.73 main.c
--- gdb/main.c 28 Jan 2009 15:01:00 -0000 1.73
+++ gdb/main.c 17 Apr 2009 17:24:35 -0000
@@ -357,8 +357,6 @@ captured_main (void *data)
}
}
- get_init_files (&system_gdbinit, &home_gdbinit, &local_gdbinit);
-
/* There will always be an interpreter. Either the one passed into
this captured main, or one specified by the user at start up, or
the console. Initialize the interpreter to the one requested by
@@ -694,6 +692,11 @@ Excess command line arguments ignored. (
control of the console via the deprecated_init_ui_hook (). */
gdb_init (argv[0]);
+ /* Lookup gdbinit files. Note that the gdbinit file name may be overriden
+ during file initialization, so get_init_files should be called after
+ gdb_init. */
+ get_init_files (&system_gdbinit, &home_gdbinit, &local_gdbinit);
+
/* Do these (and anything which might call wrap_here or *_filtered)
after initialize_all_files() but before the interpreter has been
installed. Otherwize the help/version messages will be eaten by
next prev parent reply other threads:[~2009-04-17 17:41 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-14 17:32 Eli Zaretskii
2009-04-17 17:41 ` Jerome Guitton [this message]
2009-04-17 19:10 ` Eli Zaretskii
2009-04-22 19:38 ` Joel Brobecker
2009-04-22 20:22 ` Jerome Guitton
2009-04-22 20:26 ` Joel Brobecker
2009-04-27 10:25 ` 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=20090417174113.GA4851@adacore.com \
--to=guitton@adacore.com \
--cc=drow@false.org \
--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