_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:
Tim Peters 2003-04-18 00:45:59 +00:00
parent bbb931bebd
commit 21d7d4d5ca
4 changed files with 139 additions and 2 deletions

View file

@ -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 *