[pypy-svn] r70760 - pypy/branch/c-traceback/pypy/translator/c/src
arigo at codespeak.net
arigo at codespeak.net
Thu Jan 21 19:30:57 CET 2010
Author: arigo
Date: Thu Jan 21 19:30:57 2010
New Revision: 70760
Modified:
pypy/branch/c-traceback/pypy/translator/c/src/debug_traceback.h
Log:
Print "..." if the traceback is interrupted because
the buffer is not long enough.
Modified: pypy/branch/c-traceback/pypy/translator/c/src/debug_traceback.h
==============================================================================
--- pypy/branch/c-traceback/pypy/translator/c/src/debug_traceback.h (original)
+++ pypy/branch/c-traceback/pypy/translator/c/src/debug_traceback.h Thu Jan 21 19:30:57 2010
@@ -84,9 +84,16 @@
at the start of the file. */
fprintf(stderr, "RPython traceback:\n");
skipping = 0;
- i = (pypydtcount - 1) & (PYPY_DEBUG_TRACEBACK_DEPTH-1);
- while (i != pypydtcount)
+ i = pypydtcount;
+ while (1)
{
+ i = (i - 1) & (PYPY_DEBUG_TRACEBACK_DEPTH-1);
+ if (i == pypydtcount)
+ {
+ fprintf(stderr, " ...\n");
+ break;
+ }
+
location = pypy_debug_tracebacks[i].location;
etype = pypy_debug_tracebacks[i].exctype;
has_loc = location != NULL && location != PYPYDTPOS_RERAISE;
@@ -113,7 +120,6 @@
skipping = 1; /* RERAISE: skip until "f:17, &KeyError" */
}
}
- i = (i - 1) & (PYPY_DEBUG_TRACEBACK_DEPTH-1);
}
}
More information about the Pypy-commit
mailing list