summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/vm.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/vm.c b/src/vm.c
index a12763b33..c044d5af1 100644
--- a/src/vm.c
+++ b/src/vm.c
@@ -2113,11 +2113,15 @@ mrb_context_run(mrb_state *mrb, struct RProc *proc, mrb_value self, unsigned int
CASE(OP_DEBUG) {
/* A debug print R(A),R(B),R(C) */
+#ifdef ENABLE_DEBUG
+ mrb->debug_op_hook(mrb, irep, pc, regs);
+#else
#ifdef ENABLE_STDIO
printf("OP_DEBUG %d %d %d\n", GETARG_A(i), GETARG_B(i), GETARG_C(i));
#else
abort();
#endif
+#endif
NEXT;
}