Class: Debugger::Breakpoint

Inherits:
Object
  • Object
show all
Defined in:
ext/ruby_debug.c

Instance Method Summary collapse

Instance Method Details

#exprString

Returns a codition expression when this breakpoint should be activated.

Returns:

  • (String)


1959
1960
1961
1962
1963
1964
1965
1966
# File 'ext/ruby_debug.c', line 1959

static VALUE
breakpoint_expr(VALUE self)
{
    debug_breakpoint_t *breakpoint;

    Data_Get_Struct(self, debug_breakpoint_t, breakpoint);
    return breakpoint->expr;
}

#idInteger

Returns id of the breakpoint.

Returns:

  • (Integer)


1974
1975
1976
1977
1978
1979
1980
1981
# File 'ext/ruby_debug.c', line 1974

static VALUE
breakpoint_id(VALUE self)
{
    debug_breakpoint_t *breakpoint;
    
    Data_Get_Struct(self, debug_breakpoint_t, breakpoint);
    return INT2FIX(breakpoint->id);
}

#posString, Integer

Returns a position of this breakpoint.

Returns:

  • (String, Integer)


1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
# File 'ext/ruby_debug.c', line 1941

static VALUE
breakpoint_pos(VALUE self)
{
    debug_breakpoint_t *breakpoint;

    Data_Get_Struct(self, debug_breakpoint_t, breakpoint);
    if(breakpoint->type == BP_METHOD_TYPE)
        return rb_str_new2(rb_id2name(breakpoint->pos.mid));
    else
        return INT2FIX(breakpoint->pos.line);
}

#sourceString

Returns a source of the breakpoint.

Returns:

  • (String)


1926
1927
1928
1929
1930
1931
1932
1933
# File 'ext/ruby_debug.c', line 1926

static VALUE
breakpoint_source(VALUE self)
{
    debug_breakpoint_t *breakpoint;

    Data_Get_Struct(self, debug_breakpoint_t, breakpoint);
    return breakpoint->source;
}