On 2013-12-9 23:01, Alexpux wrote:
> 
> 09 дек. 2013 г., в 18:48, asmwarrior 
> <asmwarrior-re5jqeeqqe8avxtiumw...@public.gmane.org 
> <mailto:asmwarrior-re5jqeeqqe8avxtiumw...@public.gmane.org>> написал(а):
>  
>>
>> Hi, thanks for your work.
>> I just download this one: i686-4.8.2-release-posix-dwarf-rt_v3-rev1.7z
>>
>> I would like to use this GCC toolchain to build GDB with Python support.
> 
> Our toolchain has GDB builded with Python support.

Thanks for the reply, but I just want to build GDB myself, because I have 
several local GDB patches (against GDB git head) to workaround some GDB issue 
under Windows.

>>
>> I was using the official Python Windows installer, and build GDB against the 
>> official Python dll, since the official Python was build with MSVC, and link 
>> against msvcr90.dll. The result GDB will have both link to msvcrt.dll and 
>> msvcr90.dll(indirectly through python27.dll), this may cause some potential 
>> problems since they have different c-run-time libraries.
>>
>> Now, I would try to link against the Python import library shipped with the 
>> MinGW-Build i686-4.8.2-release-posix-dwarf-rt_v3-rev1.7z.
>>
>> Question 1:
>> I found that there are two .a files: libpython2.7.a and libpython2.7.dll.a, 
>> both under: 
>> \i686-4.8.2-release-posix-dwarf-rt_v3-rev1\mingw32\opt\lib\python2.7\config 
>> folder.
>> So, which should I use?
>>
> dll.a

OK.

> 
>> Question 2:
>> I can't find the python header files.
> <toolchain>/opt/include/python2.7

Well, I don't see a folder named "include" under the "opt" folder, is this a 
package error?

>>
>> Question 3:
>> When build GDB against official python installation, I just add some option 
>> to GDB toplevel configure like:
>> --with-python=/python/python
>> Where under MSYS, I have a mount that 
>> E:\code\python27    /python
>> (More details on how to build GDB can be found my own wiki page [1])
>> Note that E:\code\python27 is the folder I install the official python 
>> 2.7.x, so if I would like to link to the shipped python, what is the correct 
>> configure option?
>>
> https://github.com/Alexpux/mingw-builds/blob/develop/scripts/gdb.sh#L55-L78
> 
> To link with our Python you MUST add «-D__USE_MINGW_ANSI_STDIO=1» to CFLAGS 
> and CXXFLAGS

Thanks, I see, the related option is: 
--with-python=$PREFIX/opt/bin/python-config.sh

>> Question 4:
>> What does 
>> https://github.com/niXman/mingw-builds/blob/master/sources/gdb-wrapper/gdb-wrapper.c
>>  used for? I vaguely remember you have some script code to rename the 
>> GDB.exe to some other name, and renamed gdb-wrapper.exe to GDB.exe. It does 
>> some PYTHONPATH related changes, but refer to Ruben's post here [2], it is 
>> quite safe to put the python27.dll along side the gdb.exe and put all the 
>> python script files under bin folder too.
> 
> This is wrapper to start GDB with Python from opt subfolder.
OK, I see.

BTW: Is it possible to include the expat and zlib library in MinGW-toolchain. 
If not, I need to build them before build GDB.

Thanks.






------------------------------------------------------------------------------
Sponsored by Intel(R) XDK 
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to