aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2016-03-02 20:54:11 +0200
committerArnold D. Robbins <arnold@skeeve.com>2016-03-02 20:54:11 +0200
commitf0141fdfcfd870de22d54baaa3551b2aae0dac6f (patch)
treee7dedc91527d5603f914099bb6c0a56a710b3f11
parent2693fc3368628e377bb9c29ba1ba1f6ab091fac5 (diff)
downloadegawk-f0141fdfcfd870de22d54baaa3551b2aae0dac6f.tar.gz
egawk-f0141fdfcfd870de22d54baaa3551b2aae0dac6f.tar.bz2
egawk-f0141fdfcfd870de22d54baaa3551b2aae0dac6f.zip
Improvements in debug.c for if and else.
-rw-r--r--ChangeLog5
-rw-r--r--debug.c9
2 files changed, 14 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 5c73d422..414efea5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2016-03-02 Arnold D. Robbins <arnold@skeeve.com>
+
+ * debug.c (print_instruction): Improvements in instruction dump
+ for if and else.
+
2016-03-01 Arnold D. Robbins <arnold@skeeve.com>
* debug.c (print_instruction): For Op_comment, add notation as
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;