pgdb: Debugging Python extensions made easier

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • SteveD

    pgdb: Debugging Python extensions made easier

    Hi guys,



    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.
  • Paul Rubin

    #2
    Re: pgdb: Debugging Python extensions made easier

    SteveD <steve.j.donova n@gmail.comwrit es:
    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.

    Comment

    • SteveD

      #3
      Re: pgdb: Debugging Python extensions made easier

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



      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.

      On Apr 15, 2:41 am, Paul Rubin <http://phr...@NOSPAM.i nvalidwrote:
      SteveD <steve.j.dono.. .@gmail.comwrit es:
      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.

      Comment

      • Paul Rubin

        #4
        Re: pgdb: Debugging Python extensions made easier

        SteveD <steve.j.donova n@gmail.comwrit es:
        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.

        Comment

        Working...