ruby-debug-base 0.10.1 → 0.10.2
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES +7 -0
- data/Rakefile +6 -6
- data/ext/breakpoint.c +10 -12
- data/ext/ruby_debug.c +51 -27
- data/ext/win32/ruby_debug.so +0 -0
- data/lib/ChangeLog +957 -0
- data/lib/ruby-debug-base.rb +25 -13
- data/test/base/base.rb +0 -0
- data/test/base/binding.rb +0 -0
- data/test/base/catchpoint.rb +0 -0
- metadata +55 -46
data/lib/ruby-debug-base.rb
CHANGED
@@ -94,6 +94,7 @@ module Debugger
|
|
94
94
|
# Get line +line_number+ from file named +filename+. Return "\n"
|
95
95
|
# there was a problem. Leaking blanks are stripped off.
|
96
96
|
def line_at(filename, line_number) # :nodoc:
|
97
|
+
@reload_on_change=nil unless defined?(@reload_on_change)
|
97
98
|
line = LineCache::getline(filename, line_number, @reload_on_change)
|
98
99
|
return "\n" unless line
|
99
100
|
return "#{line.gsub(/^\s+/, '').chomp}\n"
|
@@ -161,20 +162,7 @@ module Debugger
|
|
161
162
|
|
162
163
|
class ThreadsTable # :nodoc:
|
163
164
|
end
|
164
|
-
end
|
165
165
|
|
166
|
-
module Kernel
|
167
|
-
#
|
168
|
-
# Enters the debugger in the current thread after a number of
|
169
|
-
# _steps_ made.
|
170
|
-
#
|
171
|
-
def debugger(steps = 1)
|
172
|
-
Debugger.start unless Debugger.started?
|
173
|
-
Debugger.run_init_script(StringIO.new)
|
174
|
-
Debugger.current_context.stop_next = steps
|
175
|
-
end
|
176
|
-
alias breakpoint debugger unless respond_to?(:breakpoint)
|
177
|
-
|
178
166
|
# Debugger.start(options) -> bool
|
179
167
|
# Debugger.start(options) { ... } -> obj
|
180
168
|
#
|
@@ -214,7 +202,31 @@ module Kernel
|
|
214
202
|
end
|
215
203
|
return retval
|
216
204
|
end
|
205
|
+
module_function :start
|
206
|
+
end
|
217
207
|
|
208
|
+
module Kernel
|
209
|
+
|
210
|
+
# Enters the debugger in the current thread after _steps_ line events occur.
|
211
|
+
# Before entering the debugger startup script is read.
|
212
|
+
#
|
213
|
+
# Setting _steps_ to 0 will cause a break in the debugger subroutine
|
214
|
+
# and not wait for a line event to occur. You will have to go "up 1"
|
215
|
+
# in order to be back in your debugged program rather than the
|
216
|
+
# debugger. Settings _stess_ to 0 could be useful you want to stop
|
217
|
+
# right after the last statement in some scope, because the next
|
218
|
+
# step will take you out of some scope.
|
219
|
+
def debugger(steps = 1)
|
220
|
+
Debugger.start unless Debugger.started?
|
221
|
+
Debugger.run_init_script(StringIO.new)
|
222
|
+
if 0 == steps
|
223
|
+
Debugger.current_context.stop_frame = 0
|
224
|
+
else
|
225
|
+
Debugger.current_context.stop_next = steps
|
226
|
+
end
|
227
|
+
end
|
228
|
+
alias breakpoint debugger unless respond_to?(:breakpoint)
|
229
|
+
|
218
230
|
#
|
219
231
|
# Returns a binding of n-th call frame
|
220
232
|
#
|
data/test/base/base.rb
CHANGED
File without changes
|
data/test/base/binding.rb
CHANGED
File without changes
|
data/test/base/catchpoint.rb
CHANGED
File without changes
|
metadata
CHANGED
@@ -1,33 +1,36 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
|
-
rubygems_version: 0.9.4
|
3
|
-
specification_version: 1
|
4
2
|
name: ruby-debug-base
|
5
3
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.10.
|
7
|
-
date: 2008-04-10 00:00:00 -04:00
|
8
|
-
summary: Fast Ruby debugger - core component
|
9
|
-
require_paths:
|
10
|
-
- lib
|
11
|
-
email: ksibilev@yahoo.com
|
12
|
-
homepage: http://rubyforge.org/projects/ruby-debug/
|
13
|
-
rubyforge_project: ruby-debug
|
14
|
-
description: ruby-debug is a fast implementation of the standard Ruby debugger debug.rb. It is implemented by utilizing a new Ruby C API hook. The core component provides support that front-ends can build on. It provides breakpoint handling, bindings for stack frames among other things.
|
15
|
-
autorequire:
|
16
|
-
default_executable:
|
17
|
-
bindir: bin
|
18
|
-
has_rdoc: true
|
19
|
-
required_ruby_version: !ruby/object:Gem::Version::Requirement
|
20
|
-
requirements:
|
21
|
-
- - ">="
|
22
|
-
- !ruby/object:Gem::Version
|
23
|
-
version: 1.8.2
|
24
|
-
version:
|
4
|
+
version: 0.10.2
|
25
5
|
platform: ruby
|
26
|
-
signing_key:
|
27
|
-
cert_chain:
|
28
|
-
post_install_message:
|
29
6
|
authors:
|
30
7
|
- Kent Sibilev
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
|
12
|
+
date: 2008-08-28 00:00:00 -04:00
|
13
|
+
default_executable:
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: linecache
|
17
|
+
type: :runtime
|
18
|
+
version_requirement:
|
19
|
+
version_requirements: !ruby/object:Gem::Requirement
|
20
|
+
requirements:
|
21
|
+
- - ">="
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: "0.3"
|
24
|
+
version:
|
25
|
+
description: ruby-debug is a fast implementation of the standard Ruby debugger debug.rb. It is implemented by utilizing a new Ruby C API hook. The core component provides support that front-ends can build on. It provides breakpoint handling, bindings for stack frames among other things.
|
26
|
+
email: ksibilev@yahoo.com
|
27
|
+
executables: []
|
28
|
+
|
29
|
+
extensions:
|
30
|
+
- ext/extconf.rb
|
31
|
+
extra_rdoc_files:
|
32
|
+
- README
|
33
|
+
- ext/ruby_debug.c
|
31
34
|
files:
|
32
35
|
- AUTHORS
|
33
36
|
- CHANGES
|
@@ -38,33 +41,39 @@ files:
|
|
38
41
|
- ext/extconf.rb
|
39
42
|
- ext/ruby_debug.c
|
40
43
|
- ext/ruby_debug.h
|
41
|
-
-
|
44
|
+
- ext/win32/ruby_debug.so
|
42
45
|
- lib/ChangeLog
|
46
|
+
- lib/ruby-debug-base.rb
|
43
47
|
- test/base/base.rb
|
44
48
|
- test/base/binding.rb
|
45
49
|
- test/base/catchpoint.rb
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
- test/base/catchpoint.rb
|
50
|
+
has_rdoc: true
|
51
|
+
homepage: http://rubyforge.org/projects/ruby-debug/
|
52
|
+
post_install_message:
|
50
53
|
rdoc_options: []
|
51
54
|
|
52
|
-
|
53
|
-
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
55
|
+
require_paths:
|
56
|
+
- lib
|
57
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 1.8.2
|
62
|
+
version:
|
63
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - ">="
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: "0"
|
68
|
+
version:
|
59
69
|
requirements: []
|
60
70
|
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
version:
|
71
|
+
rubyforge_project: ruby-debug
|
72
|
+
rubygems_version: 1.2.0
|
73
|
+
signing_key:
|
74
|
+
specification_version: 2
|
75
|
+
summary: Fast Ruby debugger - core component
|
76
|
+
test_files:
|
77
|
+
- test/base/base.rb
|
78
|
+
- test/base/binding.rb
|
79
|
+
- test/base/catchpoint.rb
|