This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: Building GDB 7.3.92 with MinGW
> Date: Thu, 12 Jan 2012 08:16:44 +0800
> From: asmwarrior <asmwarrior@gmail.com>
> 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.