Discussion:
[Python-3000-checkins] r66016 - in python/branches/py3k/Misc: NEWS gdbinit
neal.norwitz
2008-08-24 20:59:23 UTC
Permalink
Author: neal.norwitz
Date: Sun Aug 24 22:59:23 2008
New Revision: 66016

Log:
Fix gdbinit to handle new types/APIs.

Modified:
python/branches/py3k/Misc/NEWS
python/branches/py3k/Misc/gdbinit

Modified: python/branches/py3k/Misc/NEWS
==============================================================================
--- python/branches/py3k/Misc/NEWS (original)
+++ python/branches/py3k/Misc/NEWS Sun Aug 24 22:59:23 2008
@@ -33,6 +33,11 @@
- Issue #3643: Added a few more checks to _testcapi to prevent segfaults by
exploitation of poor argument checking.

+Tools/Demos
+-----------
+
+- Fix Misc/gdbinit so it works.
+

What's new in Python 3.0b3?
===========================

Modified: python/branches/py3k/Misc/gdbinit
==============================================================================
--- python/branches/py3k/Misc/gdbinit (original)
+++ python/branches/py3k/Misc/gdbinit Sun Aug 24 22:59:23 2008
@@ -32,7 +32,7 @@
while $_i < f->f_nlocals
if f->f_localsplus + $_i != 0
set $_names = co->co_varnames
- set $_name = PyUnicode_AsString(PyTuple_GetItem($_names, $_i))
+ set $_name = _PyUnicode_AsString(PyTuple_GetItem($_names, $_i))
printf "%s:\n", $_name
# side effect of calling _PyObject_Dump is to dump the object's
# info - assigning just prevents gdb from printing the
@@ -50,7 +50,7 @@
set $__co = f->f_code
set $__lasti = f->f_lasti
set $__sz = ((PyVarObject *)$__co->co_lnotab)->ob_size/2
- set $__p = (unsigned char *)((PyStringObject *)$__co->co_lnotab)->ob_sval
+ set $__p = (unsigned char *)((PyBytesObject *)$__co->co_lnotab)->ob_sval
set $__li = $__co->co_firstlineno
set $__ad = 0
while ($__sz-1 >= 0 && $__continue)
@@ -73,8 +73,8 @@
end

define pyframe
- set $__fn = (char *)((PyStringObject *)co->co_filename)->ob_sval
- set $__n = PyUnicode_AsString(co->co_name)
+ set $__fn = _PyUnicode_AsString(co->co_filename)
+ set $__n = _PyUnicode_AsString(co->co_name)
printf "%s (", $__fn
lineno
printf "): %s\n", $__n

Loading...