VALUE check_breakpoints_by_method(debug_context_t *debug_context, VALUE klass, ID mid, VALUE self) { VALUE breakpoint; int i; 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; if(RARRAY_LEN(rdebug_breakpoints) == 0) return Qnil; for(i = 0; i < RARRAY_LEN(rdebug_breakpoints); i++) { breakpoint = rb_ary_entry(rdebug_breakpoints, i); if(check_breakpoint_by_method(breakpoint, klass, mid, self)) return breakpoint; } return Qnil; }
extern VALUE find_breakpoint_by_method(VALUE breakpoints, VALUE klass, ID mid, VALUE bind, VALUE self) { VALUE breakpoint; int i; for (i = 0; i < RARRAY_LENINT(breakpoints); i++) { breakpoint = rb_ary_entry(breakpoints, i); if (check_breakpoint_by_method(breakpoint, klass, mid, self) && check_breakpoint_by_expr(breakpoint, bind) && check_breakpoint_by_hit_condition(breakpoint)) { return breakpoint; } } return Qnil; }