pgdb: Debugging Python extensions made easier

S

SteveD

Hi guys,

http://luaforge.net/frs/?group_id=327

pgdb.zip is an addition to scite-debug, which adds source debugging to
the popular SciTE programmer's editor. gdbpy.zip is a standalone
version which can be run from Emacs.

These allow you to single-step from Python to C code in a debugger
session.

To use pgdb, install scite-debug (either on top of an existing SciTE
installation or with one of the packaged all-in-one versions) and
unzip into the same directory.

gdbpy requires Lua 5.1, but there are no other dependencies. In both
cases, read the release notes.

I know the FAQ says that this is not possible, but the FAQ is somewhat
outdated. GDB is quite happy with pending breakpoints to unresolved
libraries, but you have to reassure it. This technique is a
generalization of one that I used to solve the equivalent problem with
debugging Lua extensions.

steve d.
 
P

Paul Rubin

SteveD said:
pgdb.zip is an addition to scite-debug, which adds source debugging to
the popular SciTE programmer's editor. ...
I know the FAQ says that this is not possible, but the FAQ is somewhat
outdated. GDB is quite happy with pending breakpoints to unresolved
libraries, but you have to reassure it.

I'm not sure what FAQ or what is supposed to be impossible but
I've used gdb in the past to debug python extensions without
running into insurmountable problems that I remember.
 
S

SteveD

They are not insurmontable problems. But you will still see things
like this:

http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/66510

The point being that with a newish GDB (the current mingw GDB
is still 5.x) there's no need for such tedious tricks, since
it handles pending breakpoints fine. The additional trick I
use for debugging plain non-debug python is to use symbol-file
to load some arbitrary symbols, so GDB will not complain
about breakpoints.

steve d.
 
P

Paul Rubin

SteveD said:
The point being that with a newish GDB (the current mingw GDB

I think I was using an older gdb, but under linux, so it's possible
that under mingw there are or were different issues.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,905
Latest member
Kristy_Poole

Latest Threads

Top