User forums > Using Code::Blocks

Debug a DLL with Python

(1/3) > >>

simbalsyd:
Hi

I have a DLL created by Code::Blocks and it works fine with Python 2.7. Sometimes it would be nice to debug the DLL but I can't figure out how to do it. Any ideas on how to do it?

I am compiling with GCC and I use Windows XP and Windows 7.


Best regards
Anders

oBFusCATed:
Have you tried Debug->Attach to process?

simbalsyd:
Yes I tried to attach to the Python process but maybe I should attach to another process?

/Anders

renega_666:
What happened when you tried to attach to the python process? Is your dll compiled with debug informations?

I debug my python extensions using codblocks and attach to process without any troubles on windows xp, windows 7 and GNU/Linux.

simbalsyd:
The dll is built with "Produce debugging symbols" -g

Do I need to set more options?


When I attach to the Python process I get the following:

Starting debugger:
done
Registered new type: wxString
Registered new type: STL String
Registered new type: STL Vector
Setting breakpoints
Reading symbols from C:\Python27\python.exe...(no debugging symbols found)...done.
Debugger name and version: GNU gdb (GDB) 7.2

I have set a breakpoint and it seems like the debugger stops there (I guess from watching the console output)

When I click on "Debug / Continue" I get a segmentation fault:


Child process PID: 7588
Program received signal SIGSEGV, Segmentation fault.
In ntdll!RtlpWaitForCriticalSection () (C:\WINDOWS\system32\ntdll.dll)

The DLL works perfectly together with Python without the debugger.

Any ideas?

Navigation

[0] Message Index

[#] Next page

Go to full version