summaryrefslogtreecommitdiffhomepage
path: root/include/mruby.h
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2015-12-29 23:49:33 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2015-12-29 23:49:33 +0900
commitee3fa1be49e4d48acd7fdd6bd049a8d5d4d4724c (patch)
tree49015de74ab4953c278e59dd9299858d46979f10 /include/mruby.h
parente132de9e8eaf095f6f8b826e34a1c145403c3311 (diff)
parent0ebac02813d6506f92c9aaceaa00c6f902a56a03 (diff)
downloadmruby-ee3fa1be49e4d48acd7fdd6bd049a8d5d4d4724c.tar.gz
mruby-ee3fa1be49e4d48acd7fdd6bd049a8d5d4d4724c.zip
Merge pull request #3065 from kou/support-backtrace-after-method-calls
Support backtrace after method calls
Diffstat (limited to 'include/mruby.h')
-rw-r--r--include/mruby.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/mruby.h b/include/mruby.h
index 1ea0156e8..33af08133 100644
--- a/include/mruby.h
+++ b/include/mruby.h
@@ -113,6 +113,14 @@ struct mrb_context {
struct mrb_jmpbuf;
+typedef struct {
+ const char *filename;
+ int lineno;
+ struct RClass *klass;
+ const char *sep;
+ mrb_sym method_id;
+} mrb_backtrace_entry;
+
typedef void (*mrb_atexit_func)(struct mrb_state*);
typedef struct mrb_state {
@@ -125,6 +133,12 @@ typedef struct mrb_state {
struct mrb_context *root_c;
struct RObject *exc; /* exception */
+ struct {
+ struct RObject *exc;
+ int n;
+ int n_allocated;
+ mrb_backtrace_entry *entries;
+ } backtrace;
struct iv_tbl *globals; /* global variable table */
struct RObject *top_self;