Author: Armin Rigo <ar...@tunes.org> Branch: Changeset: r87624:9573c6ca1519 Date: 2016-10-08 12:26 +0200 http://bitbucket.org/pypy/pypy/changeset/9573c6ca1519/
Log: Use the same format for tracebacks, but mention in the header that line numbers can be off diff --git a/pypy/module/faulthandler/dumper.py b/pypy/module/faulthandler/dumper.py --- a/pypy/module/faulthandler/dumper.py +++ b/pypy/module/faulthandler/dumper.py @@ -35,10 +35,10 @@ else: _dump(fd, ' File "') _dump(fd, pycode.co_filename) - _dump(fd, '" in ') + _dump(fd, '", line ') + _dump_nonneg_int(fd, pycode.co_firstlineno) + _dump(fd, " in ") _dump(fd, pycode.co_name) - _dump(fd, ", from line ") - _dump_nonneg_int(fd, pycode.co_firstlineno) if loc == traceback.LOC_JITTED: _dump(fd, " [jitted]") elif loc == traceback.LOC_JITTED_INLINED: diff --git a/pypy/module/faulthandler/faulthandler.c b/pypy/module/faulthandler/faulthandler.c --- a/pypy/module/faulthandler/faulthandler.c +++ b/pypy/module/faulthandler/faulthandler.c @@ -141,7 +141,8 @@ pypy_faulthandler_write(fd, my == p ? "Current thread 0x" : "Thread 0x"); pypy_faulthandler_write_hex(fd, (unsigned long)p->thread_ident); - pypy_faulthandler_write(fd, " (most recent call first):\n"); + pypy_faulthandler_write(fd, " (most recent call first," + " approximate line numbers):\n"); array_length = vmprof_get_traceback(p->vmprof_tl_stack, my == p ? ucontext : NULL, @@ -153,7 +154,8 @@ _RPython_ThreadLocals_Release(); } else { - pypy_faulthandler_write(fd, "Stack (most recent call first):\n"); + pypy_faulthandler_write(fd, "Stack (most recent call first," + " approximate line numbers):\n"); array_length = vmprof_get_traceback(NULL, ucontext, array_p, FRAME_DEPTH_N); fn(fd, array_p, array_length); _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit