Changes between Version 3 and Version 4 of TracTroubleshooting
- Timestamp:
- Nov 3, 2006, 1:48:36 PM (18 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TracTroubleshooting
v3 v4 30 30 31 31 In 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 33 With 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. 34 You should be able to issue interesting commands like `pystack`, `pyframe`, `pylocals`, etc. 32 35 33 36 ==== Debugging Segmentation Faults ==== … … 88 91 The `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. 89 92 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