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)


2016
2017
2018
2019
2020
2021
2022
2023
# File 'ext/ruby_debug.c', line 2016

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)


2031
2032
2033
2034
2035
2036
2037
2038
# File 'ext/ruby_debug.c', line 2031

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)


1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
# File 'ext/ruby_debug.c', line 1998

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)


1983
1984
1985
1986
1987
1988
1989
1990
# File 'ext/ruby_debug.c', line 1983

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

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