Class: Debase::Breakpoint

Inherits:
Object show all
Defined in:
lib/debase/rbx/breakpoint.rb,
ext/breakpoint.c

Constant Summary collapse

@@global_id =
1

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(source, pos, expr) ⇒ Breakpoint

Returns a new instance of Breakpoint.



67
68
69
70
71
72
73
# File 'ext/breakpoint.c', line 67

def initialize(file, line, expr=nil)
  @source = file
  @pos = line
  @expr = expr
  @id = @@global_id
  @@global_id = @@global_id + 1
end

Instance Attribute Details

#enabledObject

Returns the value of attribute enabled.



154
155
156
# File 'ext/breakpoint.c', line 154

def enabled
  @enabled
end

#exprObject

<For tests>



125
126
127
# File 'ext/breakpoint.c', line 125

def expr
  @expr
end

#idObject (readonly)

Returns the value of attribute id.



107
108
109
# File 'ext/breakpoint.c', line 107

def id
  @id
end

#posObject

Returns the value of attribute pos.



163
164
165
# File 'ext/breakpoint.c', line 163

def pos
  @pos
end

#sourceObject

Returns the value of attribute source.



116
117
118
# File 'ext/breakpoint.c', line 116

def source
  @source
end

Class Method Details

.find(breakpoints, source, pos, trace_point) ⇒ Object



263
264
265
266
267
# File 'ext/breakpoint.c', line 263

static VALUE
Breakpoint_find(VALUE self, VALUE breakpoints, VALUE source, VALUE pos, VALUE trace_point)
{
  return breakpoint_find(breakpoints, source, pos, trace_point);
}

.remove(breakpoints, id_value) ⇒ Object



82
83
84
85
86
# File 'ext/breakpoint.c', line 82

def self.remove(breakpoints, id)
  bp = breakpoints.delete_if {|b| b.id == id}
  bp.delete! if bp
  bp
end

Instance Method Details

#delete!Object



16
17
18
# File 'lib/debase/rbx/breakpoint.rb', line 16

def delete!

end