[Python-il] [pyweb-il:4286] pdb talk

Shai Berger shai at platonix.com
Sat Nov 22 17:37:37 IST 2014


On Friday 21 November 2014 21:37:22 Dotan Cohen wrote:
> 
> Thanks. I also noticed that the course description does in fact
> mention Python, as in "build several automated debugging tools in
> Python". It doesn't mention that the tools are for debugging Python
> code, though I suppose that is implicit.
>
Since the course mentioned Python (but no other languages) as a prerequisite, 
I suppose you are right. But in general, you should be aware that gdb has an 
embedded Python interpreter (since version 7 I think) so you can automate C or 
C++ debugging actions in Python. Also, there's a script you can download -- I 
don't remember where from -- which allows you to debug Python programs in gdb; 
this is very useful if you're working with extensions. With this script, you 
can e.g. see the full mixed-language call stack, and examine variables in each 
language etc.

Have fun,
	Shai.


More information about the Python-il mailing list