Closed
Description
I suggest to include the following in opcode.h:
#ifdef Py_DEBUG
const char *const _PyOpcode_OpName[256] = {
[0] = "CACHE",
[1] = "POP_TOP",
...
[255] = "DO_TRACING",
};
#endif
The goal is to make debugging easier. Possible uses:
- This would greatly improve the readability of the output of the LLTRACE feature of ceval.
- This could help make opcode stats files readable between different interpreters without worry of opcode mismatches.
- Other debugging faculties like the
#if 0
-ed outdump_instr
anddump_basicblock
ofcompile.c
become easier to understand. - One-off printf-style debugging of ceval.c and related functionality becomes easier.