From: Carl Meyer Date: Thu, 14 Sep 2023 14:28:21 +0000 (-0600) Subject: dump readable opcode names in flowgraph debug utility (#109392) X-Git-Tag: v3.13.0a1~439 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1ce9ea0453f7dc69dd41684f3bc9310259513de8;p=thirdparty%2FPython%2Fcpython.git dump readable opcode names in flowgraph debug utility (#109392) Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com> --- diff --git a/Python/flowgraph.c b/Python/flowgraph.c index 44858b9c5273..5ad49911dfbe 100644 --- a/Python/flowgraph.c +++ b/Python/flowgraph.c @@ -261,8 +261,8 @@ dump_instr(cfg_instr *i) if (HAS_TARGET(i->i_opcode)) { sprintf(arg, "target: %p [%d] ", i->i_target, i->i_oparg); } - fprintf(stderr, "line: %d, opcode: %d %s%s\n", - i->i_loc.lineno, i->i_opcode, arg, jump); + fprintf(stderr, "line: %d, %s (%d) %s%s\n", + i->i_loc.lineno, _PyOpcode_OpName[i->i_opcode], i->i_opcode, arg, jump); } static inline int @@ -2661,4 +2661,3 @@ _PyCfg_OptimizedCfgToInstructionSequence(cfg_builder *g, return SUCCESS; } -