From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30535 invoked by alias); 17 Apr 2009 17:41:22 -0000 Received: (qmail 30526 invoked by uid 22791); 17 Apr 2009 17:41:21 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from mel.act-europe.fr (HELO mel.act-europe.fr) (212.99.106.210) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 17 Apr 2009 17:41:16 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id EE60C2900E0; Fri, 17 Apr 2009 19:41:13 +0200 (CEST) Received: from mel.act-europe.fr ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Lg7o7SiWZAR4; Fri, 17 Apr 2009 19:41:13 +0200 (CEST) Received: from cardhu.act-europe.fr (cardhu.act-europe.fr [10.10.0.168]) by mel.act-europe.fr (Postfix) with ESMTP id 4CFCC29005A; Fri, 17 Apr 2009 19:41:13 +0200 (CEST) Received: by cardhu.act-europe.fr (Postfix, from userid 560) id 407B11D0; Fri, 17 Apr 2009 19:41:13 +0200 (CEST) Date: Fri, 17 Apr 2009 17:41:00 -0000 From: Jerome Guitton To: Eli Zaretskii Cc: Daniel Jacobowitz , gdb-patches@sourceware.org Subject: Re: Setting up GDB init files broken in DJGPP Message-ID: <20090417174113.GA4851@adacore.com> References: <83ljq3m999.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="SUOF0GtieIMvvwua" Content-Disposition: inline In-Reply-To: <83ljq3m999.fsf@gnu.org> User-Agent: Mutt/1.4.1i 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 X-SW-Source: 2009-04/txt/msg00454.txt.bz2 --SUOF0GtieIMvvwua Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 998 Eli Zaretskii (eliz@gnu.org): > AFAICS, this change: > > 2009-01-28 Daniel Jacobowitz > Jerome Guitton > > * 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 * main.c (captured_main): Move gdbinit lookups after gdb_init. --SUOF0GtieIMvvwua Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="main.c.diff" Content-length: 1216 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 --SUOF0GtieIMvvwua--