This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: Fix gdbinit for Python 3.0
Type: enhancement Stage:
Components: None Versions: Python 3.0
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: nnorwitz, skip.montanaro, vstinner
Priority: normal Keywords: patch

Created on 2008-08-20 01:08 by vstinner, last changed 2022-04-11 14:56 by admin. This issue is now closed.

File name Uploaded Description Edit
gdbinit.patch vstinner, 2008-08-20 01:08 Patch to Misc/gdbinit (py3k)
Messages (4)
msg71501 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2008-08-20 01:08
I'm trying to track down a bug in Python 3.0 (or my program?). I fixed 
some functions of gdbinit:
 - pystack and pylocals: use the new function py_printstr
 - lineno: call CPython "PyCode_Addr2Line" instead of ugly gdb 

New functions:
 - py_decref: decrement the reference counter and *always* call 
 - py_printstr: display a string as UTF-8 using printf "%s" and 

Problem: PyUnicode_AsUTF8String() is unknown, so I have to use 
PyUnicodeUCS2_AsUTF8String... (but it can be UCS4)

I'm unable to test pylocals, I don't know the good context to test it. 
In PyEval_EvalFrameEx if fails because "f" is unknown but pystack 
works and pystack calls lineno which uses "f" !?
msg71869 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2008-08-24 21:01
I fixed some problems in r66016.  This patch seems like it has other
things which might be useful, so I'll keep it open until it's handled.
msg80792 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2009-01-29 23:15
The patch is now outdated.
msg80816 - (view) Author: Skip Montanaro (skip.montanaro) * (Python triager) Date: 2009-01-30 13:27
The gdbinit file for Python 3 is still broken.  I've not been able to
figure out how to get a string encoded as utf-8 from a Unicode object
without needing a process around.  If you require a process then
gdbinit becomes much less useful since it won't work with core files.
Date User Action Args
2022-04-11 14:56:37adminsetgithub: 47860
2009-01-30 13:27:38skip.montanarosetnosy: + skip.montanaro
messages: + msg80816
2009-01-29 23:15:26vstinnersetstatus: open -> closed
resolution: out of date
messages: + msg80792
2008-08-24 21:01:33nnorwitzsetnosy: + nnorwitz
messages: + msg71869
2008-08-20 01:08:17vstinnercreate