Permalink
Browse files

Merge pull request #14 from nobu/master

update for Ruby 1.9.3-rc1
  • Loading branch information...
2 parents 582328f + 63d4066 commit 262e25df395463d8b6b773a5e14f6be173cf6d6c @mark-moseley committed Oct 8, 2011
Showing with 167 additions and 176 deletions.
  1. +4 −4 ext/ruby_debug/breakpoint.c
  2. +19 −11 ext/ruby_debug/extconf.rb
  3. +134 −157 ext/ruby_debug/ruby_debug.c
  4. +10 −4 ext/ruby_debug/ruby_debug.h
@@ -20,7 +20,7 @@ int
check_breakpoint_hit_condition(VALUE breakpoint)
{
debug_breakpoint_t *debug_breakpoint;
-
+
if(breakpoint == Qnil)
return 0;
Data_Get_Struct(breakpoint, debug_breakpoint_t, debug_breakpoint);
@@ -100,7 +100,7 @@ check_breakpoints_by_pos(debug_context_t *debug_context, const char *file, int l
if(!CTX_FL_TEST(debug_context, CTX_FL_ENABLE_BKPT))
return Qnil;
-
+
if(check_breakpoint_by_pos(debug_context->breakpoint, file, line))
return debug_context->breakpoint;
@@ -123,7 +123,7 @@ check_breakpoints_by_method(debug_context_t *debug_context, VALUE klass, ID mid,
if(!CTX_FL_TEST(debug_context, CTX_FL_ENABLE_BKPT))
return Qnil;
-
+
if(check_breakpoint_by_method(debug_context->breakpoint, klass, mid, self))
return debug_context->breakpoint;
@@ -532,7 +532,7 @@ breakpoint_set_hit_condition(VALUE self, VALUE value)
Data_Get_Struct(self, debug_breakpoint_t, breakpoint);
id_value = rb_to_id(value);
-
+
if(rb_intern("greater_or_equal") == id_value || rb_intern("ge") == id_value)
breakpoint->hit_condition = HIT_COND_GE;
else if(rb_intern("equal") == id_value || rb_intern("eq") == id_value)
@@ -7,19 +7,27 @@
end
hdrs = proc {
- have_struct_member("rb_method_entry_t", "body", "method.h")
- have_header("vm_core.h") and have_header("iseq.h") and have_header("insns.inc") and
- have_header("insns_info.inc") and have_header("eval_intern.h")
+ iseqs = %w[vm_core.h iseq.h]
+ begin
+ have_struct_member("rb_method_entry_t", "called_id", "method.h") or
+ have_struct_member("rb_control_frame_t", "method_id", "method.h")
+ end and
+ have_header("vm_core.h") and have_header("iseq.h") and have_header("insns.inc") and
+ have_header("insns_info.inc") and have_header("eval_intern.h") or break
+ have_type("struct iseq_line_info_entry", iseqs) or
+ have_type("struct iseq_insn_info_entry", iseqs) or
+ break
+ if checking_for(checking_message("if rb_iseq_compile_with_option was added an argument filepath")) do
+ try_compile(<<SRC)
+#include <ruby.h>
+#include "vm_core.h"
+extern VALUE rb_iseq_new_main(NODE *node, VALUE filename, VALUE filepath);
+SRC
+ end
+ $defs << '-DRB_ISEQ_COMPILE_5ARGS'
+ end
}
-if RUBY_VERSION == '1.9.1'
- $CFLAGS << ' -DRUBY_VERSION_1_9_1'
-end
-
-if RUBY_REVISION >= 26959 # rb_iseq_compile_with_option was added an argument filepath
- $CFLAGS << ' -DRB_ISEQ_COMPILE_6ARGS'
-end
-
dir_config("ruby")
if !Ruby_core_source::create_makefile_with_core(hdrs, "ruby_debug")
STDERR.print("Makefile creation failed\n")
Oops, something went wrong.

0 comments on commit 262e25d

Please sign in to comment.