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

Created on 2008-08-20 01:08 by haypo, last changed 2009-01-30 13:27 by skip.montanaro. This issue is now closed.

Files
File name Uploaded Description Edit
gdbinit.patch haypo, 2008-08-20 01:08 Patch to Misc/gdbinit (py3k)
Messages (4)
msg71501 - (view) Author: STINNER Victor (haypo) * (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 
reimplementation

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

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 (haypo) * (Python committer) Date: 2009-01-29 23:15
The patch is now outdated.
msg80816 - (view) Author: Skip Montanaro (skip.montanaro) * 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.
History
Date User Action Args
2009-01-30 13:27:38skip.montanarosetnosy: + skip.montanaro
messages: + msg80816
2009-01-29 23:15:26hayposetstatus: open -> closed
resolution: out of date
messages: + msg80792
2008-08-24 21:01:33nnorwitzsetnosy: + nnorwitz
messages: + msg71869
2008-08-20 01:08:17haypocreate