Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: Jerome Guitton <guitton@adacore.com>
Cc: Eli Zaretskii <eliz@gnu.org>, Daniel Jacobowitz <drow@false.org>,
		gdb-patches@sourceware.org
Subject: Re: Setting up GDB init files broken in DJGPP
Date: Wed, 22 Apr 2009 19:38:00 -0000	[thread overview]
Message-ID: <20090422193812.GD22514@adacore.com> (raw)
In-Reply-To: <20090417174113.GA4851@adacore.com>

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

> 2009-04-17  Jerome Guitton  <guitton@adacore.com>
> 
> 	* main.c (captured_main): Move gdbinit lookups after gdb_init.

This looks fine, but I propose we move this call further down, past
the blocks that do an early exist if --version or --help is specified,
as well as past the interpreter initialization. If those fail, no point
in spending time computing these files. That also corresponds better
to what used to be done before.

I'm testing the attached patch... (Jerome is supposed to be on holiday)

-- 
Joel

[-- Attachment #2: gdbinit.diff --]
[-- Type: text/x-diff, Size: 1064 bytes --]

commit 9493d644c2a2cb3464cf139515be528a6e140ffe
Author: Joel Brobecker <brobecker@adacore.com>
Date:   Wed Apr 22 12:35:50 2009 -0700

        * main.c (captured_main): Move gdbinit lookups further down,
        making sure it's not called until the basename of the gdbinit file
        has been set.

diff --git a/gdb/main.c b/gdb/main.c
index 86607d3..2f6cd75 100644
--- a/gdb/main.c
+++ b/gdb/main.c
@@ -359,8 +359,6 @@ captured_main (void *data)
 	}
     }
 
-  get_init_files (&system_gdbinit, &home_gdbinit, &local_gdbinit);
-
 #ifdef RELOC_SRCDIR
   add_substitute_path_rule (RELOC_SRCDIR,
 			    make_relative_prefix (argv[0], BINDIR,
@@ -778,6 +776,8 @@ Excess command line arguments ignored. (%s%s)\n"),
   quit_pre_print = error_pre_print;
   warning_pre_print = _("\nwarning: ");
 
+  get_init_files (&system_gdbinit, &home_gdbinit, &local_gdbinit);
+
   /* Read and execute the system-wide gdbinit file, if it exists.
      This is done *before* all the command line arguments are
      processed; it sets global parameters, which are independent of

  parent reply	other threads:[~2009-04-22 19:38 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
2009-04-17 19:10   ` Eli Zaretskii
2009-04-22 19:38   ` Joel Brobecker [this message]
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=20090422193812.GD22514@adacore.com \
    --to=brobecker@adacore.com \
    --cc=drow@false.org \
    --cc=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=guitton@adacore.com \
    /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