From 2b5fe3a12aa4c6cea2d6f3d0301f53983c0a4dd7 Mon Sep 17 00:00:00 2001 From: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com> Date: Thu, 23 Oct 2025 19:03:20 +0100 Subject: [PATCH] debug changes --- Python/ceval.c | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/Python/ceval.c b/Python/ceval.c index 3ca837829499..ada9a9fd736c 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -1222,27 +1222,20 @@ tier2_dispatch: uopcode = next_uop->opcode; #ifdef Py_DEBUG if (frame->lltrace >= 4) { - if (next_uop->opcode != _YIELD_VALUE && - next_uop->opcode != _FOR_ITER_GEN_FRAME && - next_uop->opcode != _PUSH_FRAME && - next_uop->opcode != _PY_FRAME_KW && - next_uop->opcode != _SAVE_RETURN_OFFSET && - next_uop->opcode != _SAVE_RETURN_OFFSET) { - if (next_uop->opcode != _START_EXECUTOR) { - if (next_uop->format == UOP_FORMAT_TARGET) { - _Py_CODEUNIT *aim = _PyFrame_GetBytecode(frame) + next_uop->target; + if (next_uop->opcode != _START_EXECUTOR) { + if (next_uop->format == UOP_FORMAT_TARGET) { + _Py_CODEUNIT *aim = _PyFrame_GetBytecode(frame) + next_uop->target; + printf(" aim=[%s]\n", _PyOpcode_OpName[aim->op.code]); + } + else if (next_uop->format == UOP_FORMAT_JUMP) { + _PyUOpInstruction *aim_uop = current_executor->trace + next_uop->jump_target; + if (aim_uop->format == UOP_FORMAT_TARGET) { + _Py_CODEUNIT *aim = _PyFrame_GetBytecode(frame) + aim_uop->target; printf(" aim=[%s]\n", _PyOpcode_OpName[aim->op.code]); } - else if (next_uop->format == UOP_FORMAT_JUMP) { - _PyUOpInstruction *aim_uop = current_executor->trace + next_uop->jump_target; - if (aim_uop->format == UOP_FORMAT_TARGET) { - _Py_CODEUNIT *aim = _PyFrame_GetBytecode(frame) + aim_uop->target; - printf(" aim=[%s]\n", _PyOpcode_OpName[aim->op.code]); - } - } } - dump_stack(frame, stack_pointer); } + dump_stack(frame, stack_pointer); if (next_uop->opcode == _START_EXECUTOR) { printf("%4d uop: ", 0); } -- 2.47.3