debugger 1.6.4 → 1.6.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 +7 -0
- data/CHANGELOG.md +3 -0
- data/debugger.gemspec +1 -1
- data/ext/ruby_debug/210/breakpoint.c +586 -0
- data/ext/ruby_debug/210/ruby_debug.c +2692 -0
- data/ext/ruby_debug/210/ruby_debug.h +148 -0
- data/ext/ruby_debug/extconf.rb +1 -1
- data/lib/debugger/version.rb +1 -1
- metadata +30 -47
@@ -0,0 +1,148 @@
|
|
1
|
+
/* Context info */
|
2
|
+
enum ctx_stop_reason {CTX_STOP_NONE, CTX_STOP_STEP, CTX_STOP_BREAKPOINT,
|
3
|
+
CTX_STOP_CATCHPOINT};
|
4
|
+
|
5
|
+
/* Context flags */
|
6
|
+
#define CTX_FL_SUSPEND (1<<1)
|
7
|
+
#define CTX_FL_TRACING (1<<2)
|
8
|
+
#define CTX_FL_SKIPPED (1<<3)
|
9
|
+
#define CTX_FL_IGNORE (1<<4)
|
10
|
+
#define CTX_FL_DEAD (1<<5)
|
11
|
+
#define CTX_FL_WAS_RUNNING (1<<6)
|
12
|
+
#define CTX_FL_ENABLE_BKPT (1<<7)
|
13
|
+
#define CTX_FL_STEPPED (1<<8)
|
14
|
+
#define CTX_FL_FORCE_MOVE (1<<9)
|
15
|
+
#define CTX_FL_CATCHING (1<<10)
|
16
|
+
|
17
|
+
#define CTX_FL_TEST(c,f) ((c)->flags & (f))
|
18
|
+
#define CTX_FL_SET(c,f) do { (c)->flags |= (f); } while (0)
|
19
|
+
#define CTX_FL_UNSET(c,f) do { (c)->flags &= ~(f); } while (0)
|
20
|
+
|
21
|
+
typedef struct {
|
22
|
+
struct iseq_catch_table_entry tmp_catch_table;
|
23
|
+
struct iseq_catch_table_entry *old_catch_table;
|
24
|
+
int old_catch_table_size;
|
25
|
+
VALUE mod_name;
|
26
|
+
VALUE errinfo;
|
27
|
+
} debug_catch_t;
|
28
|
+
|
29
|
+
typedef struct {
|
30
|
+
struct rb_iseq_struct *iseq;
|
31
|
+
struct iseq_catch_table_entry *catch_table;
|
32
|
+
int catch_table_size;
|
33
|
+
} iseq_catch_t;
|
34
|
+
|
35
|
+
typedef struct {
|
36
|
+
int argc; /* Number of arguments a frame should have. */
|
37
|
+
VALUE binding;
|
38
|
+
ID id;
|
39
|
+
ID orig_id;
|
40
|
+
int line;
|
41
|
+
const char * file;
|
42
|
+
short dead;
|
43
|
+
VALUE self;
|
44
|
+
VALUE arg_ary;
|
45
|
+
union {
|
46
|
+
struct {
|
47
|
+
rb_control_frame_t *cfp;
|
48
|
+
VALUE *bp;
|
49
|
+
struct rb_iseq_struct *block_iseq;
|
50
|
+
VALUE *block_pc;
|
51
|
+
VALUE *last_pc;
|
52
|
+
} runtime;
|
53
|
+
struct {
|
54
|
+
VALUE args;
|
55
|
+
VALUE locals;
|
56
|
+
VALUE arg_ary;
|
57
|
+
} copy;
|
58
|
+
} info;
|
59
|
+
} debug_frame_t;
|
60
|
+
|
61
|
+
typedef struct {
|
62
|
+
VALUE thread_id;
|
63
|
+
int thnum;
|
64
|
+
int flags;
|
65
|
+
enum ctx_stop_reason stop_reason;
|
66
|
+
int stop_next;
|
67
|
+
int dest_frame;
|
68
|
+
int stop_line;
|
69
|
+
int stop_frame;
|
70
|
+
int stack_size;
|
71
|
+
int stack_len;
|
72
|
+
debug_frame_t *frames;
|
73
|
+
const char * last_file;
|
74
|
+
int last_line;
|
75
|
+
VALUE breakpoint;
|
76
|
+
debug_catch_t catch_table;
|
77
|
+
VALUE saved_jump_ins[2];
|
78
|
+
rb_control_frame_t *jump_cfp;
|
79
|
+
VALUE *jump_pc;
|
80
|
+
iseq_catch_t *old_iseq_catch;
|
81
|
+
volatile int thread_pause;
|
82
|
+
} debug_context_t;
|
83
|
+
|
84
|
+
/* variables in ruby_debug.c */
|
85
|
+
extern VALUE mDebugger;
|
86
|
+
extern VALUE rdebug_breakpoints;
|
87
|
+
extern VALUE rdebug_catchpoints;
|
88
|
+
extern VALUE rdebug_threads_tbl;
|
89
|
+
|
90
|
+
/* routines in ruby_debug.c */
|
91
|
+
extern int filename_cmp(VALUE source, char *file);
|
92
|
+
|
93
|
+
#define IS_STARTED (rdebug_threads_tbl != Qnil)
|
94
|
+
static inline void
|
95
|
+
debug_check_started()
|
96
|
+
{
|
97
|
+
if(!IS_STARTED)
|
98
|
+
{
|
99
|
+
rb_raise(rb_eRuntimeError, "Debugger.start is not called yet.");
|
100
|
+
}
|
101
|
+
}
|
102
|
+
|
103
|
+
static inline int
|
104
|
+
classname_cmp(VALUE name, VALUE klass)
|
105
|
+
{
|
106
|
+
VALUE mod_name;
|
107
|
+
VALUE class_name = (Qnil == name) ? rb_str_new2("main") : name;
|
108
|
+
if (klass == Qnil) return(0);
|
109
|
+
mod_name = rb_mod_name(klass);
|
110
|
+
return (mod_name != Qnil
|
111
|
+
&& rb_str_cmp(class_name, mod_name) == 0);
|
112
|
+
}
|
113
|
+
|
114
|
+
/* Breakpoint information */
|
115
|
+
enum bp_type {BP_POS_TYPE, BP_METHOD_TYPE};
|
116
|
+
enum hit_condition {HIT_COND_NONE, HIT_COND_GE, HIT_COND_EQ, HIT_COND_MOD};
|
117
|
+
|
118
|
+
typedef struct {
|
119
|
+
int id;
|
120
|
+
enum bp_type type;
|
121
|
+
VALUE source;
|
122
|
+
union
|
123
|
+
{
|
124
|
+
int line;
|
125
|
+
ID mid;
|
126
|
+
} pos;
|
127
|
+
VALUE expr;
|
128
|
+
VALUE enabled;
|
129
|
+
int hit_count;
|
130
|
+
int hit_value;
|
131
|
+
enum hit_condition hit_condition;
|
132
|
+
} debug_breakpoint_t;
|
133
|
+
|
134
|
+
/* routines in breakpoint.c */
|
135
|
+
extern int check_breakpoint_expression(VALUE breakpoint, VALUE binding);
|
136
|
+
extern int check_breakpoint_hit_condition(VALUE breakpoint);
|
137
|
+
extern VALUE check_breakpoints_by_method(debug_context_t *debug_context,
|
138
|
+
VALUE klass, ID mid, VALUE self);
|
139
|
+
extern VALUE check_breakpoints_by_pos(debug_context_t *debug_context,
|
140
|
+
char *file, int line);
|
141
|
+
extern VALUE create_breakpoint_from_args(int argc, VALUE *argv, int id);
|
142
|
+
extern VALUE context_breakpoint(VALUE self);
|
143
|
+
extern VALUE context_set_breakpoint(int argc, VALUE *argv, VALUE self);
|
144
|
+
extern VALUE rdebug_add_catchpoint(VALUE self, VALUE value);
|
145
|
+
extern VALUE debug_catchpoints(VALUE self);
|
146
|
+
extern VALUE rdebug_remove_breakpoint(VALUE self, VALUE id_value);
|
147
|
+
|
148
|
+
extern void Init_breakpoint();
|
data/ext/ruby_debug/extconf.rb
CHANGED
data/lib/debugger/version.rb
CHANGED
metadata
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: debugger
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.6.
|
5
|
-
prerelease:
|
4
|
+
version: 1.6.5
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Kent Sibilev
|
@@ -11,129 +10,111 @@ authors:
|
|
11
10
|
autorequire:
|
12
11
|
bindir: bin
|
13
12
|
cert_chain: []
|
14
|
-
date: 2013-12-
|
13
|
+
date: 2013-12-31 00:00:00.000000000 Z
|
15
14
|
dependencies:
|
16
15
|
- !ruby/object:Gem::Dependency
|
17
16
|
name: columnize
|
18
17
|
requirement: !ruby/object:Gem::Requirement
|
19
|
-
none: false
|
20
18
|
requirements:
|
21
|
-
- -
|
19
|
+
- - ">="
|
22
20
|
- !ruby/object:Gem::Version
|
23
21
|
version: 0.3.1
|
24
22
|
type: :runtime
|
25
23
|
prerelease: false
|
26
24
|
version_requirements: !ruby/object:Gem::Requirement
|
27
|
-
none: false
|
28
25
|
requirements:
|
29
|
-
- -
|
26
|
+
- - ">="
|
30
27
|
- !ruby/object:Gem::Version
|
31
28
|
version: 0.3.1
|
32
29
|
- !ruby/object:Gem::Dependency
|
33
30
|
name: debugger-ruby_core_source
|
34
31
|
requirement: !ruby/object:Gem::Requirement
|
35
|
-
none: false
|
36
32
|
requirements:
|
37
|
-
- - ~>
|
33
|
+
- - "~>"
|
38
34
|
- !ruby/object:Gem::Version
|
39
|
-
version: 1.3.
|
35
|
+
version: 1.3.1
|
40
36
|
type: :runtime
|
41
37
|
prerelease: false
|
42
38
|
version_requirements: !ruby/object:Gem::Requirement
|
43
|
-
none: false
|
44
39
|
requirements:
|
45
|
-
- - ~>
|
40
|
+
- - "~>"
|
46
41
|
- !ruby/object:Gem::Version
|
47
|
-
version: 1.3.
|
42
|
+
version: 1.3.1
|
48
43
|
- !ruby/object:Gem::Dependency
|
49
44
|
name: debugger-linecache
|
50
45
|
requirement: !ruby/object:Gem::Requirement
|
51
|
-
none: false
|
52
46
|
requirements:
|
53
|
-
- - ~>
|
47
|
+
- - "~>"
|
54
48
|
- !ruby/object:Gem::Version
|
55
49
|
version: 1.2.0
|
56
50
|
type: :runtime
|
57
51
|
prerelease: false
|
58
52
|
version_requirements: !ruby/object:Gem::Requirement
|
59
|
-
none: false
|
60
53
|
requirements:
|
61
|
-
- - ~>
|
54
|
+
- - "~>"
|
62
55
|
- !ruby/object:Gem::Version
|
63
56
|
version: 1.2.0
|
64
57
|
- !ruby/object:Gem::Dependency
|
65
58
|
name: rake
|
66
59
|
requirement: !ruby/object:Gem::Requirement
|
67
|
-
none: false
|
68
60
|
requirements:
|
69
|
-
- - ~>
|
61
|
+
- - "~>"
|
70
62
|
- !ruby/object:Gem::Version
|
71
63
|
version: 0.9.2.2
|
72
64
|
type: :development
|
73
65
|
prerelease: false
|
74
66
|
version_requirements: !ruby/object:Gem::Requirement
|
75
|
-
none: false
|
76
67
|
requirements:
|
77
|
-
- - ~>
|
68
|
+
- - "~>"
|
78
69
|
- !ruby/object:Gem::Version
|
79
70
|
version: 0.9.2.2
|
80
71
|
- !ruby/object:Gem::Dependency
|
81
72
|
name: rake-compiler
|
82
73
|
requirement: !ruby/object:Gem::Requirement
|
83
|
-
none: false
|
84
74
|
requirements:
|
85
|
-
- - ~>
|
75
|
+
- - "~>"
|
86
76
|
- !ruby/object:Gem::Version
|
87
77
|
version: 0.8.0
|
88
78
|
type: :development
|
89
79
|
prerelease: false
|
90
80
|
version_requirements: !ruby/object:Gem::Requirement
|
91
|
-
none: false
|
92
81
|
requirements:
|
93
|
-
- - ~>
|
82
|
+
- - "~>"
|
94
83
|
- !ruby/object:Gem::Version
|
95
84
|
version: 0.8.0
|
96
85
|
- !ruby/object:Gem::Dependency
|
97
86
|
name: minitest
|
98
87
|
requirement: !ruby/object:Gem::Requirement
|
99
|
-
none: false
|
100
88
|
requirements:
|
101
|
-
- - ~>
|
89
|
+
- - "~>"
|
102
90
|
- !ruby/object:Gem::Version
|
103
91
|
version: 2.12.1
|
104
92
|
type: :development
|
105
93
|
prerelease: false
|
106
94
|
version_requirements: !ruby/object:Gem::Requirement
|
107
|
-
none: false
|
108
95
|
requirements:
|
109
|
-
- - ~>
|
96
|
+
- - "~>"
|
110
97
|
- !ruby/object:Gem::Version
|
111
98
|
version: 2.12.1
|
112
99
|
- !ruby/object:Gem::Dependency
|
113
100
|
name: mocha
|
114
101
|
requirement: !ruby/object:Gem::Requirement
|
115
|
-
none: false
|
116
102
|
requirements:
|
117
|
-
- - ~>
|
103
|
+
- - "~>"
|
118
104
|
- !ruby/object:Gem::Version
|
119
105
|
version: 0.13.0
|
120
106
|
type: :development
|
121
107
|
prerelease: false
|
122
108
|
version_requirements: !ruby/object:Gem::Requirement
|
123
|
-
none: false
|
124
109
|
requirements:
|
125
|
-
- - ~>
|
110
|
+
- - "~>"
|
126
111
|
- !ruby/object:Gem::Version
|
127
112
|
version: 0.13.0
|
128
|
-
description:
|
129
|
-
|
113
|
+
description: |
|
114
|
+
debugger is a fast implementation of the standard Ruby debugger debug.rb.
|
130
115
|
It is implemented by utilizing a new Ruby C API hook. The core component
|
131
|
-
|
132
116
|
provides support that front-ends can build on. It provides breakpoint
|
133
|
-
|
134
117
|
handling, bindings for stack frames among other things.
|
135
|
-
|
136
|
-
'
|
137
118
|
email: gabriel.horner@gmail.com
|
138
119
|
executables:
|
139
120
|
- rdebug
|
@@ -142,8 +123,8 @@ extensions:
|
|
142
123
|
extra_rdoc_files:
|
143
124
|
- README.md
|
144
125
|
files:
|
145
|
-
- .gitignore
|
146
|
-
- .travis.yml
|
126
|
+
- ".gitignore"
|
127
|
+
- ".travis.yml"
|
147
128
|
- AUTHORS
|
148
129
|
- CHANGELOG.md
|
149
130
|
- CONTRIBUTING.md
|
@@ -209,6 +190,9 @@ files:
|
|
209
190
|
- ext/ruby_debug/200/breakpoint.c
|
210
191
|
- ext/ruby_debug/200/ruby_debug.c
|
211
192
|
- ext/ruby_debug/200/ruby_debug.h
|
193
|
+
- ext/ruby_debug/210/breakpoint.c
|
194
|
+
- ext/ruby_debug/210/ruby_debug.c
|
195
|
+
- ext/ruby_debug/210/ruby_debug.h
|
212
196
|
- ext/ruby_debug/extconf.rb
|
213
197
|
- lib/debugger.rb
|
214
198
|
- lib/debugger/test.rb
|
@@ -339,26 +323,25 @@ files:
|
|
339
323
|
homepage: http://github.com/cldwalker/debugger
|
340
324
|
licenses:
|
341
325
|
- BSD
|
326
|
+
metadata: {}
|
342
327
|
post_install_message:
|
343
328
|
rdoc_options: []
|
344
329
|
require_paths:
|
345
330
|
- lib
|
346
331
|
required_ruby_version: !ruby/object:Gem::Requirement
|
347
|
-
none: false
|
348
332
|
requirements:
|
349
|
-
- -
|
333
|
+
- - ">="
|
350
334
|
- !ruby/object:Gem::Version
|
351
335
|
version: '0'
|
352
336
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
353
|
-
none: false
|
354
337
|
requirements:
|
355
|
-
- -
|
338
|
+
- - ">="
|
356
339
|
- !ruby/object:Gem::Version
|
357
340
|
version: 1.3.6
|
358
341
|
requirements: []
|
359
342
|
rubyforge_project:
|
360
|
-
rubygems_version:
|
343
|
+
rubygems_version: 2.2.0
|
361
344
|
signing_key:
|
362
|
-
specification_version:
|
345
|
+
specification_version: 4
|
363
346
|
summary: Fast Ruby debugger - base + cli
|
364
347
|
test_files: []
|