This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: Possible fix for mingw32 directory relocation problems
- From: asmwarrior <asmwarrior at gmail dot com>
- To: Doug Evans <dje at google dot com>
- Cc: Pierre Muller <pierre dot muller at ics-cnrs dot unistra dot fr>, Eli Zaretskii <eliz at gnu dot org>, Tom Tromey <tromey at redhat dot com>, gdb-patches at sourceware dot org
- Date: Tue, 17 Jan 2012 14:11:42 +0800
- Subject: Re: Possible fix for mingw32 directory relocation problems
- References: <4f143c35.4fecd80a.473e.ffffbd75SMTPIN_ADDED@mx.google.com> <CAFVy0AZA2KqDiv+tRyX1RZweLMDw3Q5nsEEm628ixN2WiLdrtw@mail.gmail.com> <CADPb22SvBMEt9=EwMNZE6m+=_jfJZxTt1C2Pn-rH9OpHKUJCJQ@mail.gmail.com> <4F150434.3020102@gmail.com> <CADPb22TK7_csatjnORZoLeuRty9aXM+=hzBykYeWk6XzG-aPjQ@mail.gmail.com>
On 2012-1-17 13:29, Doug Evans wrote:
> On Mon, Jan 16, 2012 at 9:16 PM, asmwarrior <asmwarrior@gmail.com> wrote:
>> On 2012-1-17 13:09, Doug Evans wrote:
>>
>> [- gdb-patches]
>>
>> On Mon, Jan 16, 2012 at 5:07 PM, asm warrior <asmwarrior@gmail.com> wrote:
>>
>> I'm not quite familiar with autoconf either. So, suppose we can put
>> BINDIR in config.h, I think we still have some problem.
>> Those values (DEBUGDIR, GDB_DATADIR, JIT_READER_DIR, BINDIR) were
>> macro definition strings, so there are location are still fixed.
>>
>> But under Windows, I think there are many conditions that gdb.exe and
>> other related gdb's share folder will be copied and pasted to many
>> different paths. So, a true relocate scheme is still necessary.
>>
>> Beyond what GDB has already?
>>
>> [I get the feeling people just aren't listening to me ...]
>>
>> Dear Doug.
>>
>> Sorry, I may slip your messages. (My English is not quite good) or I may not
>> fully understand your idea.
>> I just review your posts under "Building GDB 7.3.92 with MinGW" thread, and
>> you have said:
>>
>> *If* there is a bug here, and it's not pilot error, it feels like
>> perhaps the bug is in relocate_gdb_directory.
>> [Why don't all calls to relocate_gdb_directory require similar treatment?
>> Thus this feels like the wrong way to go.]
>>
>> Maybe if you provide a sample session (and complete session please, no
>> editing to trim it down), that will help.
>>
>>
>> I don't fully understand the above sentences. Sorry.
>> You mean we can change/improve the function body of
>> "relocate_gdb_directory".
> Let's put it this way.
> If we move the definitions of BINDIR and TARGET_SYSTEM_ROOT to config.h,
> what is still broken?
>
> [btw, I'm working on such a patch.]
It looks like under Windows/MinGW, relocation GDB_DATADIR will
internally call a function in libiberty
char *
make_relative_prefix (const char *progname, const char *bin_prefix,
const char *prefix)
Now, the arguments maybe looks like:
progname = "e:/mymingw/bin/gdb.exe" (this is the folder you
copy to)
bin_prefix=BINDIR = "E:/msys/mingw32/msys/1.0/local/bin"
prefix = "/usr/local/share/gdb"
The return value should be a "relative path" to ""e:/mymingw/bin/"
Right?
asmwarrior
PS: I have cc gdb-patches mail list.