如何在Windows 7上安装具有Python支持的GDB [英] How to install GDB with Python support on Windows 7

查看:804
本文介绍了如何在Windows 7上安装具有Python支持的GDB的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要调试cython代码。官方文件说,我需要安装gdb 7.2或更高版本,使用Python支持构建。不幸的是,我没有找到任何分步指南如何在Windows 7上安装。我必须自己建立(如何?)或已经存在一个Windows 7,64位的安装程序?任何帮助将不胜感激。



我使用Windows 7,Python 2.7 64bit和Visual Studio 2008.



也欢迎有关调试cython(特别是非控制台视觉调试器)的替代方法的建议。感谢您的帮助!

解决方案

与所有GNU项目一样,GDB作为源代码提供。好消息是,这意味着它可以建立在几乎任何平台上运行。坏消息是,除非有人已经为您确定过程,否则您必须自己做。 GDB将在几乎所有的Linux发行版内置内置,但是您可以使用Windows。



您基本上有三个选项:


  1. 将开发(或至少调试)移至Linux。这听起来不是那么难。您可以使用 VirtualBox (它是GPL下的免费软件)轻松在Windows内部的虚拟机中运行Linux。


  2. 使用Windows内的 Cygwin 进行调试。 Cygwin在GPL下是免费的,允许您在Windows中运行类似Linux的环境。它包括大部分GNU软件,包括最新版本的GDB


  3. 如果你感觉特别冒险,可以尝试自己编译GDB来在Windows系统上工作。这是迄今为止最难的路线,只适用于Windows平台上熟悉编程的人。


我强烈建议您使用Linux进行任何严重的Python开发,尤其是使用不具有大型开发人员社区的Python扩展时。


I need to debug cython code. Official documentation says, I need to install "gdb 7.2 or higher, built with Python support". Unfortunately I didn't find any step-by-step guide how to install it on Windows 7. Do I have to build it myself (how?) or there already exists an installer for Windows 7, 64 bit? Any help would be greatly appreciated.

I use Windows 7, Python 2.7 64bit and Visual Studio 2008.

Also suggestions about alternative ways to debug cython (especially concerning non-console visual debuggers) are welcome. Thanks in advance for your help!

解决方案

As with all GNU projects, GDB is provided as source code. The good news is that this means it can be built to run on practically any platform. The bad news is that, unless someone has already figured the process out for you, you have to do it yourself. GDB will be provided built-in on virtually any Linux distribution, but with Windows you're on your own.

You basically have three options:

  1. Move development (or at least debugging) over to Linux. This isn't as hard as it sounds. You can easily run Linux within a virtual machine inside Windows using VirtualBox, which is free software under GPL.

  2. Do debugging using a Cygwin shell inside windows. Cygwin is free under the GPL and allows you to run a Linux-like environment in Windows. It includes most of the GNU software, including the latest release of GDB.

  3. If you're feeling particularily adventurous, you could try to compile GDB yourself to work on your Windows system. This is by far the hardest route, and only for someone familiar with programming on Windows platforms.

In the end, I would strongly recommend using Linux for any serious Python development, especially when using Python extensions that do not have large developer communities.

这篇关于如何在Windows 7上安装具有Python支持的GDB的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆