From 585ac7f1a2a1e96460cc78e050d2700d2e2680e5 Mon Sep 17 00:00:00 2001 From: ko1 Date: Thu, 29 Nov 2012 07:05:27 +0000 Subject: * include/ruby/debug.h: add rb_debug_inspector_* APIs. * vm_backtrace.c: ditto. * common.mk: add dpendency from vm_backtrace.o to include/ruby/debug.h. * proc.c (rb_binding_new_with_cfp): constify. * vm.c (rb_vm_get_ruby_level_next_cfp): consitify. * vm_core.h, vm_trace.c: move decls. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37979 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- include/ruby/debug.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/ruby/debug.h b/include/ruby/debug.h index 8eec34501a..88a6ecfe6b 100644 --- a/include/ruby/debug.h +++ b/include/ruby/debug.h @@ -26,6 +26,16 @@ extern "C" { /* Note: This file contains experimental APIs. */ /* APIs can be replaced at Ruby 2.0.1 or later */ +/* debug inspector APIs */ +typedef struct rb_debug_inspector_struct rb_debug_inspector_t; +typedef VALUE (*rb_debug_inspector_func_t)(const rb_debug_inspector_t *, void *); + +VALUE rb_debug_inspector_open(rb_debug_inspector_func_t func, void *data); +VALUE rb_debug_inspector_frame_binding_get(const rb_debug_inspector_t *dc, int index); +VALUE rb_debug_inspector_frame_class_get(const rb_debug_inspector_t *dc, int index); +VALUE rb_debug_inspector_frame_iseq_get(const rb_debug_inspector_t *dc, int index); +VALUE rb_debug_inspector_backtrace_locations(const rb_debug_inspector_t *dc); + /* Old style set_trace_func APIs */ void rb_add_event_hook(rb_event_hook_func_t func, rb_event_flag_t events, VALUE data); @@ -55,7 +65,7 @@ VALUE rb_tracearg_self(struct rb_trace_arg_struct *trace_arg); VALUE rb_tracearg_return_value(struct rb_trace_arg_struct *trace_arg); VALUE rb_tracearg_raised_exception(struct rb_trace_arg_struct *trace_arg); -/* undocumented advanced APIs */ +/* undocumented advanced tracing APIs */ typedef enum { RUBY_EVENT_HOOK_FLAG_SAFE = 0x01, -- cgit v1.2.3