ruby-debug 0.6.2-mswin32 → 0.7-mswin32
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES +8 -1
- data/bin/rdebug +5 -5
- data/ext/ruby_debug.c +377 -158
- data/lib/ruby-debug.rb +5 -7
- data/lib/ruby-debug/command.rb +29 -13
- data/lib/ruby-debug/commands/breakpoints.rb +1 -2
- data/lib/ruby-debug/commands/eval.rb +6 -9
- data/lib/ruby-debug/commands/frame.rb +16 -14
- data/lib/ruby-debug/commands/irb.rb +1 -5
- data/lib/ruby-debug/commands/list.rb +1 -9
- data/lib/ruby-debug/commands/settings.rb +41 -0
- data/lib/ruby-debug/commands/stepping.rb +2 -2
- data/lib/ruby-debug/commands/threads.rb +6 -8
- data/lib/ruby-debug/commands/tmate.rb +3 -4
- data/lib/ruby-debug/commands/variables.rb +10 -4
- data/lib/ruby-debug/processor.rb +12 -14
- data/lib/ruby_debug.so +0 -0
- metadata +15 -15
- data/ext/tags +0 -106
data/lib/ruby-debug/processor.rb
CHANGED
@@ -45,9 +45,8 @@ module Debugger
|
|
45
45
|
protect :at_breakpoint
|
46
46
|
|
47
47
|
def at_catchpoint(context, excpt)
|
48
|
-
|
49
|
-
|
50
|
-
fs = frames.size
|
48
|
+
print "Catchpoint at %s:%d: `%s' (%s)\n", context.frame_file(1), context.frame_line(1), excpt, excpt.class
|
49
|
+
fs = context.stack_size
|
51
50
|
tb = caller(0)[-fs..-1]
|
52
51
|
if tb
|
53
52
|
for i in tb
|
@@ -62,9 +61,9 @@ module Debugger
|
|
62
61
|
end
|
63
62
|
protect :at_tracing
|
64
63
|
|
65
|
-
def at_line(context, file, line
|
64
|
+
def at_line(context, file, line)
|
66
65
|
print "%s:%d: %s", file, line, Debugger.line_at(file, line)
|
67
|
-
process_commands(context, file, line
|
66
|
+
process_commands(context, file, line)
|
68
67
|
end
|
69
68
|
protect :at_line
|
70
69
|
|
@@ -75,24 +74,23 @@ module Debugger
|
|
75
74
|
end
|
76
75
|
|
77
76
|
def prompt(context)
|
78
|
-
if context
|
79
|
-
"(rdb:%d) " % context.thnum
|
80
|
-
else
|
77
|
+
if context.dead?
|
81
78
|
"(rdb:post-mortem) "
|
79
|
+
else
|
80
|
+
"(rdb:%d) " % context.thnum
|
82
81
|
end
|
83
82
|
end
|
84
83
|
|
85
|
-
def process_commands(context, file, line
|
84
|
+
def process_commands(context, file, line)
|
86
85
|
event_cmds = Command.commands.select{|cmd| cmd.event }
|
87
86
|
state = State.new do |s|
|
88
87
|
s.context = context
|
89
88
|
s.file = file
|
90
89
|
s.line = line
|
91
|
-
s.binding =
|
90
|
+
s.binding = context.frame_binding(0)
|
92
91
|
s.display = display
|
93
92
|
s.interface = interface
|
94
93
|
s.commands = event_cmds
|
95
|
-
s.frames = frames
|
96
94
|
end
|
97
95
|
commands = event_cmds.map{|cmd| cmd.new(state) }
|
98
96
|
commands.select{|cmd| cmd.class.always_run }.each{|cmd| cmd.execute }
|
@@ -109,7 +107,7 @@ module Debugger
|
|
109
107
|
|
110
108
|
input.split(";").each do |input|
|
111
109
|
if cmd = commands.find{ |c| c.match(input) }
|
112
|
-
if context.
|
110
|
+
if context.dead? && cmd.class.need_context
|
113
111
|
print "Command is unavailable\n"
|
114
112
|
else
|
115
113
|
cmd.execute
|
@@ -130,7 +128,7 @@ module Debugger
|
|
130
128
|
class State # :nodoc:
|
131
129
|
attr_accessor :context, :file, :line, :binding
|
132
130
|
attr_accessor :frame_pos, :previous_line, :display
|
133
|
-
attr_accessor :interface, :commands
|
131
|
+
attr_accessor :interface, :commands
|
134
132
|
|
135
133
|
def initialize
|
136
134
|
@frame_pos = 0
|
@@ -216,4 +214,4 @@ module Debugger
|
|
216
214
|
end
|
217
215
|
end
|
218
216
|
end
|
219
|
-
end
|
217
|
+
end
|
data/lib/ruby_debug.so
CHANGED
Binary file
|
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.1
|
|
3
3
|
specification_version: 1
|
4
4
|
name: ruby-debug
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.
|
7
|
-
date: 2007-01
|
6
|
+
version: "0.7"
|
7
|
+
date: 2007-02-01 18:49:00 -05:00
|
8
8
|
summary: Fast Ruby debugger
|
9
9
|
require_paths:
|
10
10
|
- lib
|
@@ -36,30 +36,30 @@ files:
|
|
36
36
|
- AUTHORS
|
37
37
|
- lib/ruby-debug
|
38
38
|
- lib/ruby-debug.rb
|
39
|
-
- lib/ruby-debug/command.rb
|
40
39
|
- lib/ruby-debug/commands
|
41
|
-
- lib/ruby-debug/
|
40
|
+
- lib/ruby-debug/command.rb
|
42
41
|
- lib/ruby-debug/processor.rb
|
42
|
+
- lib/ruby-debug/interface.rb
|
43
43
|
- lib/ruby-debug/commands/breakpoints.rb
|
44
|
-
- lib/ruby-debug/commands/
|
44
|
+
- lib/ruby-debug/commands/method.rb
|
45
45
|
- lib/ruby-debug/commands/control.rb
|
46
|
-
- lib/ruby-debug/commands/
|
46
|
+
- lib/ruby-debug/commands/stepping.rb
|
47
47
|
- lib/ruby-debug/commands/eval.rb
|
48
|
-
- lib/ruby-debug/commands/frame.rb
|
49
48
|
- lib/ruby-debug/commands/help.rb
|
50
|
-
- lib/ruby-debug/commands/
|
51
|
-
- lib/ruby-debug/commands/list.rb
|
52
|
-
- lib/ruby-debug/commands/method.rb
|
53
|
-
- lib/ruby-debug/commands/script.rb
|
54
|
-
- lib/ruby-debug/commands/stepping.rb
|
49
|
+
- lib/ruby-debug/commands/catchpoint.rb
|
55
50
|
- lib/ruby-debug/commands/threads.rb
|
56
|
-
- lib/ruby-debug/commands/
|
51
|
+
- lib/ruby-debug/commands/frame.rb
|
52
|
+
- lib/ruby-debug/commands/script.rb
|
57
53
|
- lib/ruby-debug/commands/trace.rb
|
54
|
+
- lib/ruby-debug/commands/display.rb
|
58
55
|
- lib/ruby-debug/commands/variables.rb
|
56
|
+
- lib/ruby-debug/commands/tmate.rb
|
57
|
+
- lib/ruby-debug/commands/list.rb
|
58
|
+
- lib/ruby-debug/commands/irb.rb
|
59
|
+
- lib/ruby-debug/commands/settings.rb
|
60
|
+
- ext/win32
|
59
61
|
- ext/extconf.rb
|
60
62
|
- ext/ruby_debug.c
|
61
|
-
- ext/tags
|
62
|
-
- ext/win32
|
63
63
|
- bin/rdebug
|
64
64
|
- lib/ruby_debug.so
|
65
65
|
test_files: []
|
data/ext/tags
DELETED
@@ -1,106 +0,0 @@
|
|
1
|
-
CTX_FL_SET ruby_debug.c /^#define CTX_FL_SET(c,f) do { (c)->flags |= (f); } /
|
2
|
-
CTX_FL_TEST ruby_debug.c /^#define CTX_FL_TEST(c,f) ((c)->flags & (f))$/
|
3
|
-
CTX_FL_UNSET ruby_debug.c /^#define CTX_FL_UNSET(c,f) do { (c)->flags &= ~(f);/
|
4
|
-
Init_breakpoint ruby_debug.c /^Init_breakpoint()$/
|
5
|
-
Init_context ruby_debug.c /^Init_context()$/
|
6
|
-
Init_frame ruby_debug.c /^Init_frame()$/
|
7
|
-
Init_ruby_debug ruby_debug.c /^Init_ruby_debug()$/
|
8
|
-
VALUE ruby_debug.c /^ typedef VALUE (*id2ref_func_t)(VALUE, VALUE);$/
|
9
|
-
add_to_locked ruby_debug.c /^add_to_locked(VALUE thread)$/
|
10
|
-
bp_type ruby_debug.c /^enum bp_type {BP_POS_TYPE, BP_METHOD_TYPE};$/
|
11
|
-
breakpoint_expr ruby_debug.c /^breakpoint_expr(VALUE self)$/
|
12
|
-
breakpoint_id ruby_debug.c /^breakpoint_id(VALUE self)$/
|
13
|
-
breakpoint_mark ruby_debug.c /^breakpoint_mark(void *data)$/
|
14
|
-
breakpoint_pos ruby_debug.c /^breakpoint_pos(VALUE self)$/
|
15
|
-
breakpoint_source ruby_debug.c /^breakpoint_source(VALUE self)$/
|
16
|
-
call_at_line ruby_debug.c /^call_at_line(VALUE context, int thnum, VALUE file,/
|
17
|
-
call_at_line_unprotected ruby_debug.c /^call_at_line_unprotected(VALUE args)$/
|
18
|
-
check_breakpoint_expression ruby_debug.c /^check_breakpoint_expression(VALUE breakpoint, VALU/
|
19
|
-
check_breakpoints_by_method ruby_debug.c /^check_breakpoints_by_method(debug_context_t *debug/
|
20
|
-
check_breakpoints_by_pos ruby_debug.c /^check_breakpoints_by_pos(debug_context_t *debug_co/
|
21
|
-
check_thread_contexts ruby_debug.c /^check_thread_contexts()$/
|
22
|
-
classname_cmp ruby_debug.c /^classname_cmp(VALUE name, VALUE klass)$/
|
23
|
-
context_frames ruby_debug.c /^context_frames(VALUE self)$/
|
24
|
-
context_ignore ruby_debug.c /^context_ignore(VALUE self)$/
|
25
|
-
context_resume ruby_debug.c /^context_resume(VALUE self)$/
|
26
|
-
context_set_ignore ruby_debug.c /^context_set_ignore(VALUE self, VALUE value)$/
|
27
|
-
context_set_tracing ruby_debug.c /^context_set_tracing(VALUE self, VALUE value)$/
|
28
|
-
context_step_over ruby_debug.c /^context_step_over(int argc, VALUE *argv, VALUE sel/
|
29
|
-
context_stop_frame ruby_debug.c /^context_stop_frame(VALUE self, VALUE frame)$/
|
30
|
-
context_stop_next ruby_debug.c /^context_stop_next(VALUE self, VALUE steps)$/
|
31
|
-
context_suspend ruby_debug.c /^context_suspend(VALUE self)$/
|
32
|
-
context_thnum ruby_debug.c /^context_thnum(VALUE self)$/
|
33
|
-
context_thread ruby_debug.c /^context_thread(VALUE self)$/
|
34
|
-
context_thread_0 ruby_debug.c /^context_thread_0(debug_context_t *debug_context)$/
|
35
|
-
context_tracing ruby_debug.c /^context_tracing(VALUE self)$/
|
36
|
-
create_binding ruby_debug.c /^create_binding(VALUE self)$/
|
37
|
-
debug_add_breakpoint ruby_debug.c /^debug_add_breakpoint(int argc, VALUE *argv, VALUE /
|
38
|
-
debug_at_exit ruby_debug.c /^debug_at_exit(VALUE self)$/
|
39
|
-
debug_at_exit_c ruby_debug.c /^debug_at_exit_c(VALUE proc)$/
|
40
|
-
debug_at_exit_i ruby_debug.c /^debug_at_exit_i(VALUE proc)$/
|
41
|
-
debug_breakpoint_t ruby_debug.c /^} debug_breakpoint_t;$/
|
42
|
-
debug_breakpoints ruby_debug.c /^debug_breakpoints(VALUE self)$/
|
43
|
-
debug_catchpoint ruby_debug.c /^debug_catchpoint(VALUE self)$/
|
44
|
-
debug_check_started ruby_debug.c /^debug_check_started()$/
|
45
|
-
debug_context_create ruby_debug.c /^debug_context_create(VALUE thread)$/
|
46
|
-
debug_context_mark ruby_debug.c /^debug_context_mark(void* data)$/
|
47
|
-
debug_context_t ruby_debug.c /^} debug_context_t;$/
|
48
|
-
debug_contexts ruby_debug.c /^debug_contexts(VALUE self)$/
|
49
|
-
debug_current_context ruby_debug.c /^debug_current_context(VALUE self)$/
|
50
|
-
debug_debug_load ruby_debug.c /^debug_debug_load(VALUE self, VALUE file)$/
|
51
|
-
debug_event_hook ruby_debug.c /^debug_event_hook(rb_event_t event, NODE *node, VAL/
|
52
|
-
debug_frame_create ruby_debug.c /^debug_frame_create(char *file, int line, VALUE bin/
|
53
|
-
debug_frame_mark ruby_debug.c /^debug_frame_mark(void *data)$/
|
54
|
-
debug_frame_t ruby_debug.c /^} debug_frame_t;$/
|
55
|
-
debug_is_started ruby_debug.c /^debug_is_started(VALUE self)$/
|
56
|
-
debug_keep_frame_info ruby_debug.c /^debug_keep_frame_info(VALUE self)$/
|
57
|
-
debug_last_interrupted ruby_debug.c /^debug_last_interrupted(VALUE self)$/
|
58
|
-
debug_post_mortem ruby_debug.c /^debug_post_mortem(VALUE self)$/
|
59
|
-
debug_remove_breakpoint ruby_debug.c /^debug_remove_breakpoint(VALUE self, VALUE id_value/
|
60
|
-
debug_resume ruby_debug.c /^debug_resume(VALUE self)$/
|
61
|
-
debug_set_catchpoint ruby_debug.c /^debug_set_catchpoint(VALUE self, VALUE value)$/
|
62
|
-
debug_set_keep_frame_info ruby_debug.c /^debug_set_keep_frame_info(VALUE self, VALUE value)/
|
63
|
-
debug_set_post_mortem ruby_debug.c /^debug_set_post_mortem(VALUE self, VALUE value)$/
|
64
|
-
debug_set_tracing ruby_debug.c /^debug_set_tracing(VALUE self, VALUE value)$/
|
65
|
-
debug_skip ruby_debug.c /^debug_skip(VALUE self)$/
|
66
|
-
debug_start ruby_debug.c /^debug_start(VALUE self)$/
|
67
|
-
debug_stop ruby_debug.c /^debug_stop(VALUE self)$/
|
68
|
-
debug_stop_i ruby_debug.c /^debug_stop_i(VALUE self)$/
|
69
|
-
debug_suspend ruby_debug.c /^debug_suspend(VALUE self)$/
|
70
|
-
debug_tracing ruby_debug.c /^debug_tracing(VALUE self)$/
|
71
|
-
eval_expression ruby_debug.c /^eval_expression(VALUE args)$/
|
72
|
-
filename_cmp ruby_debug.c /^filename_cmp(VALUE source, char *file)$/
|
73
|
-
find_last_context_func ruby_debug.c /^find_last_context_func(VALUE key, VALUE value, VAL/
|
74
|
-
frame_binding ruby_debug.c /^frame_binding(VALUE self)$/
|
75
|
-
frame_file ruby_debug.c /^frame_file(VALUE self)$/
|
76
|
-
frame_id ruby_debug.c /^frame_id(VALUE self)$/
|
77
|
-
frame_line ruby_debug.c /^frame_line(VALUE self)$/
|
78
|
-
get_breakpoint_at ruby_debug.c /^get_breakpoint_at(int index) $/
|
79
|
-
get_top_frame ruby_debug.c /^get_top_frame(debug_context_t *debug_context)$/
|
80
|
-
id2ref ruby_debug.c /^id2ref(unsigned long id)$/
|
81
|
-
id2ref_error ruby_debug.c /^id2ref_error()$/
|
82
|
-
id2ref_unprotected ruby_debug.c /^id2ref_unprotected(VALUE id)$/
|
83
|
-
is_in_locked ruby_debug.c /^is_in_locked(unsigned long thread_id)$/
|
84
|
-
is_thread_alive ruby_debug.c /^is_thread_alive(VALUE thread)$/
|
85
|
-
isdirsep ruby_debug.c /^#define isdirsep(x) ((x) == '\/' || (x) == '\\\\')/
|
86
|
-
locked_thread_t ruby_debug.c /^} locked_thread_t;$/
|
87
|
-
min ruby_debug.c /^#define min(x,y) ((x) < (y) ? (x) : (y))$/
|
88
|
-
ref2id ruby_debug.c /^ref2id(VALUE obj)$/
|
89
|
-
remove_from_locked ruby_debug.c /^remove_from_locked()$/
|
90
|
-
ruby_method_ptr ruby_debug.c /^ruby_method_ptr(VALUE class, ID meth_id)$/
|
91
|
-
save_call_frame ruby_debug.c /^save_call_frame(VALUE self, char *file, int line, /
|
92
|
-
save_current_position ruby_debug.c /^save_current_position(VALUE context)$/
|
93
|
-
save_top_binding ruby_debug.c /^save_top_binding(debug_context_t *debug_context, V/
|
94
|
-
set_current_skipped_status ruby_debug.c /^set_current_skipped_status(VALUE status)$/
|
95
|
-
set_frame_source ruby_debug.c /^set_frame_source(debug_context_t *debug_context, c/
|
96
|
-
thread_cmp ruby_debug.c /^thread_cmp(VALUE a, VALUE b)$/
|
97
|
-
thread_context_lookup ruby_debug.c /^thread_context_lookup(VALUE thread)$/
|
98
|
-
thread_hash ruby_debug.c /^thread_hash(unsigned long thread_id)$/
|
99
|
-
threads_table_check_i ruby_debug.c /^threads_table_check_i(VALUE key, VALUE value, VALU/
|
100
|
-
threads_table_clear ruby_debug.c /^threads_table_clear(VALUE table)$/
|
101
|
-
threads_table_clear_i ruby_debug.c /^threads_table_clear_i(VALUE key, VALUE value, VALU/
|
102
|
-
threads_table_create ruby_debug.c /^threads_table_create()$/
|
103
|
-
threads_table_free ruby_debug.c /^threads_table_free(void* data)$/
|
104
|
-
threads_table_mark ruby_debug.c /^threads_table_mark(void* data)$/
|
105
|
-
threads_table_mark_keyvalue ruby_debug.c /^threads_table_mark_keyvalue(VALUE key, VALUE value/
|
106
|
-
threads_table_t ruby_debug.c /^} threads_table_t;$/
|