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: Possible fix for mingw32 directory relocation problems


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.





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