Edgewall Software

Changes between Version 3 and Version 4 of TracTroubleshooting


Ignore:
Timestamp:
Nov 3, 2006, 1:48:36 PM (18 years ago)
Author:
Christian Boos
Comment:

Moved the paragraph about gdbinit right below #SystemErrors

Legend:

Unmodified
Added
Removed
Modified
  • TracTroubleshooting

    v3 v4  
    3030
    3131In this case, the first thing to do is to identify the subsystem involved, by getting the ''stack trace'' of the process. This can be done using `gdb` on Unix or [http://www.microsoft.com/whdc/devtools/debugging/default.mspx WinDbg] on Windows (or MS Developer Studio).
     32
     33With GDB, you can also make the link between the C stack trace and the Python backtrace. For this, you need to teach `gdb` a few additional commands: Get the following  [http://svn.python.org/view/python/trunk/Misc/gdbinit gdbinit] script, and "source" it.
     34You should be able to issue interesting commands like `pystack`, `pyframe`, `pylocals`, etc.
    3235
    3336==== Debugging Segmentation Faults ====
     
    8891The `bt` command is what gives you the "backtrace" of the program, usually the most interesting bit of information. You can also resume execution of the program (using `cont`) and interrupt the process a bit later, to see if it remains hanged in the same area. In case there's no hang (you "attached" to it just for curiosity),  you can also `detach` from the process and it will continue to work unaffected.
    8992
    90 Now, if you want to make the link between the C stack trace and the Python backtrace, you need to teach `gdb` a few additional commands: Get the following  [http://svn.python.org/view/python/trunk/Misc/gdbinit gdbinit] script, and "source" it.
    91 You should be able to issue interesting commands like `pystack`, `pyframe`, `pylocals`, etc.
    92 
    93