Hi guys, Regarding GDB and Python:
I've got some WIP Python patches that were created for Necessitas Qt Creator's NDK GDB for Android. They've since been merged into the Google NDK: https://android-review.googlesource.com/#/c/38501/ Using the patches in that merge request, it's possible to build Python (and then GDB with that Python) using mingw-w64 (on Linux so far, MSYS build is WIP) for both win32 and win64. The patch also generates a shell script to replace python-config (which unfortunately uses Python) so that GDB can pick up the right configuration details automatically when used in a cross compilation setting. The only missing part is setting PYTHONHOME env. var from within GDB. The attached (and pretty horribly complicated) patch gives an example of how this is done in the context of the NDK (I needed to do lots of guess work and probing as I'm not sure what the final relative layout will be- it should be as easy as calling GetModuleFileName and stripping off some path elements). Cheers, Ray. p.s. There's patches for Python 3.3.0b as well in http://mingw-and-ndk.googlecode.com/files/python-273-and-330b1-patches-WIP.7z p.p.s. There's built Android NDKs that use this on my googlecode site as well. On Sat, Jul 21, 2012 at 4:25 PM, Ruben Van Boxem <vanboxem.ru...@gmail.com> wrote: > 2012/7/21 asmwarrior <asmwarr...@gmail.com> >> >> On 2012-7-21 15:07, Eran Ifrah wrote: >> > >> > >> > On Sat, Jul 21, 2012 at 7:59 AM, asmwarrior >> > <asmwarrior-re5jqeeqqe8avxtiumw...@public.gmane.org >> > <mailto:asmwarr...@gmail.com>> wrote: >> > >> > On 2012-7-21 11:38, K. Frank wrote: >> > > As I mentioned above, my gdb version is 7.3.0. >> > > >> > >> >You can try a recent gdb (mostly the gdb build from gdb cvs >> > HEAD) >> > > If anybody knows of a recent mingw or mingw-w64 build of gdb >> > > that addresses this issue, please chime in. >> > > >> > You can try my build of gdb CVS (32bit) >> > see: >> > >> > http://forums.codeblocks.org/index.php/topic,11301.msg77000.html#msg77000 >> > >> > Thanks. There is one (minor?) problem with your gdb: it seems to >> > requires python installation... and the binaries are quite huge >> > I prefer the current MinGW way packing things: everything in a single >> > directory and there is no need to alter 'PATH' not to mention that python >> > pollutes C:\Windows\ ... (and other places?), which makes it hard to move >> > around my working environment >> >> Yes, the gdb build by me has dependency on python 2.7, but in-fact, you >> don't need to put python.exe's path in your PATH environment. >> If I remember correctly, you can just copy "python27.dll" and the folder >> "Lib", and maybe some msvcrt.dll to your MinGW/bin, the gdb should work >> fine. And I believe that using this way, the whole gdb package should be >> portable. I mean the official python27.dll was build from MSVC, so you need >> some MS crt dlls, besides that, python27.dll will automatically search its >> own library named "Lib" in the same folder. >> After such copying, you can safely uninstall your python distribution, >> because all you needed is copied to MinGW/bin. >> >> I'm just a little lazy to package my build gdb with such python files. > > > You can see here what's needed for Python GDB. My builds come with > python-enabled gdb too. Only the python27.dll and the lib/ directory inside > "bin" is necessary for correct Qt and Qt Creator functionality. > > Ruben > >> >> > >> > On the bright side, your gdb seems to be the fastest from the all the >> > gdb's I have tested so far. >> > The thing that did the change was changing the workflow a littlet: >> > >> > * start gdb >> > * break at main >> > * place pending breakpoints >> > * continue >> > >> > as opposed to: >> > >> > * start gdb >> > * place pending breakpoints >> > * continue >> >> The above two method should not have many difference from my point of >> view, I know a little about how gdb handling "pending breakpoints", when a >> new dll loaded, gdb try to see the sources of the dll may matches the >> pending bps, so it mainly scan all the debug information in the dll. The >> more dll loaded, the more time you needed. >> >> BTW: I usually debug codeblocks(which have 10+ plugins as dlls) under gdb, >> I see gdb works just fine. (start up quite soon when you have pending bps) >> >> asmwarrior >> >> >> ------------------------------------------------------------------------------ >> Live Security Virtual Conference >> Exclusive live event will cover all the ways today's security and >> threat landscape has changed and how IT managers can respond. Discussions >> will include endpoint security, mobile security and the latest in malware >> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >> _______________________________________________ >> Mingw-w64-public mailing list >> Mingw-w64-public@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/mingw-w64-public > > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Mingw-w64-public mailing list > Mingw-w64-public@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/mingw-w64-public >
0007-find-python.patch
Description: Binary data
------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public