By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,375 Members | 1,376 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,375 IT Pros & Developers. It's quick & easy.

Debugging python with c++ extensions under windows with eclipse CDT

P: n/a
Hello all,

I would like to debug my python libraries, written in c++, with GDB
(gnu debugger)
I'm using the mingw compiler in a windows environment. As development
environment I use eclipse with the CDT plugin. This plugin also has a
nice GUI frontend for the GDB.

I've already tried several setups, no setup seemed to work.

Therefore my first question simply is: has anybody already succeeded in
using the GDB used by eclipse CDT to debug a c++ extension?
Is this actually the best way to debug DLLs in windows? Is visual
studio better suited for the job? Is there another option I am not
aware of?

thx a lot for reading so far

In the following section I explain in detail what I've already tried.
It can easily be skipped.

Ok, an overview of the things I've already done:
first, to use mingw with the python distribution, I've first followed in order to get an adjusted
libpython23.a Otherwise you cannot use the mingw compiler with python
under windows

In order to debug my code, I've found in this newsgroup the topic:
"Debugging python with C++ extensions"
and similar I've found

I've tried somewhat similar in my eclipse CDT environment:
I start a python script, which pauses at a point I've inserted:
a = raw_input("")

Now I can start the GDB and attach it to this running python process...

In eclipse this is "right mouse click" > debug > debug > "c/c++ attach
to local application"
I create a new configuration of this type, fill in the correct DLL.
(making sure my binary parser was correct, this is usually the problem
if you can't find any binaries)

all this did not same to work...

I get an error" Cannot access memory at address 0x68f52bcc
Cannot access memory at address 0x68f52bcc"
and I no longer understand anything which is going on in the the

So again the basic question is: has anybody already succeeded in using
the GDB for debugging python c++ libraries in windows?
Does this also work when you use the eclipse environment?

once again, kind regards

Jul 19 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.