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)


1727
1728
1729
1730
1731
1732
1733
1734
# File 'ext/ruby_debug.c', line 1727

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)


1742
1743
1744
1745
1746
1747
1748
1749
# File 'ext/ruby_debug.c', line 1742

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)


1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
# File 'ext/ruby_debug.c', line 1709

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)


1694
1695
1696
1697
1698
1699
1700
1701
# File 'ext/ruby_debug.c', line 1694

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

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