Fix __lltrace__ debug feature if the stdout encoding is not UTF-8.
If the stdout encoding is not UTF-8, the first call to
lltrace_resume_frame() indirectly sets lltrace to 0 when calling
unicode_check_encoding_errors() which calls
encodings.search_function().
--- /dev/null
+Fix ``__lltrace__`` debug feature if the stdout encoding is not UTF-8. Patch
+by Victor Stinner.
PyObject *callargs, PyObject *kwdict, int use_tracing);
#ifdef LLTRACE
-static int lltrace;
static void
dump_stack(_PyInterpreterFrame *frame, PyObject **stack_pointer)
{
uint8_t opcode; /* Current opcode */
int oparg; /* Current opcode argument, if any */
_Py_atomic_int * const eval_breaker = &tstate->interp->ceval.eval_breaker;
+#ifdef LLTRACE
+ int lltrace = 0;
+#endif
_PyCFrame cframe;
CallShape call_shape;