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)


2035
2036
2037
2038
2039
2040
2041
2042
# File 'ext/ruby_debug.c', line 2035

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)


2050
2051
2052
2053
2054
2055
2056
2057
# File 'ext/ruby_debug.c', line 2050

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)


2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
# File 'ext/ruby_debug.c', line 2017

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)


2002
2003
2004
2005
2006
2007
2008
2009
# File 'ext/ruby_debug.c', line 2002

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

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