Method deprecated or moved
This method is deprecated or moved on the latest stable version.
The last existing version (v2_4_6) is shown here.
line_trace_specify(p1, p2)
public
Experimental MRI specific feature, only available as C level api.
Set a specified_line event at the given
line position, if the set parameter is true.
This method is useful for building a debugger breakpoint at a specific
line.
A TypeError is raised if set is not
boolean.
If pos is a negative integer a TypeError exception is raised.
VALUE
rb_iseqw_line_trace_specify(VALUE iseqval, VALUE pos, VALUE set)
{
struct set_specifc_data data;
data.prev = 0;
data.pos = NUM2INT(pos);
if (data.pos < 0) rb_raise(rb_eTypeError, "`pos' is negative");
switch (set) {
case Qtrue: data.set = 1; break;
case Qfalse: data.set = 0; break;
default:
rb_raise(rb_eTypeError, "`set' should be true/false");
}
rb_iseqw_line_trace_each(iseqval, line_trace_specify, (void *)&data);
if (data.prev == 0) {
rb_raise(rb_eTypeError, "`pos' is out of range.");
}
return data.prev == 1 ? Qtrue : Qfalse;
}