ruby-debug-ide22 0.7.4 → 0.7.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGES +75 -75
- data/ChangeLog.archive +1073 -1073
- data/ChangeLog.md +594 -594
- data/Gemfile +38 -38
- data/MIT-LICENSE +24 -24
- data/Rakefile +92 -92
- data/bin/gdb_wrapper +96 -96
- data/bin/rdebug-ide +200 -200
- data/ext/mkrf_conf.rb +44 -44
- data/lib/ruby-debug-ide/attach/debugger_loader.rb +20 -20
- data/lib/ruby-debug-ide/attach/gdb.rb +73 -73
- data/lib/ruby-debug-ide/attach/lldb.rb +71 -71
- data/lib/ruby-debug-ide/attach/native_debugger.rb +133 -133
- data/lib/ruby-debug-ide/attach/process_thread.rb +54 -54
- data/lib/ruby-debug-ide/attach/util.rb +114 -114
- data/lib/ruby-debug-ide/command.rb +187 -187
- data/lib/ruby-debug-ide/commands/breakpoints.rb +128 -128
- data/lib/ruby-debug-ide/commands/catchpoint.rb +64 -64
- data/lib/ruby-debug-ide/commands/condition.rb +51 -51
- data/lib/ruby-debug-ide/commands/control.rb +164 -158
- data/lib/ruby-debug-ide/commands/enable.rb +203 -203
- data/lib/ruby-debug-ide/commands/eval.rb +64 -64
- data/lib/ruby-debug-ide/commands/expression_info.rb +71 -71
- data/lib/ruby-debug-ide/commands/file_filtering.rb +106 -106
- data/lib/ruby-debug-ide/commands/frame.rb +155 -155
- data/lib/ruby-debug-ide/commands/inspect.rb +25 -25
- data/lib/ruby-debug-ide/commands/load.rb +17 -17
- data/lib/ruby-debug-ide/commands/stepping.rb +108 -108
- data/lib/ruby-debug-ide/commands/threads.rb +178 -178
- data/lib/ruby-debug-ide/commands/variables.rb +154 -154
- data/lib/ruby-debug-ide/event_processor.rb +71 -71
- data/lib/ruby-debug-ide/greeter.rb +42 -42
- data/lib/ruby-debug-ide/helper.rb +33 -33
- data/lib/ruby-debug-ide/ide_processor.rb +155 -155
- data/lib/ruby-debug-ide/interface.rb +47 -45
- data/lib/ruby-debug-ide/multiprocess/monkey.rb +46 -46
- data/lib/ruby-debug-ide/multiprocess/pre_child.rb +58 -58
- data/lib/ruby-debug-ide/multiprocess/starter.rb +10 -10
- data/lib/ruby-debug-ide/multiprocess/unmonkey.rb +30 -30
- data/lib/ruby-debug-ide/multiprocess.rb +22 -22
- data/lib/ruby-debug-ide/thread_alias.rb +26 -26
- data/lib/ruby-debug-ide/version.rb +3 -3
- data/lib/ruby-debug-ide/xml_printer.rb +570 -570
- data/lib/ruby-debug-ide.rb +230 -228
- data/ruby-debug-ide.gemspec +47 -47
- metadata +4 -4
@@ -1,107 +1,107 @@
|
|
1
|
-
module Debugger
|
2
|
-
class IncludeFile < Command # :nodoc:
|
3
|
-
self.control = true
|
4
|
-
|
5
|
-
def regexp
|
6
|
-
/ ^\s*include\s+(.+?)\s*$/x
|
7
|
-
end
|
8
|
-
|
9
|
-
def execute
|
10
|
-
file = @match[1]
|
11
|
-
|
12
|
-
return if file.nil?
|
13
|
-
file = realpath(file)
|
14
|
-
|
15
|
-
if Command.file_filter_supported?
|
16
|
-
Debugger.file_filter.include(file)
|
17
|
-
print_file_included(file)
|
18
|
-
else
|
19
|
-
print_debug("file filter is not supported")
|
20
|
-
end
|
21
|
-
end
|
22
|
-
|
23
|
-
class << self
|
24
|
-
def help_command
|
25
|
-
'include'
|
26
|
-
end
|
27
|
-
|
28
|
-
def help(cmd)
|
29
|
-
%{
|
30
|
-
include file - adds file/dir to file filter (either remove already excluded or add as included)
|
31
|
-
}
|
32
|
-
end
|
33
|
-
end
|
34
|
-
end
|
35
|
-
|
36
|
-
class ExcludeFile < Command # :nodoc:
|
37
|
-
self.control = true
|
38
|
-
|
39
|
-
def regexp
|
40
|
-
/ ^\s*exclude\s+(.+?)\s*$/x
|
41
|
-
end
|
42
|
-
|
43
|
-
def execute
|
44
|
-
file = @match[1]
|
45
|
-
|
46
|
-
return if file.nil?
|
47
|
-
file = realpath(file)
|
48
|
-
|
49
|
-
if Command.file_filter_supported?
|
50
|
-
Debugger.file_filter.exclude(file)
|
51
|
-
print_file_excluded(file)
|
52
|
-
else
|
53
|
-
print_debug("file filter is not supported")
|
54
|
-
end
|
55
|
-
end
|
56
|
-
|
57
|
-
class << self
|
58
|
-
def help_command
|
59
|
-
'include'
|
60
|
-
end
|
61
|
-
|
62
|
-
def help(cmd)
|
63
|
-
%{
|
64
|
-
exclude file - exclude file/dir from file filter (either remove already included or add as exclude)
|
65
|
-
}
|
66
|
-
end
|
67
|
-
end
|
68
|
-
end
|
69
|
-
|
70
|
-
class FileFilterCommand < Command # :nodoc:
|
71
|
-
self.control = true
|
72
|
-
|
73
|
-
def regexp
|
74
|
-
/ ^\s*file-filter\s+(on|off)\s*$/x
|
75
|
-
end
|
76
|
-
|
77
|
-
def execute
|
78
|
-
action = @match[1]
|
79
|
-
|
80
|
-
if Command.file_filter_supported?
|
81
|
-
if 'on' == action
|
82
|
-
Debugger.file_filter.enable
|
83
|
-
print_file_filter_status(true)
|
84
|
-
elsif 'off' == action
|
85
|
-
Debugger.file_filter.disable
|
86
|
-
print_file_filter_status(false)
|
87
|
-
else
|
88
|
-
print_error "Unknown option '#{action}'"
|
89
|
-
end
|
90
|
-
else
|
91
|
-
print_debug("file filter is not supported")
|
92
|
-
end
|
93
|
-
end
|
94
|
-
|
95
|
-
class << self
|
96
|
-
def help_command
|
97
|
-
'file-filter'
|
98
|
-
end
|
99
|
-
|
100
|
-
def help(cmd)
|
101
|
-
%{
|
102
|
-
file-filter (on|off) - enable/disable file filtering
|
103
|
-
}
|
104
|
-
end
|
105
|
-
end
|
106
|
-
end
|
1
|
+
module Debugger
|
2
|
+
class IncludeFile < Command # :nodoc:
|
3
|
+
self.control = true
|
4
|
+
|
5
|
+
def regexp
|
6
|
+
/ ^\s*include\s+(.+?)\s*$/x
|
7
|
+
end
|
8
|
+
|
9
|
+
def execute
|
10
|
+
file = @match[1]
|
11
|
+
|
12
|
+
return if file.nil?
|
13
|
+
file = realpath(file)
|
14
|
+
|
15
|
+
if Command.file_filter_supported?
|
16
|
+
Debugger.file_filter.include(file)
|
17
|
+
print_file_included(file)
|
18
|
+
else
|
19
|
+
print_debug("file filter is not supported")
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
class << self
|
24
|
+
def help_command
|
25
|
+
'include'
|
26
|
+
end
|
27
|
+
|
28
|
+
def help(cmd)
|
29
|
+
%{
|
30
|
+
include file - adds file/dir to file filter (either remove already excluded or add as included)
|
31
|
+
}
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
class ExcludeFile < Command # :nodoc:
|
37
|
+
self.control = true
|
38
|
+
|
39
|
+
def regexp
|
40
|
+
/ ^\s*exclude\s+(.+?)\s*$/x
|
41
|
+
end
|
42
|
+
|
43
|
+
def execute
|
44
|
+
file = @match[1]
|
45
|
+
|
46
|
+
return if file.nil?
|
47
|
+
file = realpath(file)
|
48
|
+
|
49
|
+
if Command.file_filter_supported?
|
50
|
+
Debugger.file_filter.exclude(file)
|
51
|
+
print_file_excluded(file)
|
52
|
+
else
|
53
|
+
print_debug("file filter is not supported")
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
class << self
|
58
|
+
def help_command
|
59
|
+
'include'
|
60
|
+
end
|
61
|
+
|
62
|
+
def help(cmd)
|
63
|
+
%{
|
64
|
+
exclude file - exclude file/dir from file filter (either remove already included or add as exclude)
|
65
|
+
}
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
class FileFilterCommand < Command # :nodoc:
|
71
|
+
self.control = true
|
72
|
+
|
73
|
+
def regexp
|
74
|
+
/ ^\s*file-filter\s+(on|off)\s*$/x
|
75
|
+
end
|
76
|
+
|
77
|
+
def execute
|
78
|
+
action = @match[1]
|
79
|
+
|
80
|
+
if Command.file_filter_supported?
|
81
|
+
if 'on' == action
|
82
|
+
Debugger.file_filter.enable
|
83
|
+
print_file_filter_status(true)
|
84
|
+
elsif 'off' == action
|
85
|
+
Debugger.file_filter.disable
|
86
|
+
print_file_filter_status(false)
|
87
|
+
else
|
88
|
+
print_error "Unknown option '#{action}'"
|
89
|
+
end
|
90
|
+
else
|
91
|
+
print_debug("file filter is not supported")
|
92
|
+
end
|
93
|
+
end
|
94
|
+
|
95
|
+
class << self
|
96
|
+
def help_command
|
97
|
+
'file-filter'
|
98
|
+
end
|
99
|
+
|
100
|
+
def help(cmd)
|
101
|
+
%{
|
102
|
+
file-filter (on|off) - enable/disable file filtering
|
103
|
+
}
|
104
|
+
end
|
105
|
+
end
|
106
|
+
end
|
107
107
|
end
|
@@ -1,155 +1,155 @@
|
|
1
|
-
module Debugger
|
2
|
-
|
3
|
-
module FrameFunctions # :nodoc:
|
4
|
-
|
5
|
-
def adjust_frame(frame_pos, absolute)
|
6
|
-
if absolute
|
7
|
-
if frame_pos < 0
|
8
|
-
abs_frame_pos = @state.context.stack_size + frame_pos
|
9
|
-
else
|
10
|
-
abs_frame_pos = frame_pos - 1
|
11
|
-
end
|
12
|
-
else
|
13
|
-
abs_frame_pos = @state.frame_pos + frame_pos
|
14
|
-
end
|
15
|
-
|
16
|
-
if abs_frame_pos >= @state.context.stack_size then
|
17
|
-
print_error "Adjusting would put us beyond the oldest (initial) frame.\n"
|
18
|
-
return
|
19
|
-
elsif abs_frame_pos < 0 then
|
20
|
-
print_error "Adjusting would put us beyond the newest (innermost) frame.\n"
|
21
|
-
return
|
22
|
-
end
|
23
|
-
if @state.frame_pos != abs_frame_pos then
|
24
|
-
@state.previous_line = nil
|
25
|
-
@state.frame_pos = abs_frame_pos
|
26
|
-
end
|
27
|
-
@state.file = @state.context.frame_file(@state.frame_pos)
|
28
|
-
@state.line = @state.context.frame_line(@state.frame_pos)
|
29
|
-
|
30
|
-
print_current_frame(@state.frame_pos)
|
31
|
-
end
|
32
|
-
|
33
|
-
end
|
34
|
-
|
35
|
-
class WhereCommand < Command # :nodoc:
|
36
|
-
def regexp
|
37
|
-
/^\s*(?:w(?:here)?|bt|backtrace)$/
|
38
|
-
end
|
39
|
-
|
40
|
-
def execute
|
41
|
-
print_frames(@state.context, @state.frame_pos)
|
42
|
-
end
|
43
|
-
|
44
|
-
class << self
|
45
|
-
def help_command
|
46
|
-
%w|where backtrace|
|
47
|
-
end
|
48
|
-
|
49
|
-
def help(cmd)
|
50
|
-
if cmd == 'where'
|
51
|
-
%{
|
52
|
-
w[here]\tdisplay frames
|
53
|
-
}
|
54
|
-
else
|
55
|
-
%{
|
56
|
-
bt|backtrace\t\talias for where
|
57
|
-
}
|
58
|
-
end
|
59
|
-
end
|
60
|
-
end
|
61
|
-
end
|
62
|
-
|
63
|
-
class UpCommand < Command # :nodoc:
|
64
|
-
include FrameFunctions
|
65
|
-
def regexp
|
66
|
-
/^\s* u(?:p)? (?:\s+(.*))? .*$/x
|
67
|
-
end
|
68
|
-
|
69
|
-
def execute
|
70
|
-
unless @match[1]
|
71
|
-
pos = 1
|
72
|
-
else
|
73
|
-
pos = get_int(@match[1], "Up")
|
74
|
-
return unless pos
|
75
|
-
end
|
76
|
-
adjust_frame(pos, false)
|
77
|
-
end
|
78
|
-
|
79
|
-
class << self
|
80
|
-
def help_command
|
81
|
-
'up'
|
82
|
-
end
|
83
|
-
|
84
|
-
def help(cmd)
|
85
|
-
%{
|
86
|
-
up[count]\tmove to higher frame
|
87
|
-
}
|
88
|
-
end
|
89
|
-
end
|
90
|
-
end
|
91
|
-
|
92
|
-
class DownCommand < Command # :nodoc:
|
93
|
-
include FrameFunctions
|
94
|
-
def regexp
|
95
|
-
/^\s* down (?:\s+(.*))? .*$/x
|
96
|
-
end
|
97
|
-
|
98
|
-
def execute
|
99
|
-
if not @match[1]
|
100
|
-
pos = 1
|
101
|
-
else
|
102
|
-
pos = get_int(@match[1], "Down")
|
103
|
-
return unless pos
|
104
|
-
end
|
105
|
-
adjust_frame(-pos, false)
|
106
|
-
end
|
107
|
-
|
108
|
-
class << self
|
109
|
-
def help_command
|
110
|
-
'down'
|
111
|
-
end
|
112
|
-
|
113
|
-
def help(cmd)
|
114
|
-
%{
|
115
|
-
down[count]\tmove to lower frame
|
116
|
-
}
|
117
|
-
end
|
118
|
-
end
|
119
|
-
end
|
120
|
-
|
121
|
-
class FrameCommand < Command # :nodoc:
|
122
|
-
include FrameFunctions
|
123
|
-
def regexp
|
124
|
-
/^\s* f(?:rame)? (?:\s+ (.*))? \s*$/x
|
125
|
-
end
|
126
|
-
|
127
|
-
def execute
|
128
|
-
if not @match[1]
|
129
|
-
print "Missing a frame number argument.\n"
|
130
|
-
return
|
131
|
-
else
|
132
|
-
pos = get_int(@match[1], "Frame")
|
133
|
-
return unless pos
|
134
|
-
end
|
135
|
-
adjust_frame(pos, true)
|
136
|
-
end
|
137
|
-
|
138
|
-
class << self
|
139
|
-
def help_command
|
140
|
-
'frame'
|
141
|
-
end
|
142
|
-
|
143
|
-
def help(cmd)
|
144
|
-
%{
|
145
|
-
f[rame] frame-number
|
146
|
-
Move the current frame to the specified frame number.
|
147
|
-
|
148
|
-
A negative number indicates position from the other end. So
|
149
|
-
'frame -1' moves to the oldest frame, and 'frame 0' moves to
|
150
|
-
the newest frame.
|
151
|
-
}
|
152
|
-
end
|
153
|
-
end
|
154
|
-
end
|
155
|
-
end
|
1
|
+
module Debugger
|
2
|
+
|
3
|
+
module FrameFunctions # :nodoc:
|
4
|
+
|
5
|
+
def adjust_frame(frame_pos, absolute)
|
6
|
+
if absolute
|
7
|
+
if frame_pos < 0
|
8
|
+
abs_frame_pos = @state.context.stack_size + frame_pos
|
9
|
+
else
|
10
|
+
abs_frame_pos = frame_pos - 1
|
11
|
+
end
|
12
|
+
else
|
13
|
+
abs_frame_pos = @state.frame_pos + frame_pos
|
14
|
+
end
|
15
|
+
|
16
|
+
if abs_frame_pos >= @state.context.stack_size then
|
17
|
+
print_error "Adjusting would put us beyond the oldest (initial) frame.\n"
|
18
|
+
return
|
19
|
+
elsif abs_frame_pos < 0 then
|
20
|
+
print_error "Adjusting would put us beyond the newest (innermost) frame.\n"
|
21
|
+
return
|
22
|
+
end
|
23
|
+
if @state.frame_pos != abs_frame_pos then
|
24
|
+
@state.previous_line = nil
|
25
|
+
@state.frame_pos = abs_frame_pos
|
26
|
+
end
|
27
|
+
@state.file = @state.context.frame_file(@state.frame_pos)
|
28
|
+
@state.line = @state.context.frame_line(@state.frame_pos)
|
29
|
+
|
30
|
+
print_current_frame(@state.frame_pos)
|
31
|
+
end
|
32
|
+
|
33
|
+
end
|
34
|
+
|
35
|
+
class WhereCommand < Command # :nodoc:
|
36
|
+
def regexp
|
37
|
+
/^\s*(?:w(?:here)?|bt|backtrace)$/
|
38
|
+
end
|
39
|
+
|
40
|
+
def execute
|
41
|
+
print_frames(@state.context, @state.frame_pos)
|
42
|
+
end
|
43
|
+
|
44
|
+
class << self
|
45
|
+
def help_command
|
46
|
+
%w|where backtrace|
|
47
|
+
end
|
48
|
+
|
49
|
+
def help(cmd)
|
50
|
+
if cmd == 'where'
|
51
|
+
%{
|
52
|
+
w[here]\tdisplay frames
|
53
|
+
}
|
54
|
+
else
|
55
|
+
%{
|
56
|
+
bt|backtrace\t\talias for where
|
57
|
+
}
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
class UpCommand < Command # :nodoc:
|
64
|
+
include FrameFunctions
|
65
|
+
def regexp
|
66
|
+
/^\s* u(?:p)? (?:\s+(.*))? .*$/x
|
67
|
+
end
|
68
|
+
|
69
|
+
def execute
|
70
|
+
unless @match[1]
|
71
|
+
pos = 1
|
72
|
+
else
|
73
|
+
pos = get_int(@match[1], "Up")
|
74
|
+
return unless pos
|
75
|
+
end
|
76
|
+
adjust_frame(pos, false)
|
77
|
+
end
|
78
|
+
|
79
|
+
class << self
|
80
|
+
def help_command
|
81
|
+
'up'
|
82
|
+
end
|
83
|
+
|
84
|
+
def help(cmd)
|
85
|
+
%{
|
86
|
+
up[count]\tmove to higher frame
|
87
|
+
}
|
88
|
+
end
|
89
|
+
end
|
90
|
+
end
|
91
|
+
|
92
|
+
class DownCommand < Command # :nodoc:
|
93
|
+
include FrameFunctions
|
94
|
+
def regexp
|
95
|
+
/^\s* down (?:\s+(.*))? .*$/x
|
96
|
+
end
|
97
|
+
|
98
|
+
def execute
|
99
|
+
if not @match[1]
|
100
|
+
pos = 1
|
101
|
+
else
|
102
|
+
pos = get_int(@match[1], "Down")
|
103
|
+
return unless pos
|
104
|
+
end
|
105
|
+
adjust_frame(-pos, false)
|
106
|
+
end
|
107
|
+
|
108
|
+
class << self
|
109
|
+
def help_command
|
110
|
+
'down'
|
111
|
+
end
|
112
|
+
|
113
|
+
def help(cmd)
|
114
|
+
%{
|
115
|
+
down[count]\tmove to lower frame
|
116
|
+
}
|
117
|
+
end
|
118
|
+
end
|
119
|
+
end
|
120
|
+
|
121
|
+
class FrameCommand < Command # :nodoc:
|
122
|
+
include FrameFunctions
|
123
|
+
def regexp
|
124
|
+
/^\s* f(?:rame)? (?:\s+ (.*))? \s*$/x
|
125
|
+
end
|
126
|
+
|
127
|
+
def execute
|
128
|
+
if not @match[1]
|
129
|
+
print "Missing a frame number argument.\n"
|
130
|
+
return
|
131
|
+
else
|
132
|
+
pos = get_int(@match[1], "Frame")
|
133
|
+
return unless pos
|
134
|
+
end
|
135
|
+
adjust_frame(pos, true)
|
136
|
+
end
|
137
|
+
|
138
|
+
class << self
|
139
|
+
def help_command
|
140
|
+
'frame'
|
141
|
+
end
|
142
|
+
|
143
|
+
def help(cmd)
|
144
|
+
%{
|
145
|
+
f[rame] frame-number
|
146
|
+
Move the current frame to the specified frame number.
|
147
|
+
|
148
|
+
A negative number indicates position from the other end. So
|
149
|
+
'frame -1' moves to the oldest frame, and 'frame 0' moves to
|
150
|
+
the newest frame.
|
151
|
+
}
|
152
|
+
end
|
153
|
+
end
|
154
|
+
end
|
155
|
+
end
|
@@ -1,25 +1,25 @@
|
|
1
|
-
module Debugger
|
2
|
-
|
3
|
-
class InspectCommand < Command
|
4
|
-
# reference inspection results in order to save them from the GC
|
5
|
-
@@references = []
|
6
|
-
def self.reference_result(result)
|
7
|
-
@@references << result
|
8
|
-
end
|
9
|
-
def self.clear_references
|
10
|
-
@@references = []
|
11
|
-
end
|
12
|
-
|
13
|
-
def regexp
|
14
|
-
/^\s*v(?:ar)?\s+inspect\s+/
|
15
|
-
end
|
16
|
-
#
|
17
|
-
def execute
|
18
|
-
binding = @state.context ? get_binding : TOPLEVEL_BINDING
|
19
|
-
obj = debug_eval(@match.post_match, binding)
|
20
|
-
InspectCommand.reference_result(obj)
|
21
|
-
@printer.print_inspect(obj)
|
22
|
-
end
|
23
|
-
end
|
24
|
-
|
25
|
-
end
|
1
|
+
module Debugger
|
2
|
+
|
3
|
+
class InspectCommand < Command
|
4
|
+
# reference inspection results in order to save them from the GC
|
5
|
+
@@references = []
|
6
|
+
def self.reference_result(result)
|
7
|
+
@@references << result
|
8
|
+
end
|
9
|
+
def self.clear_references
|
10
|
+
@@references = []
|
11
|
+
end
|
12
|
+
|
13
|
+
def regexp
|
14
|
+
/^\s*v(?:ar)?\s+inspect\s+/
|
15
|
+
end
|
16
|
+
#
|
17
|
+
def execute
|
18
|
+
binding = @state.context ? get_binding : TOPLEVEL_BINDING
|
19
|
+
obj = debug_eval(@match.post_match, binding)
|
20
|
+
InspectCommand.reference_result(obj)
|
21
|
+
@printer.print_inspect(obj)
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
end
|
@@ -1,18 +1,18 @@
|
|
1
|
-
module Debugger
|
2
|
-
class LoadCommand < Command
|
3
|
-
def regexp
|
4
|
-
/^\s*load\s+/
|
5
|
-
end
|
6
|
-
|
7
|
-
def execute
|
8
|
-
fileName = @match.post_match
|
9
|
-
@printer.print_debug("loading file: %s", fileName)
|
10
|
-
begin
|
11
|
-
load fileName
|
12
|
-
@printer.print_load_result(fileName)
|
13
|
-
rescue Exception => error
|
14
|
-
@printer.print_load_result(fileName, error)
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
1
|
+
module Debugger
|
2
|
+
class LoadCommand < Command
|
3
|
+
def regexp
|
4
|
+
/^\s*load\s+/
|
5
|
+
end
|
6
|
+
|
7
|
+
def execute
|
8
|
+
fileName = @match.post_match
|
9
|
+
@printer.print_debug("loading file: %s", fileName)
|
10
|
+
begin
|
11
|
+
load fileName
|
12
|
+
@printer.print_load_result(fileName)
|
13
|
+
rescue Exception => error
|
14
|
+
@printer.print_load_result(fileName, error)
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
18
|
end
|