From bc44d06c7374d5b925d8936227e6976622365a3e Mon Sep 17 00:00:00 2001 From: Yuichiro MASUI Date: Sun, 17 Feb 2013 00:13:42 +0900 Subject: Created hook at VM code fetch. It's for debugger --- include/mrbconf.h | 4 ++++ include/mruby.h | 4 ++++ 2 files changed, 8 insertions(+) (limited to 'include') diff --git a/include/mrbconf.h b/include/mrbconf.h index 17f6a0fc3..74cbd308b 100644 --- a/include/mrbconf.h +++ b/include/mrbconf.h @@ -50,6 +50,7 @@ //#define DISABLE_TIME /* Time class */ //#define DISABLE_STRUCT /* Struct class */ //#define DISABLE_STDIO /* use of stdio */ +//#define DISABLE_DEBUG /* hooks for debugger */ /* Now DISABLE_GEMS is added as a command line flag in Rakefile, */ /* we do not need to set it here. */ @@ -118,6 +119,9 @@ typedef short mrb_sym; #ifndef DISABLE_STDIO #define ENABLE_STDIO #endif +#ifndef DISABLE_DEBUG +#define ENABLE_DEBUG +#endif #ifndef FALSE # define FALSE 0 diff --git a/include/mruby.h b/include/mruby.h index fb73b60b9..bebbf6b04 100644 --- a/include/mruby.h +++ b/include/mruby.h @@ -133,6 +133,10 @@ typedef struct mrb_state { struct RNode *local_svar;/* regexp */ #endif +#ifdef ENABLE_DEBUG + void (*hook_vm_fetch_code)(struct mrb_state* mrb, struct mrb_irep *irep, mrb_code *pc, mrb_value *regs); +#endif + struct RClass *eException_class; struct RClass *eStandardError_class; -- cgit v1.2.3