aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Python/executor.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2023-08-07 21:36:25 -0700
committerGitHub <noreply@github.com>2023-08-07 21:36:25 -0700
commit328d925244511b2134d5ac926e307e4486ff4500 (patch)
tree5664372efae8658277c3a175bbd42065b533d362 /Python/executor.c
parent2df58dcd500dbedc61d0630374f9e94c522fe523 (diff)
downloadcpython-328d925244511b2134d5ac926e307e4486ff4500.tar.gz
cpython-328d925244511b2134d5ac926e307e4486ff4500.zip
gh-107758: Improvements to lltrace feature (#107757)
- The `dump_stack()` method could call a `__repr__` method implemented in Python, causing (infinite) recursion. I rewrote it to only print out the values for some fundamental types (`int`, `str`, etc.); for everything else it just prints `<type_name @ 0xdeadbeef>`. - The lltrace-like feature for uops wrote to `stderr`, while the one in `ceval.c` writes to `stdout`; I changed the uops to write to stdout as well.
Diffstat (limited to 'Python/executor.c')
-rw-r--r--Python/executor.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/executor.c b/Python/executor.c
index 57525df202d..4a18618c0c6 100644
--- a/Python/executor.c
+++ b/Python/executor.c
@@ -41,7 +41,7 @@ _PyUopExecute(_PyExecutorObject *executor, _PyInterpreterFrame *frame, PyObject
lltrace = *uop_debug - '0'; // TODO: Parse an int and all that
}
#define DPRINTF(level, ...) \
- if (lltrace >= (level)) { fprintf(stderr, __VA_ARGS__); }
+ if (lltrace >= (level)) { printf(__VA_ARGS__); }
#else
#define DPRINTF(level, ...)
#endif