From 4bab37f9b96cdefe953e07ab99328a08a34ecc87 Mon Sep 17 00:00:00 2001 From: rgrjr Date: Mon, 7 May 2007 02:46:04 +0000 Subject: [PATCH] * src/debug.c: + (PDB_disassemble_op): Include the symbolic op name after the dispatch arg to an "infix" or "n_infix" op. This makes it easy to figure out what it does, but without hiding the real instruction. git-svn-id: https://svn.perl.org/parrot/trunk@18445 d31e2699-5ff4-0310-a27c-f18f2fbe73fe --- src/debug.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/debug.c b/src/debug.c index 7604b5803d..8c2da19664 100644 --- a/src/debug.c +++ b/src/debug.c @@ -1447,6 +1447,19 @@ PDB_disassemble_op(Interp *interp, char* dest, int space, assert(size + 20 < space); sprintf(&dest[size], INTVAL_FMT, i); size += strlen(&dest[size]); + + /* If this is a constant dispatch arg to an "infix" op, then show + the corresponding symbolic op name. */ + if (j == 1 && info->types[j-1] == PARROT_ARG_IC + && (strcmp(info->name, "infix") == 0 + || strcmp(info->name, "n_infix") == 0)) { + assert(size + 20 < space); + sprintf(&dest[size], " [%s]", + /* [kludge: the "2+" skips the leading underscores. -- + rgr, 6-May-07.] */ + 2+Parrot_MMD_method_name(interp, op[j])); + size += strlen(&dest[size]); + } break; case PARROT_ARG_NC: /* Convert the float to a string */ -- 2.11.4.GIT