diff options
Diffstat (limited to 'ruby_2_2/ext/-test-/debug')
-rw-r--r-- | ruby_2_2/ext/-test-/debug/depend | 32 | ||||
-rw-r--r-- | ruby_2_2/ext/-test-/debug/extconf.rb | 6 | ||||
-rw-r--r-- | ruby_2_2/ext/-test-/debug/init.c | 11 | ||||
-rw-r--r-- | ruby_2_2/ext/-test-/debug/inspector.c | 32 | ||||
-rw-r--r-- | ruby_2_2/ext/-test-/debug/profile_frames.c | 43 |
5 files changed, 0 insertions, 124 deletions
diff --git a/ruby_2_2/ext/-test-/debug/depend b/ruby_2_2/ext/-test-/debug/depend deleted file mode 100644 index 5178d85673..0000000000 --- a/ruby_2_2/ext/-test-/debug/depend +++ /dev/null @@ -1,32 +0,0 @@ -# AUTOGENERATED DEPENDENCIES START -init.o: $(RUBY_EXTCONF_H) -init.o: $(arch_hdrdir)/ruby/config.h -init.o: $(hdrdir)/ruby/defines.h -init.o: $(hdrdir)/ruby/intern.h -init.o: $(hdrdir)/ruby/missing.h -init.o: $(hdrdir)/ruby/ruby.h -init.o: $(hdrdir)/ruby/st.h -init.o: $(hdrdir)/ruby/subst.h -init.o: $(top_srcdir)/include/ruby.h -init.o: init.c -inspector.o: $(RUBY_EXTCONF_H) -inspector.o: $(arch_hdrdir)/ruby/config.h -inspector.o: $(hdrdir)/ruby/debug.h -inspector.o: $(hdrdir)/ruby/defines.h -inspector.o: $(hdrdir)/ruby/intern.h -inspector.o: $(hdrdir)/ruby/missing.h -inspector.o: $(hdrdir)/ruby/ruby.h -inspector.o: $(hdrdir)/ruby/st.h -inspector.o: $(hdrdir)/ruby/subst.h -inspector.o: inspector.c -profile_frames.o: $(RUBY_EXTCONF_H) -profile_frames.o: $(arch_hdrdir)/ruby/config.h -profile_frames.o: $(hdrdir)/ruby/debug.h -profile_frames.o: $(hdrdir)/ruby/defines.h -profile_frames.o: $(hdrdir)/ruby/intern.h -profile_frames.o: $(hdrdir)/ruby/missing.h -profile_frames.o: $(hdrdir)/ruby/ruby.h -profile_frames.o: $(hdrdir)/ruby/st.h -profile_frames.o: $(hdrdir)/ruby/subst.h -profile_frames.o: profile_frames.c -# AUTOGENERATED DEPENDENCIES END diff --git a/ruby_2_2/ext/-test-/debug/extconf.rb b/ruby_2_2/ext/-test-/debug/extconf.rb deleted file mode 100644 index 8f7922e1a6..0000000000 --- a/ruby_2_2/ext/-test-/debug/extconf.rb +++ /dev/null @@ -1,6 +0,0 @@ -$srcs = Dir[File.join($srcdir, "*.{#{SRC_EXT.join(%q{,})}}")] -inits = $srcs.map {|s| File.basename(s, ".*")} -inits.delete("init") -inits.map! {|s|"X(#{s})"} -$defs << "-DTEST_INIT_FUNCS(X)=\"#{inits.join(' ')}\"" -create_makefile("-test-/debug") diff --git a/ruby_2_2/ext/-test-/debug/init.c b/ruby_2_2/ext/-test-/debug/init.c deleted file mode 100644 index fe3979cbc5..0000000000 --- a/ruby_2_2/ext/-test-/debug/init.c +++ /dev/null @@ -1,11 +0,0 @@ -#include "ruby.h" - -#define init(n) {void Init_##n(VALUE klass); Init_##n(klass);} - -void -Init_debug(void) -{ - VALUE mBug = rb_define_module("Bug"); - VALUE klass = rb_define_module_under(mBug, "Debug"); - TEST_INIT_FUNCS(init); -} diff --git a/ruby_2_2/ext/-test-/debug/inspector.c b/ruby_2_2/ext/-test-/debug/inspector.c deleted file mode 100644 index f0c58e59f9..0000000000 --- a/ruby_2_2/ext/-test-/debug/inspector.c +++ /dev/null @@ -1,32 +0,0 @@ -#include "ruby/ruby.h" -#include "ruby/debug.h" - -static VALUE -callback(const rb_debug_inspector_t *dbg_context, void *data) -{ - VALUE locs = rb_debug_inspector_backtrace_locations(dbg_context); - long i, len = RARRAY_LEN(locs); - VALUE binds = rb_ary_new(); - for (i = 0; i < len; ++i) { - VALUE entry = rb_ary_new(); - rb_ary_push(binds, entry); - rb_ary_push(entry, rb_debug_inspector_frame_self_get(dbg_context, i)); - rb_ary_push(entry, rb_debug_inspector_frame_binding_get(dbg_context, i)); - rb_ary_push(entry, rb_debug_inspector_frame_class_get(dbg_context, i)); - rb_ary_push(entry, rb_debug_inspector_frame_iseq_get(dbg_context, i)); - rb_ary_push(entry, rb_ary_entry(locs, i)); - } - return binds; -} - -static VALUE -debug_inspector(VALUE self) -{ - return rb_debug_inspector_open(callback, NULL); -} - -void -Init_inspector(VALUE klass) -{ - rb_define_module_function(klass, "inspector", debug_inspector, 0); -} diff --git a/ruby_2_2/ext/-test-/debug/profile_frames.c b/ruby_2_2/ext/-test-/debug/profile_frames.c deleted file mode 100644 index 1656ff7d4b..0000000000 --- a/ruby_2_2/ext/-test-/debug/profile_frames.c +++ /dev/null @@ -1,43 +0,0 @@ -#include "ruby/ruby.h" -#include "ruby/debug.h" - -#define MAX_BUF_SIZE 0x100 - -static VALUE -profile_frames(VALUE self, VALUE start_v, VALUE num_v) -{ - int i, collected_size; - int start = NUM2INT(start_v); - int buff_size = NUM2INT(num_v); - VALUE buff[MAX_BUF_SIZE]; - int lines[MAX_BUF_SIZE]; - VALUE result = rb_ary_new(); - - if (buff_size > MAX_BUF_SIZE) rb_raise(rb_eRuntimeError, "too long buff_size"); - - collected_size = rb_profile_frames(start, buff_size, buff, lines); - - for (i=0; i<collected_size; i++) { - VALUE ary = rb_ary_new(); - rb_ary_push(ary, rb_profile_frame_path(buff[i])); - rb_ary_push(ary, rb_profile_frame_absolute_path(buff[i])); - rb_ary_push(ary, rb_profile_frame_label(buff[i])); - rb_ary_push(ary, rb_profile_frame_base_label(buff[i])); - rb_ary_push(ary, rb_profile_frame_full_label(buff[i])); - rb_ary_push(ary, rb_profile_frame_first_lineno(buff[i])); - rb_ary_push(ary, rb_profile_frame_classpath(buff[i])); - rb_ary_push(ary, rb_profile_frame_singleton_method_p(buff[i])); - rb_ary_push(ary, rb_profile_frame_method_name(buff[i])); - rb_ary_push(ary, rb_profile_frame_qualified_method_name(buff[i])); - - rb_ary_push(result, ary); - } - - return result; -} - -void -Init_profile_frames(VALUE klass) -{ - rb_define_module_function(klass, "profile_frames", profile_frames, 2); -} |