GDB for Windows 7 X64

3,309 views
Skip to first unread message

Luke Mauldin

unread,
Apr 2, 2012, 8:06:38 PM4/2/12
to golan...@googlegroups.com
For all of you Windows users, do any of you have a good version of GDB for 64 bit that you can direct me to?  I am having trouble finding a good updated version of GDB for 64 bit to debug with.  I am currently using version 7.1 that ships with LiteIDE but it is not compiled with python support.  I have had problems with newer versions of GDB shipped with ming64 ( http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/rubenvb/4.7.0-3/ ) due to the following GDB bug with Go:  http://code.google.com/p/go/issues/detail?id=2818   The issue was reported upstream to GDB  http://sourceware.org/bugzilla/show_bug.cgi?id=13791 but the issue hasn't been touched in over a month.  What are the rest of you Windows users using to debug?

Luke

Brandon Peters

unread,
Apr 2, 2012, 8:44:47 PM4/2/12
to golan...@googlegroups.com
In all seriousness I use printf() when I need to. Between the simple formatting of any type and panic stack traces, I always quickly figure out when and why I have a bug. The cleanliness of my Go programs vs other languages helps a lot.

Luke Mauldin

unread,
Apr 3, 2012, 7:52:52 AM4/3/12
to golan...@googlegroups.com
Yes, I have become accustomed to using printf() as well and I have logged setup to log panic stack traces.  However, it would be nice to be able to step through my code with a recent version of gdb with python support enabled.  What is everyone else doing?

Luke

senior7515

unread,
Apr 3, 2012, 8:34:18 PM4/3/12
to golang-nuts
Couldn't you set up a virtual machine and debug there. I use what most
ppl use : pencil&paper --> printf's --> gdb. Just a suggestion.

Mikhail Strebkov

unread,
Apr 4, 2012, 5:32:23 AM4/4/12
to golan...@googlegroups.com
I use gdb64.exe (works well) which comes with Windows version of GoLangIDE

Luke Mauldin

unread,
Apr 4, 2012, 9:02:44 AM4/4/12
to golan...@googlegroups.com
Yes, I am using that version as well, but it is not compiled with python support so the Go debugging extensions for pretty printing do not load.

Luke

Mikhail Strebkov

unread,
Apr 4, 2012, 9:25:20 AM4/4/12
to golan...@googlegroups.com
I think the best solution is to try to contact VisualFC and ask him for GDB64 source code so that you will be able to compile it with python support.
Or the bug is comming from python support?

Luke Mauldin

unread,
Apr 4, 2012, 9:39:04 AM4/4/12
to golan...@googlegroups.com
The bug is coming from GDB itself. I linked to the bug in the original post.

Luke

Wei guangjing

unread,
Apr 6, 2012, 12:10:49 AM4/6/12
to Luke Mauldin, golan...@googlegroups.com
gdb 7.4 with python support for X64 and X86:
http://code.google.com/p/go-w64/downloads/list

2012/4/4 Luke Mauldin <lukem...@gmail.com>:

Luke Mauldin

unread,
Apr 6, 2012, 7:47:41 AM4/6/12
to golan...@googlegroups.com, Luke Mauldin
Wei,

Thank you for the link.  However, when I run GDB I get the following error:
C:\Users\lmauldin>C:\Users\lmauldin\Downloads\gdb-7.4-python2.6-amd64\bin\gdb
'import site' failed; use -v for traceback
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: No module named os
GNU gdb (GDB) 7.4

Can you provide any assistance?

On Thursday, April 5, 2012 11:10:49 PM UTC-5, Wei guangjing wrote:
gdb 7.4 with python support for X64 and X86:
http://code.google.com/p/go-w64/downloads/list

2012/4/4 Luke Mauldin:

Wei guangjing

unread,
Apr 6, 2012, 11:27:11 PM4/6/12
to Luke Mauldin, golan...@googlegroups.com
2012/4/6 Luke Mauldin <lukem...@gmail.com>:

> Wei,
>
> Thank you for the link.  However, when I run GDB I get the following error:
> C:\Users\lmauldin>C:\Users\lmauldin\Downloads\gdb-7.4-python2.6-amd64\bin\gdb
> 'import site' failed; use -v for traceback
> Traceback (most recent call last):
>   File "<string>", line 1, in <module>
> ImportError: No module named os

try set PYTHONPATH, import sys; print sys.path to make sure find the modules.

Luke Mauldin

unread,
Apr 7, 2012, 5:57:28 PM4/7/12
to golan...@googlegroups.com, Luke Mauldin
Wei,

I set my PYTHONPATH environment variable to my Python installation (a 2.7 installation) and I am still getting the error:
'import site' failed; use -v for traceback
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: No module named os
GNU gdb (GDB) 7.4
.....
Reading symbols from c:\GoExternal\MRASystem/main.exe...done.
Traceback (most recent call last):
  File "c:/GoBuild/go/src/pkg/runtime/runtime-gdb.py", line 18, in <module>
    import sys, re
ImportError: No module named re

It looks like it is loading the correct Go GDB runtime extensions but how can I make it find the module "re"?  In my python folder C:\Python27\Lib there is a file named "re".

Luke

On Friday, April 6, 2012 10:27:11 PM UTC-5, Wei guangjing wrote:
2012/4/6 Luke Mauldin 

Wei guangjing

unread,
Apr 7, 2012, 9:26:40 PM4/7/12
to Luke Mauldin, golan...@googlegroups.com


在 2012年4月8日星期日,Luke Mauldin 写道:
Wei,

I set my PYTHONPATH environment variable to my Python installation (a 2.7 installation) 

Need python 2.6 amd64 installation for gdb-7.4-python-2.6-amd64.

Luke Mauldin

unread,
Apr 8, 2012, 2:48:37 PM4/8/12
to golan...@googlegroups.com, Luke Mauldin
Wei,

Thank you, that works.

Luke
Reply all
Reply to author
Forward
0 new messages