From 12f2f7371f2dcf9c8da2a96fa251d1af2a7e977e Mon Sep 17 00:00:00 2001 From: ko1 Date: Fri, 30 Nov 2012 17:00:30 +0000 Subject: [EXPERIMENTAL] * iseq.c: add following two methods. * ISeq#line_trace_all returns all line traces (line numbers) * ISeq#line_trace_specify(pos, set) set `pos'th line event to specified_line event (if set is true). These features are introduced for debuggers (mainly to make breakpoint). * iseq.h: add decl. of C APIs. * test/ruby/test_iseq.rb: add tests. * vm_trace.c: add `specified_line' event. * include/ruby/ruby.h: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38076 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- iseq.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'iseq.h') diff --git a/iseq.h b/iseq.h index 17eebfff12..1b51d2a14d 100644 --- a/iseq.h +++ b/iseq.h @@ -28,6 +28,10 @@ VALUE rb_iseq_parameters(const rb_iseq_t *iseq, int is_proc); struct st_table *ruby_insn_make_insn_table(void); unsigned int rb_iseq_line_no(const rb_iseq_t *iseq, size_t pos); +int rb_iseq_line_trace_each(VALUE iseqval, int (*func)(int line, rb_event_flag_t *events_ptr, void *d), void *data); +VALUE rb_iseq_line_trace_all(VALUE iseqval); +VALUE rb_iseq_line_trace_specify(VALUE iseqval, VALUE pos, VALUE set); + /* proc.c */ rb_iseq_t *rb_method_get_iseq(VALUE body); rb_iseq_t *rb_proc_get_iseq(VALUE proc, int *is_proc); -- cgit v1.2.3