473,785 Members | 3,388 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

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

Peter
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
http://sebsauvage.net/python/mingw.html 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
http://ruby.wag.caltech.edu/Tutorial...-debugger.html

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
debugger.

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
0 2281

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
2279
by: Jesper Olsen | last post by:
Hi, I have a C-extention build with distutils that I would like to debug. How can I specify to distuils to pass option "-g" and not "-O2" along to the compiler (gcc)? Jesper
49
4152
IDE
by: Thomas Lindgaard | last post by:
Hello I am probably going to start a war now... but so be it :) I just want to hear what all you guys who eat pythons for breakfast use for python coding. Currently I use Kate, but I would really like an IDE with debugger and a source browser (ie. one the I can use to browse through modules etc. when looking for just the right curses stuff and such - I am a newcomer to Python).
3
3039
by: Joseph S. | last post by:
1)I get startup error messages: "Unable to load dynamic library c:\php\php_curl.dll - the specified file cannot be found" although the file is very much there at exactly that location Not only for this file but for many extension files like php_mysql.dll, php_oracle.dll, php_mssql.dll, php_exif.dll etc. 2)the extensions_dir setting is "c:\php" without an ending backslash. 3)The php.ini file is residing at c:\php
13
2940
by: python | last post by:
hello and thanks for reading this, i have been a dos/windows user using some form of the basic language for 30 years now. i own and run a small programming company and there is one feature that keeps me in the windows/basic world. while i will agree that it has not evolved well, it does have one awesome feature that i have yet to see replicated in any linux product that i know about so far. i am a long time windows user and have had...
0
2063
by: Joseph S. | last post by:
hi all, debugging PHP applications interactively is possible, easy and free. I am talking about PHPEclipse and using it for debugging over several scripts or debugging through a session. Since I have wasted a lot of time writing echo statements all over the code in order to confirm program flow and watch variables, I feel I must share this with others who will be facing similar problems. PHPEclispe users can go to Step 5 directly....
5
6397
by: John Henry | last post by:
I am back against the wall trying to migrate my multithreaded application from Python 2.3 to 2.5. The part of the code that's failing has to do with queues (2.3 queues and 2.5 queues are not the same). Since WingIDE doesn't support multithread debugging (they've been saying that one day they might support that - and that was 2003), I am starting to look for alternatives. debug under Eclipse/Pydev. I did a google search of this...
1
1718
by: chewie54 | last post by:
Hi All, Has anyone used eclipse to develop and debug c or c++ extensions for python? Is it possible to you PyDev and CDT with eclipes to get an integrated environment in which I could debug both Python and C using the debuggers in each plugin respectively? If not, how do others develop and debug c or c++ python extensions?
7
1800
by: Anthony | last post by:
Hi, I'm a FoxPro programmer, but I want to learn python before it's too late. I do a lot of statistical programming, so I import SPSS into python. In my opinion, the best features of Visual FoxPro 9.0 were: a) Intellisense (tells you what classes/methods are available and what variables go into a function) b) Code Completion (guesses your code after four letters) c) Data-Orientation; multiple data sessions can be open, data can be...
4
1869
by: Propad | last post by:
Hello, I know this issue pops up once in a while, but I haven't found a good answer to it. I need to debug a long running application under windows. The application is a combined java/python framework for testing ECUs in the automotive industry. Basically, the Java GUI (Eclipse-based) starts test-cases written in Python and provides the console where the test-logs are seen. When there is a exception somewhere in the testcases (or the...
0
9643
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9480
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8971
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7496
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6737
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4046
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3645
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2877
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.