mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
_Py_PrintReferenceAddresses(): also print the type name. In real use
I'm finding some pretty baffling output, like reprs consisting entirely of three left parens. At least this will let us know what type the object is (it's not str -- there's no quote character in the repr). New tool combinerefs.py, to combine the two output blocks produced via PYTHONDUMPREFS.
This commit is contained in:
parent
bbb931bebd
commit
21d7d4d5ca
4 changed files with 139 additions and 2 deletions
|
@ -2047,7 +2047,8 @@ _Py_PrintReferenceAddresses(FILE *fp)
|
|||
PyObject *op;
|
||||
fprintf(fp, "Remaining object addresses:\n");
|
||||
for (op = refchain._ob_next; op != &refchain; op = op->_ob_next)
|
||||
fprintf(fp, "%p [%d]\n", op, op->ob_refcnt);
|
||||
fprintf(fp, "%p [%d] %s\n", op, op->ob_refcnt,
|
||||
op->ob_type->tp_name);
|
||||
}
|
||||
|
||||
PyObject *
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue