debugger 1.6.5 → 1.6.6

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.
@@ -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();
@@ -49,7 +49,7 @@ SRC
49
49
  $defs << '-DRB_ISEQ_COMPILE_5ARGS'
50
50
  end
51
51
  }
52
- elsif RUBY_VERSION == '2.0.0' || RUBY_VERSION == '2.1.0'
52
+ elsif RUBY_VERSION >= '2.0.0'
53
53
  lambda {
54
54
  iseqs = %w[vm_core.h iseq.h]
55
55
  begin
@@ -1,5 +1,5 @@
1
1
  module Debugger
2
2
  # TODO: remove version from C ext
3
3
  send :remove_const, :VERSION if const_defined? :VERSION
4
- VERSION = '1.6.5'
4
+ VERSION = '1.6.6'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: debugger
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.5
4
+ version: 1.6.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kent Sibilev
@@ -10,104 +10,104 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-12-31 00:00:00.000000000 Z
13
+ date: 2014-02-27 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: columnize
17
17
  requirement: !ruby/object:Gem::Requirement
18
18
  requirements:
19
- - - ">="
19
+ - - '>='
20
20
  - !ruby/object:Gem::Version
21
21
  version: 0.3.1
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  requirements:
26
- - - ">="
26
+ - - '>='
27
27
  - !ruby/object:Gem::Version
28
28
  version: 0.3.1
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: debugger-ruby_core_source
31
31
  requirement: !ruby/object:Gem::Requirement
32
32
  requirements:
33
- - - "~>"
33
+ - - ~>
34
34
  - !ruby/object:Gem::Version
35
- version: 1.3.1
35
+ version: 1.3.2
36
36
  type: :runtime
37
37
  prerelease: false
38
38
  version_requirements: !ruby/object:Gem::Requirement
39
39
  requirements:
40
- - - "~>"
40
+ - - ~>
41
41
  - !ruby/object:Gem::Version
42
- version: 1.3.1
42
+ version: 1.3.2
43
43
  - !ruby/object:Gem::Dependency
44
44
  name: debugger-linecache
45
45
  requirement: !ruby/object:Gem::Requirement
46
46
  requirements:
47
- - - "~>"
47
+ - - ~>
48
48
  - !ruby/object:Gem::Version
49
49
  version: 1.2.0
50
50
  type: :runtime
51
51
  prerelease: false
52
52
  version_requirements: !ruby/object:Gem::Requirement
53
53
  requirements:
54
- - - "~>"
54
+ - - ~>
55
55
  - !ruby/object:Gem::Version
56
56
  version: 1.2.0
57
57
  - !ruby/object:Gem::Dependency
58
58
  name: rake
59
59
  requirement: !ruby/object:Gem::Requirement
60
60
  requirements:
61
- - - "~>"
61
+ - - ~>
62
62
  - !ruby/object:Gem::Version
63
63
  version: 0.9.2.2
64
64
  type: :development
65
65
  prerelease: false
66
66
  version_requirements: !ruby/object:Gem::Requirement
67
67
  requirements:
68
- - - "~>"
68
+ - - ~>
69
69
  - !ruby/object:Gem::Version
70
70
  version: 0.9.2.2
71
71
  - !ruby/object:Gem::Dependency
72
72
  name: rake-compiler
73
73
  requirement: !ruby/object:Gem::Requirement
74
74
  requirements:
75
- - - "~>"
75
+ - - ~>
76
76
  - !ruby/object:Gem::Version
77
77
  version: 0.8.0
78
78
  type: :development
79
79
  prerelease: false
80
80
  version_requirements: !ruby/object:Gem::Requirement
81
81
  requirements:
82
- - - "~>"
82
+ - - ~>
83
83
  - !ruby/object:Gem::Version
84
84
  version: 0.8.0
85
85
  - !ruby/object:Gem::Dependency
86
86
  name: minitest
87
87
  requirement: !ruby/object:Gem::Requirement
88
88
  requirements:
89
- - - "~>"
89
+ - - ~>
90
90
  - !ruby/object:Gem::Version
91
91
  version: 2.12.1
92
92
  type: :development
93
93
  prerelease: false
94
94
  version_requirements: !ruby/object:Gem::Requirement
95
95
  requirements:
96
- - - "~>"
96
+ - - ~>
97
97
  - !ruby/object:Gem::Version
98
98
  version: 2.12.1
99
99
  - !ruby/object:Gem::Dependency
100
100
  name: mocha
101
101
  requirement: !ruby/object:Gem::Requirement
102
102
  requirements:
103
- - - "~>"
103
+ - - ~>
104
104
  - !ruby/object:Gem::Version
105
105
  version: 0.13.0
106
106
  type: :development
107
107
  prerelease: false
108
108
  version_requirements: !ruby/object:Gem::Requirement
109
109
  requirements:
110
- - - "~>"
110
+ - - ~>
111
111
  - !ruby/object:Gem::Version
112
112
  version: 0.13.0
113
113
  description: |
@@ -123,8 +123,8 @@ extensions:
123
123
  extra_rdoc_files:
124
124
  - README.md
125
125
  files:
126
- - ".gitignore"
127
- - ".travis.yml"
126
+ - .gitignore
127
+ - .travis.yml
128
128
  - AUTHORS
129
129
  - CHANGELOG.md
130
130
  - CONTRIBUTING.md
@@ -193,6 +193,9 @@ files:
193
193
  - ext/ruby_debug/210/breakpoint.c
194
194
  - ext/ruby_debug/210/ruby_debug.c
195
195
  - ext/ruby_debug/210/ruby_debug.h
196
+ - ext/ruby_debug/211/breakpoint.c
197
+ - ext/ruby_debug/211/ruby_debug.c
198
+ - ext/ruby_debug/211/ruby_debug.h
196
199
  - ext/ruby_debug/extconf.rb
197
200
  - lib/debugger.rb
198
201
  - lib/debugger/test.rb
@@ -330,17 +333,17 @@ require_paths:
330
333
  - lib
331
334
  required_ruby_version: !ruby/object:Gem::Requirement
332
335
  requirements:
333
- - - ">="
336
+ - - '>='
334
337
  - !ruby/object:Gem::Version
335
338
  version: '0'
336
339
  required_rubygems_version: !ruby/object:Gem::Requirement
337
340
  requirements:
338
- - - ">="
341
+ - - '>='
339
342
  - !ruby/object:Gem::Version
340
343
  version: 1.3.6
341
344
  requirements: []
342
345
  rubyforge_project:
343
- rubygems_version: 2.2.0
346
+ rubygems_version: 2.0.3
344
347
  signing_key:
345
348
  specification_version: 4
346
349
  summary: Fast Ruby debugger - base + cli