ruby-debug-base19 0.11.15 → 0.11.16

Sign up to get free protection for your applications and to get access to all the features.
data/AUTHORS CHANGED
@@ -4,6 +4,7 @@ Kent Sibilev
4
4
  Contributors:
5
5
  Markus Barchfeld
6
6
  R. Bernstein
7
+ Anders Lindgren
7
8
 
8
9
  Contributor and maintainer:
9
10
  Mark Moseley
@@ -71,7 +71,6 @@ check_breakpoint_by_pos(VALUE breakpoint, char *file, int line)
71
71
  return 0;
72
72
  }
73
73
 
74
- extern VALUE g_self;
75
74
  int
76
75
  check_breakpoint_by_method(VALUE breakpoint, VALUE klass, ID mid, VALUE self)
77
76
  {
@@ -16,7 +16,7 @@
16
16
  #define min(x,y) ((x) < (y) ? (x) : (y))
17
17
  #endif
18
18
 
19
- #if RUBY_VERSION_MAJOR == 1 && RUBY_VERSION_MINOR == 9 && RUBY_VERSION_TEENY == 1 && RUBY_PATCHLEVEL > 0
19
+ #if RUBY_VERSION_MAJOR == 1 && RUBY_VERSION_MINOR == 9 && RUBY_VERSION_TEENY == 1 && RUBY_PATCHLEVEL >= 0
20
20
  #define RUBY_VERSION_1_9_1
21
21
  #endif
22
22
 
@@ -531,6 +531,10 @@ filename_cmp(VALUE source, char *file)
531
531
  return 1;
532
532
  if(isdirsep(source_ptr[s]) && isdirsep(file_ptr[f]))
533
533
  dirsep_flag = 1;
534
+ #ifdef DOSISH_DRIVE_LETTER
535
+ else if (s == 0)
536
+ return(toupper(source_ptr[s]) == toupper(file_ptr[f]));
537
+ #endif
534
538
  else if(source_ptr[s] != file_ptr[f])
535
539
  return 0;
536
540
  }
@@ -784,7 +788,12 @@ debug_event_hook(rb_event_flag_t event, VALUE data, VALUE self, ID mid, VALUE kl
784
788
  else
785
789
  set_frame_source(event, debug_context, self, file, line, mid);
786
790
 
787
- if (CTX_FL_TEST(debug_context, CTX_FL_CATCHING))
791
+ if (CTX_FL_TEST(debug_context, CTX_FL_JUMPING))
792
+ {
793
+ CTX_FL_UNSET(debug_context, CTX_FL_JUMPING);
794
+ break;
795
+ }
796
+ else if (CTX_FL_TEST(debug_context, CTX_FL_CATCHING))
788
797
  {
789
798
  debug_frame_t *top_frame = get_top_frame(debug_context);
790
799
 
@@ -2217,6 +2226,50 @@ context_stop_reason(VALUE self)
2217
2226
  return ID2SYM(rb_intern(sym_name));
2218
2227
  }
2219
2228
 
2229
+ /*
2230
+ * call-seq:
2231
+ * context.jump(line, file) -> bool
2232
+ *
2233
+ * Returns +true+ if jump to +line+ in filename +file+ was successful.
2234
+ */
2235
+ static VALUE
2236
+ context_jump(int argc, VALUE *argv, VALUE self)
2237
+ {
2238
+ debug_context_t *debug_context;
2239
+ debug_frame_t *debug_frame;
2240
+ VALUE line, file;
2241
+ const char *file_str;
2242
+ int i;
2243
+ struct rb_iseq_struct *iseq;
2244
+
2245
+ Data_Get_Struct(self, debug_context_t, debug_context);
2246
+ debug_frame = get_top_frame(debug_context);
2247
+
2248
+ if ((argc <= 0) || (argc > 2))
2249
+ rb_raise(rb_eArgError, "wrong number of arguments (%d for 1 or 2)", argc);
2250
+ rb_scan_args(argc, argv, "11", &line, &file);
2251
+
2252
+ line = FIX2INT(line);
2253
+ if (file == Qnil)
2254
+ file_str = debug_frame->file;
2255
+ else
2256
+ file_str = RSTRING_PTR(file);
2257
+
2258
+ iseq = debug_frame->info.runtime.cfp->iseq;
2259
+ for (i = 0; i < iseq->insn_info_size; i++)
2260
+ {
2261
+ if (iseq->insn_info_table[i].line_no == line)
2262
+ {
2263
+ if (*debug_frame->info.runtime.cfp->pc == BIN(pop))
2264
+ debug_frame->info.runtime.cfp->sp--;
2265
+ debug_frame->info.runtime.cfp->pc =
2266
+ iseq->iseq_encoded + iseq->insn_info_table[i].position;
2267
+ CTX_FL_SET(debug_context, CTX_FL_JUMPING);
2268
+ return Qtrue;
2269
+ }
2270
+ }
2271
+ return Qfalse;
2272
+ }
2220
2273
 
2221
2274
  /*
2222
2275
  * Document-class: Context
@@ -2258,6 +2311,7 @@ Init_context()
2258
2311
  context_breakpoint, 0); /* in breakpoint.c */
2259
2312
  rb_define_method(cContext, "set_breakpoint",
2260
2313
  context_set_breakpoint, -1); /* in breakpoint.c */
2314
+ rb_define_method(cContext, "jump", context_jump, -1);
2261
2315
  }
2262
2316
 
2263
2317
  /*
@@ -13,6 +13,7 @@ enum ctx_stop_reason {CTX_STOP_NONE, CTX_STOP_STEP, CTX_STOP_BREAKPOINT,
13
13
  #define CTX_FL_STEPPED (1<<8)
14
14
  #define CTX_FL_FORCE_MOVE (1<<9)
15
15
  #define CTX_FL_CATCHING (1<<10)
16
+ #define CTX_FL_JUMPING (1<<11)
16
17
 
17
18
  #define CTX_FL_TEST(c,f) ((c)->flags & (f))
18
19
  #define CTX_FL_SET(c,f) do { (c)->flags |= (f); } while (0)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-debug-base19
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.15
4
+ version: 0.11.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kent Sibilev
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2009-08-24 00:00:00 -07:00
13
+ date: 2009-08-28 00:00:00 -07:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
@@ -43,12 +43,7 @@ dependencies:
43
43
  - !ruby/object:Gem::Version
44
44
  version: 0.5.11
45
45
  version:
46
- description: |
47
- ruby-debug is a fast implementation of the standard Ruby debugger debug.rb.
48
- It is implemented by utilizing a new Ruby C API hook. The core component
49
- provides support that front-ends can build on. It provides breakpoint
50
- handling, bindings for stack frames among other things.
51
-
46
+ description: ruby-debug is a fast implementation of the standard Ruby debugger debug.rb. It is implemented by utilizing a new Ruby C API hook. The core component provides support that front-ends can build on. It provides breakpoint handling, bindings for stack frames among other things.
52
47
  email: mark@fast-software.com
53
48
  executables: []
54
49
 
@@ -72,10 +67,8 @@ files:
72
67
  - test/base/base.rb
73
68
  - test/base/binding.rb
74
69
  - test/base/catchpoint.rb
75
- has_rdoc: true
70
+ has_rdoc: false
76
71
  homepage: http://rubyforge.org/projects/ruby-debug19/
77
- licenses: []
78
-
79
72
  post_install_message:
80
73
  rdoc_options:
81
74
  - --charset=UTF-8
@@ -96,7 +89,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
96
89
  requirements: []
97
90
 
98
91
  rubyforge_project: ruby-debug19
99
- rubygems_version: 1.3.4
92
+ rubygems_version: 1.3.1
100
93
  signing_key:
101
94
  specification_version: 3
102
95
  summary: Fast Ruby debugger - core component