Message200527
| Author |
gvanrossum |
| Recipients |
gvanrossum, pitrou |
| Date |
2013年10月20日.00:23:23 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1382228605.25.0.0617949824826.issue19306@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
I was confused for a while when seeing the thread stacks dumped by the faulthandler module. (See issue 19293.)
I propose the following tweaks of the output to make this more obvious. The first chunk changes the header written when called as _Py_DumpTraceback(), the second change the per-thread headers printed by _Py_DumpTracebackThreads().
diff -r 02f6922e6a7e Python/traceback.c
--- a/Python/traceback.c Sat Oct 19 17:04:25 2013 -0700
+++ b/Python/traceback.c Sat Oct 19 17:19:29 2013 -0700
@@ -603,7 +603,7 @@
unsigned int depth;
if (write_header)
- PUTS(fd, "Traceback (most recent call first):\n");
+ PUTS(fd, "Stack (most recent call first):\n");
frame = _PyThreadState_GetFrame(tstate);
if (frame == NULL)
@@ -642,7 +642,7 @@
else
PUTS(fd, "Thread 0x");
dump_hexadecimal(sizeof(long)*2, (unsigned long)tstate->thread_id, fd);
- PUTS(fd, ":\n");
+ PUTS(fd, " (most recent call first):\n");
}
const char* |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2013年10月20日 00:23:25 | gvanrossum | set | recipients:
+ gvanrossum, pitrou |
| 2013年10月20日 00:23:25 | gvanrossum | set | messageid: <1382228605.25.0.0617949824826.issue19306@psf.upfronthosting.co.za> |
| 2013年10月20日 00:23:25 | gvanrossum | link | issue19306 messages |
| 2013年10月20日 00:23:23 | gvanrossum | create |
|