From 460cfb34fd0e5189dfa83975c5ec5fdde7008cac Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Tue, 1 Mar 2016 22:16:27 +0200 Subject: Improvements in debug output. --- debug.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'debug.c') diff --git a/debug.c b/debug.c index 01e30ee3..574b3037 100644 --- a/debug.c +++ b/debug.c @@ -3998,7 +3998,14 @@ print_instruction(INSTRUCTION *pc, Func_print print_func, FILE *fp, int in_dump) print_func(fp, " [do_reference = %s]\n", pc->do_reference ? "true" : "false"); break; - + + case Op_comment: + print_memory(pc->memory, func, print_func, fp); + fprintf(fp, " {%s}\n", + pc->memory->comment_type == EOL_COMMENT ? + "eol" : "full"); + break; + case Op_push_i: case Op_push: case Op_push_arg: @@ -4016,7 +4023,6 @@ print_instruction(INSTRUCTION *pc, Func_print print_func, FILE *fp, int in_dump) case Op_quotient_i: case Op_mod_i: case Op_assign_concat: - case Op_comment: print_memory(pc->memory, func, print_func, fp); /* fall through */ default: -- cgit v1.2.3 From f0141fdfcfd870de22d54baaa3551b2aae0dac6f Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Wed, 2 Mar 2016 20:54:11 +0200 Subject: Improvements in debug.c for if and else. --- debug.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'debug.c') diff --git a/debug.c b/debug.c index 574b3037..7bf3450a 100644 --- a/debug.c +++ b/debug.c @@ -3796,6 +3796,15 @@ print_instruction(INSTRUCTION *pc, Func_print print_func, FILE *fp, int in_dump) switch (pc->opcode) { + case Op_K_if: + print_func(fp, "[branch_if = %p] [branch_else = %p] [branch_else->lasti = %p]\n", + pc->branch_if, pc->branch_else, pc->branch_else->lasti); + break; + + case Op_K_else: + print_func(fp, "[branch_end = %p]\n", pc->branch_end); + break; + case Op_var_update: print_func(fp, "[update_%s()]\n", get_spec_varname(pc->update_var)); break; -- cgit v1.2.3