diff options
| author | Yuichiro MASUI <[email protected]> | 2013-02-17 00:13:42 +0900 |
|---|---|---|
| committer | Yuichiro MASUI <[email protected]> | 2013-02-17 00:13:42 +0900 |
| commit | bc44d06c7374d5b925d8936227e6976622365a3e (patch) | |
| tree | 31a06ca5897a6c5411e65dd055576fa056ad5726 /include | |
| parent | 92cf2a0ced00cf4071d624eb2d842867a6d054c2 (diff) | |
| download | mruby-bc44d06c7374d5b925d8936227e6976622365a3e.tar.gz mruby-bc44d06c7374d5b925d8936227e6976622365a3e.zip | |
Created hook at VM code fetch. It's for debugger
Diffstat (limited to 'include')
| -rw-r--r-- | include/mrbconf.h | 4 | ||||
| -rw-r--r-- | include/mruby.h | 4 |
2 files changed, 8 insertions, 0 deletions
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; |
