From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25033 invoked by alias); 12 Jan 2012 06:23:57 -0000 Received: (qmail 25021 invoked by uid 22791); 12 Jan 2012 06:23:55 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,TW_SM,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from fencepost.gnu.org (HELO fencepost.gnu.org) (140.186.70.10) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 12 Jan 2012 06:23:42 +0000 Received: from eliz by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1RlE4a-0005Jz-RF; Thu, 12 Jan 2012 01:23:40 -0500 Date: Thu, 12 Jan 2012 06:47:00 -0000 Message-Id: From: Eli Zaretskii To: asmwarrior CC: dje@google.com, gdb-patches@sourceware.org In-reply-to: <4F0E266C.8080208@gmail.com> (message from asmwarrior on Thu, 12 Jan 2012 08:16:44 +0800) Subject: Re: Building GDB 7.3.92 with MinGW Reply-to: Eli Zaretskii References: <83hb03e9sx.fsf@gnu.org> <838vlfe0k9.fsf@gnu.org> <4F0CD948.8080909@gmail.com> <4F0E266C.8080208@gmail.com> X-IsSubscribed: yes 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: 2012-01/txt/msg00396.txt.bz2 > Date: Thu, 12 Jan 2012 08:16:44 +0800 > From: asmwarrior > CC: gdb-patches@sourceware.org > > I have just look at my notes half years ago(no time to write a complete session right now), the issue is: > In the file: > > build\gdb\config.status > > The value is hard-coded: > > D["DEBUGDIR"]=" \"/mingw/lib/debug\"" > D["DEBUGDIR_RELOCATABLE"]=" 1" > D["GDB_DATADIR"]=" \"/mingw/share/gdb\"" This is not hard-coded, this comes from the --prefix argument you passed to the configure script. In my config.status it shows the correct directory. There's a problem loosely related to the MinGW build, whereby it is customary on MS-Windows to move the built binaries to another machine, e.g. if one downloads pre-built binaries from some site, like the MinGW site. If the --prefix value used by whoever built the package does not fit the end-user's filesystem and/or the top-level directory under which the binary distro is unpacked, then things will not work. So I think in the long run it would be a Good Thing for GDB to try to look for its data files relative to the place where the executable is installed, and not only on Windows. But that is a separate project; at least I would love to see patches along these lines. > It is quite simple to test whether GDB set the python path correctly, just run: > > python print gdb.PYTHONDIR > > If it shows the correct path, then it's good. The above works correctly for me in the GDB I just built with MinGW.