ruby-debug 0.6-mswin32 → 0.6.1-mswin32
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES +3 -0
- data/bin/rdebug +3 -3
- data/ext/ruby_debug.c +25 -39
- data/ext/tags +27 -11
- data/lib/ruby-debug.rb +1 -1
- data/lib/ruby-debug/command.rb +1 -1
- data/lib/ruby-debug/commands/frame.rb +3 -3
- data/lib/ruby-debug/commands/stepping.rb +2 -2
- data/lib/ruby-debug/commands/threads.rb +1 -1
- data/lib/ruby-debug/commands/tmate.rb +1 -1
- data/lib/ruby-debug/processor.rb +2 -2
- data/lib/ruby_debug.so +0 -0
- metadata +3 -3
data/CHANGES
CHANGED
data/bin/rdebug
CHANGED
@@ -31,8 +31,8 @@ EOB
|
|
31
31
|
opts.on("-h", "--host HOST", "Host name used for remote debugging") {|options.host|}
|
32
32
|
opts.on("-w", "--wait", "Wait for a client connection, implies -s option") {options.wait = true}
|
33
33
|
opts.on("-x", "--trace", "turn on line tracing") {options.tracing = true}
|
34
|
-
opts.on("-n", "--nostop", "Do not stop when
|
35
|
-
opts.on("-f", "--keep-frame-
|
34
|
+
opts.on("-n", "--nostop", "Do not stop when stript is loaded") {options.nostop = true}
|
35
|
+
opts.on("-f", "--keep-frame-info", "Keep frame info") {options.frame_info = true}
|
36
36
|
opts.on("-m", "--post-mortem", "Activate post-mortem mode") {options.post_mortem = true}
|
37
37
|
opts.on("-p", "--port PORT", Integer, "Port used for remote debugging") {|options.port|}
|
38
38
|
opts.on("-I", "--include PATH", String, "Add PATH to $LOAD_PATH") do |path|
|
@@ -100,7 +100,7 @@ else
|
|
100
100
|
if options.tracing
|
101
101
|
Debugger.tracing = true
|
102
102
|
else
|
103
|
-
debugger 2
|
103
|
+
debugger 2 unless options.nostop
|
104
104
|
end
|
105
105
|
Debugger.debug_load Debugger::PROG_SCRIPT
|
106
106
|
end
|
data/ext/ruby_debug.c
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
#include <rubysig.h>
|
5
5
|
#include <st.h>
|
6
6
|
|
7
|
-
#define DEBUG_VERSION "0.6"
|
7
|
+
#define DEBUG_VERSION "0.6.1"
|
8
8
|
|
9
9
|
#define CTX_FL_MOVED (1<<1)
|
10
10
|
#define CTX_FL_SUSPEND (1<<2)
|
@@ -98,6 +98,7 @@ static unsigned long hook_count = 0;
|
|
98
98
|
|
99
99
|
static VALUE create_binding(VALUE);
|
100
100
|
static VALUE debug_stop(VALUE);
|
101
|
+
static void save_current_position(debug_context_t *);
|
101
102
|
|
102
103
|
typedef struct locked_thread_t {
|
103
104
|
unsigned long thread_id;
|
@@ -398,25 +399,6 @@ debug_frame_create(char *file, int line, VALUE binding, ID id)
|
|
398
399
|
return result;
|
399
400
|
}
|
400
401
|
|
401
|
-
static void
|
402
|
-
save_current_position(VALUE context)
|
403
|
-
{
|
404
|
-
VALUE cur_frame;
|
405
|
-
debug_context_t *debug_context;
|
406
|
-
debug_frame_t *debug_frame;
|
407
|
-
|
408
|
-
Data_Get_Struct(context, debug_context_t, debug_context);
|
409
|
-
if(RARRAY(debug_context->frames)->len == 0)
|
410
|
-
return;
|
411
|
-
|
412
|
-
cur_frame = *RARRAY(debug_context->frames)->ptr;
|
413
|
-
Data_Get_Struct(cur_frame, debug_frame_t, debug_frame);
|
414
|
-
|
415
|
-
debug_context->last_file = debug_frame->file;
|
416
|
-
debug_context->last_line = debug_frame->line;
|
417
|
-
CTX_FL_UNSET(debug_context, CTX_FL_MOVED);
|
418
|
-
}
|
419
|
-
|
420
402
|
static VALUE
|
421
403
|
call_at_line_unprotected(VALUE args)
|
422
404
|
{
|
@@ -426,12 +408,12 @@ call_at_line_unprotected(VALUE args)
|
|
426
408
|
}
|
427
409
|
|
428
410
|
static VALUE
|
429
|
-
call_at_line(VALUE context,
|
411
|
+
call_at_line(VALUE context, debug_context_t *debug_context, VALUE file, VALUE line)
|
430
412
|
{
|
431
413
|
VALUE args;
|
432
414
|
|
433
|
-
last_debugged_thnum = thnum;
|
434
|
-
save_current_position(
|
415
|
+
last_debugged_thnum = debug_context->thnum;
|
416
|
+
save_current_position(debug_context);
|
435
417
|
|
436
418
|
args = rb_ary_new3(3, context, file, line);
|
437
419
|
return rb_protect(call_at_line_unprotected, args, 0);
|
@@ -444,7 +426,7 @@ save_call_frame(VALUE self, char *file, int line, ID mid, debug_context_t *debug
|
|
444
426
|
|
445
427
|
binding = self && RTEST(keep_frame_info)? create_binding(self) : Qnil;
|
446
428
|
frame = debug_frame_create(file, line, binding, mid);
|
447
|
-
|
429
|
+
rb_ary_push(debug_context->frames, frame);
|
448
430
|
}
|
449
431
|
|
450
432
|
#if defined DOSISH
|
@@ -589,7 +571,7 @@ get_top_frame(debug_context_t *debug_context)
|
|
589
571
|
if(RARRAY(debug_context->frames)->len == 0)
|
590
572
|
return NULL;
|
591
573
|
else {
|
592
|
-
frame = RARRAY(debug_context->frames)->ptr[
|
574
|
+
frame = RARRAY(debug_context->frames)->ptr[RARRAY(debug_context->frames)->len-1];
|
593
575
|
Data_Get_Struct(frame, debug_frame_t, debug_frame);
|
594
576
|
return debug_frame;
|
595
577
|
}
|
@@ -616,6 +598,18 @@ set_frame_source(debug_context_t *debug_context, char *file, int line)
|
|
616
598
|
}
|
617
599
|
}
|
618
600
|
|
601
|
+
static void
|
602
|
+
save_current_position(debug_context_t *debug_context)
|
603
|
+
{
|
604
|
+
debug_frame_t *debug_frame;
|
605
|
+
|
606
|
+
debug_frame = get_top_frame(debug_context);
|
607
|
+
if(!debug_frame) return;
|
608
|
+
debug_context->last_file = debug_frame->file;
|
609
|
+
debug_context->last_line = debug_frame->line;
|
610
|
+
CTX_FL_UNSET(debug_context, CTX_FL_MOVED);
|
611
|
+
}
|
612
|
+
|
619
613
|
static void
|
620
614
|
debug_event_hook(rb_event_t event, NODE *node, VALUE self, ID mid, VALUE klass)
|
621
615
|
{
|
@@ -679,9 +673,7 @@ debug_event_hook(rb_event_t event, NODE *node, VALUE self, ID mid, VALUE klass)
|
|
679
673
|
set_frame_source(debug_context, file, line);
|
680
674
|
|
681
675
|
if(RTEST(tracing) || CTX_FL_TEST(debug_context, CTX_FL_TRACING))
|
682
|
-
{
|
683
676
|
rb_funcall(context, idAtTracing, 2, rb_str_new2(file), INT2FIX(line));
|
684
|
-
}
|
685
677
|
|
686
678
|
if(debug_context->dest_frame == -1 ||
|
687
679
|
RARRAY(debug_context->frames)->len == debug_context->dest_frame)
|
@@ -691,9 +683,7 @@ debug_event_hook(rb_event_t event, NODE *node, VALUE self, ID mid, VALUE klass)
|
|
691
683
|
debug_context->stop_next = -1;
|
692
684
|
/* we check that we actualy moved to another line */
|
693
685
|
if(DID_MOVED)
|
694
|
-
{
|
695
686
|
debug_context->stop_line--;
|
696
|
-
}
|
697
687
|
}
|
698
688
|
else if(RARRAY(debug_context->frames)->len < debug_context->dest_frame)
|
699
689
|
{
|
@@ -701,9 +691,7 @@ debug_event_hook(rb_event_t event, NODE *node, VALUE self, ID mid, VALUE klass)
|
|
701
691
|
}
|
702
692
|
|
703
693
|
if(RARRAY(debug_context->frames)->len == 0)
|
704
|
-
{
|
705
694
|
save_call_frame(self, file, line, mid, debug_context);
|
706
|
-
}
|
707
695
|
|
708
696
|
if(debug_context->stop_next == 0 || debug_context->stop_line == 0 ||
|
709
697
|
(breakpoint_index = check_breakpoints_by_pos(debug_context, file, line)) != -1)
|
@@ -714,9 +702,7 @@ debug_event_hook(rb_event_t event, NODE *node, VALUE self, ID mid, VALUE klass)
|
|
714
702
|
{
|
715
703
|
breakpoint = get_breakpoint_at(breakpoint_index);
|
716
704
|
if(check_breakpoint_expression(breakpoint, binding))
|
717
|
-
{
|
718
705
|
rb_funcall(context, idAtBreakpoint, 1, breakpoint);
|
719
|
-
}
|
720
706
|
else
|
721
707
|
break;
|
722
708
|
}
|
@@ -727,7 +713,7 @@ debug_event_hook(rb_event_t event, NODE *node, VALUE self, ID mid, VALUE klass)
|
|
727
713
|
debug_context->stop_next = -1;
|
728
714
|
|
729
715
|
save_top_binding(debug_context, binding);
|
730
|
-
call_at_line(context, debug_context
|
716
|
+
call_at_line(context, debug_context, rb_str_new2(file), INT2FIX(line));
|
731
717
|
}
|
732
718
|
break;
|
733
719
|
}
|
@@ -753,7 +739,7 @@ debug_event_hook(rb_event_t event, NODE *node, VALUE self, ID mid, VALUE klass)
|
|
753
739
|
{
|
754
740
|
save_top_binding(debug_context, binding);
|
755
741
|
rb_funcall(context, idAtBreakpoint, 1, breakpoint);
|
756
|
-
call_at_line(context, debug_context
|
742
|
+
call_at_line(context, debug_context, rb_str_new2(file), INT2FIX(line));
|
757
743
|
}
|
758
744
|
}
|
759
745
|
break;
|
@@ -766,7 +752,7 @@ debug_event_hook(rb_event_t event, NODE *node, VALUE self, ID mid, VALUE klass)
|
|
766
752
|
debug_context->stop_next = 1;
|
767
753
|
debug_context->stop_frame = 0;
|
768
754
|
}
|
769
|
-
|
755
|
+
rb_ary_pop(debug_context->frames);
|
770
756
|
break;
|
771
757
|
}
|
772
758
|
case RUBY_EVENT_CLASS:
|
@@ -809,7 +795,7 @@ debug_event_hook(rb_event_t event, NODE *node, VALUE self, ID mid, VALUE klass)
|
|
809
795
|
if(self && binding == Qnil)
|
810
796
|
binding = create_binding(self);
|
811
797
|
save_top_binding(debug_context, binding);
|
812
|
-
call_at_line(context, debug_context
|
798
|
+
call_at_line(context, debug_context, rb_str_new2(file), INT2FIX(line));
|
813
799
|
break;
|
814
800
|
}
|
815
801
|
}
|
@@ -1436,7 +1422,7 @@ context_step_over(int argc, VALUE *argv, VALUE self)
|
|
1436
1422
|
{
|
1437
1423
|
if(FIX2INT(frame) < 0 && FIX2INT(frame) >= RARRAY(debug_context->frames)->len)
|
1438
1424
|
rb_raise(rb_eRuntimeError, "Destination frame is out of range.");
|
1439
|
-
debug_context->dest_frame = FIX2INT(frame);
|
1425
|
+
debug_context->dest_frame = RARRAY(debug_context->frames)->len - FIX2INT(frame);
|
1440
1426
|
}
|
1441
1427
|
|
1442
1428
|
return Qnil;
|
@@ -1458,7 +1444,7 @@ context_stop_frame(VALUE self, VALUE frame)
|
|
1458
1444
|
Data_Get_Struct(self, debug_context_t, debug_context);
|
1459
1445
|
if(FIX2INT(frame) < 0 && FIX2INT(frame) >= RARRAY(debug_context->frames)->len)
|
1460
1446
|
rb_raise(rb_eRuntimeError, "Stop frame is out of range.");
|
1461
|
-
debug_context->stop_frame = FIX2INT(frame);
|
1447
|
+
debug_context->stop_frame = RARRAY(debug_context->frames)->len - FIX2INT(frame);
|
1462
1448
|
|
1463
1449
|
return frame;
|
1464
1450
|
}
|
data/ext/tags
CHANGED
@@ -5,19 +5,21 @@ Init_breakpoint ruby_debug.c /^Init_breakpoint()$/
|
|
5
5
|
Init_context ruby_debug.c /^Init_context()$/
|
6
6
|
Init_frame ruby_debug.c /^Init_frame()$/
|
7
7
|
Init_ruby_debug ruby_debug.c /^Init_ruby_debug()$/
|
8
|
-
VALUE ruby_debug.c /^ typedef VALUE (*
|
8
|
+
VALUE ruby_debug.c /^ typedef VALUE (*id2ref_func_t)(VALUE, VALUE);$/
|
9
9
|
add_to_locked ruby_debug.c /^add_to_locked(VALUE thread)$/
|
10
|
-
|
10
|
+
bp_type ruby_debug.c /^enum bp_type {BP_POS_TYPE, BP_METHOD_TYPE};$/
|
11
11
|
breakpoint_expr ruby_debug.c /^breakpoint_expr(VALUE self)$/
|
12
12
|
breakpoint_id ruby_debug.c /^breakpoint_id(VALUE self)$/
|
13
13
|
breakpoint_mark ruby_debug.c /^breakpoint_mark(void *data)$/
|
14
14
|
breakpoint_pos ruby_debug.c /^breakpoint_pos(VALUE self)$/
|
15
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
|
16
|
+
call_at_line ruby_debug.c /^call_at_line(VALUE context, int thnum, VALUE file,/
|
17
17
|
call_at_line_unprotected ruby_debug.c /^call_at_line_unprotected(VALUE args)$/
|
18
18
|
check_breakpoint_expression ruby_debug.c /^check_breakpoint_expression(VALUE breakpoint, VALU/
|
19
|
-
|
20
|
-
|
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)$/
|
21
23
|
context_frames ruby_debug.c /^context_frames(VALUE self)$/
|
22
24
|
context_ignore ruby_debug.c /^context_ignore(VALUE self)$/
|
23
25
|
context_resume ruby_debug.c /^context_resume(VALUE self)$/
|
@@ -29,6 +31,7 @@ context_stop_next ruby_debug.c /^context_stop_next(VALUE self, VALUE steps)$/
|
|
29
31
|
context_suspend ruby_debug.c /^context_suspend(VALUE self)$/
|
30
32
|
context_thnum ruby_debug.c /^context_thnum(VALUE self)$/
|
31
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)$/
|
32
35
|
context_tracing ruby_debug.c /^context_tracing(VALUE self)$/
|
33
36
|
create_binding ruby_debug.c /^create_binding(VALUE self)$/
|
34
37
|
debug_add_breakpoint ruby_debug.c /^debug_add_breakpoint(int argc, VALUE *argv, VALUE /
|
@@ -46,15 +49,17 @@ debug_contexts ruby_debug.c /^debug_contexts(VALUE self)$/
|
|
46
49
|
debug_current_context ruby_debug.c /^debug_current_context(VALUE self)$/
|
47
50
|
debug_debug_load ruby_debug.c /^debug_debug_load(VALUE self, VALUE file)$/
|
48
51
|
debug_event_hook ruby_debug.c /^debug_event_hook(rb_event_t event, NODE *node, VAL/
|
49
|
-
debug_frame_create ruby_debug.c /^debug_frame_create(
|
52
|
+
debug_frame_create ruby_debug.c /^debug_frame_create(char *file, int line, VALUE bin/
|
50
53
|
debug_frame_mark ruby_debug.c /^debug_frame_mark(void *data)$/
|
51
54
|
debug_frame_t ruby_debug.c /^} debug_frame_t;$/
|
52
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)$/
|
53
57
|
debug_last_interrupted ruby_debug.c /^debug_last_interrupted(VALUE self)$/
|
54
58
|
debug_post_mortem ruby_debug.c /^debug_post_mortem(VALUE self)$/
|
55
59
|
debug_remove_breakpoint ruby_debug.c /^debug_remove_breakpoint(VALUE self, VALUE id_value/
|
56
60
|
debug_resume ruby_debug.c /^debug_resume(VALUE self)$/
|
57
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)/
|
58
63
|
debug_set_post_mortem ruby_debug.c /^debug_set_post_mortem(VALUE self, VALUE value)$/
|
59
64
|
debug_set_tracing ruby_debug.c /^debug_set_tracing(VALUE self, VALUE value)$/
|
60
65
|
debug_skip ruby_debug.c /^debug_skip(VALUE self)$/
|
@@ -64,23 +69,34 @@ debug_stop_i ruby_debug.c /^debug_stop_i(VALUE self)$/
|
|
64
69
|
debug_suspend ruby_debug.c /^debug_suspend(VALUE self)$/
|
65
70
|
debug_tracing ruby_debug.c /^debug_tracing(VALUE self)$/
|
66
71
|
eval_expression ruby_debug.c /^eval_expression(VALUE args)$/
|
67
|
-
filename_cmp ruby_debug.c /^filename_cmp(
|
72
|
+
filename_cmp ruby_debug.c /^filename_cmp(VALUE source, char *file)$/
|
68
73
|
find_last_context_func ruby_debug.c /^find_last_context_func(VALUE key, VALUE value, VAL/
|
69
74
|
frame_binding ruby_debug.c /^frame_binding(VALUE self)$/
|
70
75
|
frame_file ruby_debug.c /^frame_file(VALUE self)$/
|
71
76
|
frame_id ruby_debug.c /^frame_id(VALUE self)$/
|
72
77
|
frame_line ruby_debug.c /^frame_line(VALUE self)$/
|
73
78
|
get_breakpoint_at ruby_debug.c /^get_breakpoint_at(int index) $/
|
74
|
-
|
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) == '\\\\')/
|
75
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)$/
|
76
89
|
remove_from_locked ruby_debug.c /^remove_from_locked()$/
|
77
|
-
|
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, /
|
78
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/
|
79
94
|
set_current_skipped_status ruby_debug.c /^set_current_skipped_status(VALUE status)$/
|
80
|
-
set_frame_source ruby_debug.c /^set_frame_source(debug_context_t *debug_context,
|
95
|
+
set_frame_source ruby_debug.c /^set_frame_source(debug_context_t *debug_context, c/
|
81
96
|
thread_cmp ruby_debug.c /^thread_cmp(VALUE a, VALUE b)$/
|
82
97
|
thread_context_lookup ruby_debug.c /^thread_context_lookup(VALUE thread)$/
|
83
|
-
thread_hash ruby_debug.c /^thread_hash(
|
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/
|
84
100
|
threads_table_clear ruby_debug.c /^threads_table_clear(VALUE table)$/
|
85
101
|
threads_table_clear_i ruby_debug.c /^threads_table_clear_i(VALUE key, VALUE value, VALU/
|
86
102
|
threads_table_create ruby_debug.c /^threads_table_create()$/
|
data/lib/ruby-debug.rb
CHANGED
@@ -284,7 +284,7 @@ module Kernel
|
|
284
284
|
# Returns a binding of n-th call frame
|
285
285
|
#
|
286
286
|
def binding_n(n = 0)
|
287
|
-
frame = Debugger.current_context.frames[n
|
287
|
+
frame = Debugger.current_context.frames[-2 - n]
|
288
288
|
raise "Unknown frame #{n}" unless frame
|
289
289
|
frame.binding
|
290
290
|
end
|
data/lib/ruby-debug/command.rb
CHANGED
@@ -64,7 +64,7 @@ module Debugger
|
|
64
64
|
|
65
65
|
def debug_eval(str, b = @state.binding)
|
66
66
|
unless b
|
67
|
-
print "Can't evaluate in the current context.\n"
|
67
|
+
print "Can't evaluate in the current context.\nUse rdebug with -f option, or set Debugger.keep_frame_info = true.\n"
|
68
68
|
throw :debug_error
|
69
69
|
end
|
70
70
|
begin
|
@@ -15,7 +15,7 @@ module Debugger
|
|
15
15
|
end
|
16
16
|
|
17
17
|
def execute
|
18
|
-
@state.frames.each_with_index do |frame, idx|
|
18
|
+
@state.frames.reverse.each_with_index do |frame, idx|
|
19
19
|
if idx == @state.frame_pos
|
20
20
|
print "--> "
|
21
21
|
else
|
@@ -68,7 +68,7 @@ module Debugger
|
|
68
68
|
@state.frame_pos = @state.frames.size - 1
|
69
69
|
print "At toplevel\n"
|
70
70
|
end
|
71
|
-
frame = @state.frames[@state.frame_pos]
|
71
|
+
frame = @state.frames[-1 - @state.frame_pos]
|
72
72
|
@state.binding, @state.file, @state.line = frame.binding, frame.file, frame.line
|
73
73
|
print format_frame(frame, @state.frame_pos)
|
74
74
|
end
|
@@ -106,7 +106,7 @@ module Debugger
|
|
106
106
|
@state.frame_pos = 0
|
107
107
|
print "At stack bottom\n"
|
108
108
|
end
|
109
|
-
frame = @state.frames[@state.frame_pos]
|
109
|
+
frame = @state.frames[-1 - @state.frame_pos]
|
110
110
|
@state.binding, @state.file, @state.line = frame.binding, frame.file, frame.line
|
111
111
|
print format_frame(frame, @state.frame_pos)
|
112
112
|
end
|
@@ -8,7 +8,7 @@ module Debugger
|
|
8
8
|
|
9
9
|
def execute
|
10
10
|
steps = @match[1] ? @match[1].to_i : 1
|
11
|
-
@state.context.step_over steps, @state.
|
11
|
+
@state.context.step_over steps, @state.frame_pos
|
12
12
|
@state.proceed
|
13
13
|
end
|
14
14
|
|
@@ -61,7 +61,7 @@ module Debugger
|
|
61
61
|
if @state.frame_pos == @state.frames.size
|
62
62
|
print "\"finish\" not meaningful in the outermost frame.\n"
|
63
63
|
else
|
64
|
-
@state.context.stop_frame = @state.
|
64
|
+
@state.context.stop_frame = @state.frame_pos
|
65
65
|
@state.frame_pos = 0
|
66
66
|
@state.proceed
|
67
67
|
end
|
data/lib/ruby-debug/processor.rb
CHANGED
@@ -46,7 +46,7 @@ module Debugger
|
|
46
46
|
|
47
47
|
def at_catchpoint(context, excpt)
|
48
48
|
frames = context.frames
|
49
|
-
print "Catchpoint at %s:%d: `%s' (%s)\n", frames
|
49
|
+
print "Catchpoint at %s:%d: `%s' (%s)\n", frames.last.file, frames.last.line, excpt, excpt.class
|
50
50
|
fs = frames.size
|
51
51
|
tb = caller(0)[-fs..-1]
|
52
52
|
if tb
|
@@ -88,7 +88,7 @@ module Debugger
|
|
88
88
|
s.context = context
|
89
89
|
s.file = file
|
90
90
|
s.line = line
|
91
|
-
s.binding = frames.
|
91
|
+
s.binding = frames.last.binding
|
92
92
|
s.display = display
|
93
93
|
s.interface = interface
|
94
94
|
s.commands = event_cmds
|
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:
|
7
|
-
date: 2007-01-26
|
6
|
+
version: 0.6.1
|
7
|
+
date: 2007-01-26 21:24:26 -05:00
|
8
8
|
summary: Fast Ruby debugger
|
9
9
|
require_paths:
|
10
10
|
- lib
|
@@ -35,6 +35,7 @@ files:
|
|
35
35
|
- CHANGES
|
36
36
|
- lib/ruby-debug
|
37
37
|
- lib/ruby-debug.rb
|
38
|
+
- lib/ruby_debug.so
|
38
39
|
- lib/ruby-debug/command.rb
|
39
40
|
- lib/ruby-debug/commands
|
40
41
|
- lib/ruby-debug/interface.rb
|
@@ -60,7 +61,6 @@ files:
|
|
60
61
|
- ext/tags
|
61
62
|
- ext/win32
|
62
63
|
- bin/rdebug
|
63
|
-
- lib/ruby_debug.so
|
64
64
|
test_files: []
|
65
65
|
|
66
66
|
rdoc_options: []
|