Re: Building GDB 7.3.92 with MinGW

asmwarrior
2012-01-11T04:30:40Z

On 2012-1-11 12:05, Eli Zaretskii wrote:
>> Date: Wed, 11 Jan 2012 08:35:20 +0800
>> From: asmwarrior<asmwarrior@gmail.com>
>>
>> On 2012-1-11 5:23, Doug Evans wrote:
>>> For one, remembering to pass -data-directory is a pain.
>> This parameter does not work correctly under MinGW in the case that I would like gdb to automatically run the python script when it startup.
>>
>> Normally, my gdb is put in MinGW/bin, and the gdb's own python script is under:
>> MinGW\share\gdb\python\gdb\*.py
>>
>> I need to hard-code the code in gdb/main.c to set the data-directory value. (Because gdb is build from MSYS+MinGW, but it run normally on Windows shell without MSYS)
> Can you explain why the original code doesn't work as intended? And
> what is MSYS have to do with that?
>
> Thanks.
Hi, I was originally open a discussion on the Codeblocks' forum

http://forums.codeblocks.org/index.php/topic,15104.0.html

The major problem is:

gdb/main.c (setting the gdb's python folder) execute before we use data-directory to set the python path, so whether you set -data-directory, you always failed to find its own python script.

You can check my patch and see what I adjust the path, so gdb can find and run its own python script correctly.

This issue is that MSYS+autoconf system use different path scheme with normal mingw. But when you run gdb under normal mingw, you still have some internal variables which is MSYS style.

asmwarrior
ollydbg from codeblocks' forum