This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Building GDB 7.3.92 with MinGW


On 2012-1-15 6:32, Pierre Muller wrote:

After some debugging, I believe that the main problem is related to the fact that we use msys environment (which has msys specific mounts) to compile a mingw32 GDB executable that knows nothing about those msys mount points!

  config.h
get several entries with directories.
All but WITH_PYTHON_PATH (which is mingw32 compatible)
are msys paths:
  DEBUGDIR, GDB_DATADIR and JIT_READER_DIR
but those msys pathes are not interpreted correctly by
a mingw32 executable (i.e. gdb.exe itself).

   I do believe that this is an error in the mingw32 configuration
and that it should be fixed in those configuration files...

   As an example I tried to use --prefix=/e/pas/fpc-2.6.0
msys /e/ corresponds to e:/ in mingw32,
but
(gdb) py print gdb.PYTHONDIR
e:\e\pas\fpc-2.6.0\share\gdb/python
Of course, this path doesn't even exist on my computer!
If I do substitute /e/ by e:/ inside config.h
and at least get an existing path as output of (gdb) py print gdb.PYTHONDIR

   The bad part is that msys doesn't have a
equivalent of cygpath utitlity, so that I proposed
a solution above, but I have no idea about how
to really implement that solution...

Pierre Muller




Hi, thank you very much for the testing, and I'm totally agree with you.

In my hacky patch, I use one Windows API function:
#ifdef _WIN32
int get_app_fullpath(char *location, int length)
{
    int len = GetModuleFileName(0, location, length);
    return len;
}
#endif

This, I get the path of the gdb.exe, then I adjust the path to get the "share" folder.

asmwarrior
ollydbg from codeblocks' forum


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]