rbx-trepanning 0.0.2-universal-rubinius-1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (205) hide show
  1. data/ChangeLog +376 -0
  2. data/LICENSE +25 -0
  3. data/NEWS +2 -0
  4. data/README.textile +35 -0
  5. data/Rakefile +165 -0
  6. data/THANKS +14 -0
  7. data/app/breakpoint.rb +218 -0
  8. data/app/breakpoint.rbc +3564 -0
  9. data/app/brkptmgr.rb +138 -0
  10. data/app/brkptmgr.rbc +2827 -0
  11. data/app/default.rb +61 -0
  12. data/app/default.rbc +1011 -0
  13. data/app/display.rb +35 -0
  14. data/app/display.rbc +968 -0
  15. data/app/frame.rb +98 -0
  16. data/app/frame.rbc +1808 -0
  17. data/app/irb.rb +112 -0
  18. data/app/irb.rbc +2111 -0
  19. data/app/iseq.rb +95 -0
  20. data/app/iseq.rbc +1801 -0
  21. data/app/method.rb +173 -0
  22. data/app/method.rbc +2492 -0
  23. data/app/mock.rb +13 -0
  24. data/app/mock.rbc +398 -0
  25. data/app/options.rb +123 -0
  26. data/app/options.rbc +2183 -0
  27. data/app/run.rb +86 -0
  28. data/app/run.rbc +1244 -0
  29. data/app/util.rb +49 -0
  30. data/app/util.rbc +1144 -0
  31. data/app/validate.rb +30 -0
  32. data/app/validate.rbc +676 -0
  33. data/bin/trepan.compiled.rbc +1043 -0
  34. data/bin/trepanx +63 -0
  35. data/bin/trepanx.compiled.rbc +985 -0
  36. data/interface/base_intf.rb +95 -0
  37. data/interface/base_intf.rbc +1742 -0
  38. data/interface/script.rb +104 -0
  39. data/interface/script.rbc +1642 -0
  40. data/interface/user.rb +91 -0
  41. data/interface/user.rbc +1418 -0
  42. data/io/base_io.rb +94 -0
  43. data/io/base_io.rbc +1404 -0
  44. data/io/input.rb +112 -0
  45. data/io/input.rbc +1979 -0
  46. data/io/null_output.rb +42 -0
  47. data/io/null_output.rbc +730 -0
  48. data/io/string_array.rb +156 -0
  49. data/io/string_array.rbc +2466 -0
  50. data/lib/trepanning.rb +398 -0
  51. data/lib/trepanning.rbc +6661 -0
  52. data/processor/breakpoint.rb +161 -0
  53. data/processor/command/alias.rb +55 -0
  54. data/processor/command/backtrace.rb +46 -0
  55. data/processor/command/base/cmd.rb +124 -0
  56. data/processor/command/base/subcmd.rb +213 -0
  57. data/processor/command/base/submgr.rb +179 -0
  58. data/processor/command/base/subsubcmd.rb +103 -0
  59. data/processor/command/base/subsubmgr.rb +184 -0
  60. data/processor/command/break.rb +100 -0
  61. data/processor/command/continue.rb +82 -0
  62. data/processor/command/delete.rb +30 -0
  63. data/processor/command/directory.rb +43 -0
  64. data/processor/command/disassemble.rb +103 -0
  65. data/processor/command/down.rb +54 -0
  66. data/processor/command/eval.rb +31 -0
  67. data/processor/command/exit.rb +58 -0
  68. data/processor/command/finish.rb +78 -0
  69. data/processor/command/frame.rb +89 -0
  70. data/processor/command/help.rb +146 -0
  71. data/processor/command/info.rb +28 -0
  72. data/processor/command/info_subcmd/breakpoints.rb +75 -0
  73. data/processor/command/info_subcmd/file.rb +153 -0
  74. data/processor/command/info_subcmd/method.rb +71 -0
  75. data/processor/command/info_subcmd/program.rb +59 -0
  76. data/processor/command/info_subcmd/variables.rb +40 -0
  77. data/processor/command/irb.rb +96 -0
  78. data/processor/command/kill.rb +70 -0
  79. data/processor/command/list.rb +296 -0
  80. data/processor/command/next.rb +66 -0
  81. data/processor/command/nexti.rb +59 -0
  82. data/processor/command/pr.rb +38 -0
  83. data/processor/command/ps.rb +40 -0
  84. data/processor/command/restart.rb +60 -0
  85. data/processor/command/set.rb +47 -0
  86. data/processor/command/set_subcmd/auto.rb +28 -0
  87. data/processor/command/set_subcmd/auto_subcmd/dis.rb +33 -0
  88. data/processor/command/set_subcmd/auto_subcmd/eval.rb +54 -0
  89. data/processor/command/set_subcmd/auto_subcmd/irb.rb +34 -0
  90. data/processor/command/set_subcmd/auto_subcmd/list.rb +34 -0
  91. data/processor/command/set_subcmd/basename.rb +26 -0
  92. data/processor/command/set_subcmd/debug.rb +27 -0
  93. data/processor/command/set_subcmd/debug_subcmd/dbgr.rb +36 -0
  94. data/processor/command/set_subcmd/debug_subcmd/skip.rb +23 -0
  95. data/processor/command/set_subcmd/debug_subcmd/step.rb +23 -0
  96. data/processor/command/set_subcmd/different.rb +60 -0
  97. data/processor/command/set_subcmd/hidelevel.rb +63 -0
  98. data/processor/command/set_subcmd/kernelstep.rb +61 -0
  99. data/processor/command/set_subcmd/max.rb +29 -0
  100. data/processor/command/set_subcmd/max_subcmd/list.rb +49 -0
  101. data/processor/command/set_subcmd/max_subcmd/stack.rb +50 -0
  102. data/processor/command/set_subcmd/max_subcmd/string.rb +54 -0
  103. data/processor/command/set_subcmd/max_subcmd/width.rb +49 -0
  104. data/processor/command/set_subcmd/substitute.rb +25 -0
  105. data/processor/command/set_subcmd/substitute_subcmd/path.rb +56 -0
  106. data/processor/command/set_subcmd/trace.rb +37 -0
  107. data/processor/command/set_subcmd/trace_subcmd/print.rb +57 -0
  108. data/processor/command/show.rb +27 -0
  109. data/processor/command/show_subcmd/alias.rb +43 -0
  110. data/processor/command/show_subcmd/args.rb +26 -0
  111. data/processor/command/show_subcmd/auto.rb +28 -0
  112. data/processor/command/show_subcmd/auto_subcmd/dis.rb +37 -0
  113. data/processor/command/show_subcmd/auto_subcmd/eval.rb +28 -0
  114. data/processor/command/show_subcmd/auto_subcmd/irb.rb +23 -0
  115. data/processor/command/show_subcmd/auto_subcmd/list.rb +22 -0
  116. data/processor/command/show_subcmd/basename.rb +22 -0
  117. data/processor/command/show_subcmd/debug.rb +27 -0
  118. data/processor/command/show_subcmd/debug_subcmd/dbgr.rb +21 -0
  119. data/processor/command/show_subcmd/debug_subcmd/skip.rb +22 -0
  120. data/processor/command/show_subcmd/debug_subcmd/step.rb +22 -0
  121. data/processor/command/show_subcmd/different.rb +27 -0
  122. data/processor/command/show_subcmd/hidelevel.rb +42 -0
  123. data/processor/command/show_subcmd/kernelstep.rb +37 -0
  124. data/processor/command/show_subcmd/max.rb +30 -0
  125. data/processor/command/show_subcmd/max_subcmd/list.rb +38 -0
  126. data/processor/command/show_subcmd/max_subcmd/stack.rb +36 -0
  127. data/processor/command/show_subcmd/max_subcmd/string.rb +42 -0
  128. data/processor/command/show_subcmd/max_subcmd/width.rb +37 -0
  129. data/processor/command/show_subcmd/trace.rb +29 -0
  130. data/processor/command/show_subcmd/trace_subcmd/print.rb +38 -0
  131. data/processor/command/source.rb +83 -0
  132. data/processor/command/step.rb +49 -0
  133. data/processor/command/tbreak.rb +19 -0
  134. data/processor/command/unalias.rb +44 -0
  135. data/processor/command/up.rb +87 -0
  136. data/processor/default.rb +56 -0
  137. data/processor/disassemble.rb +32 -0
  138. data/processor/eval.rb +96 -0
  139. data/processor/frame.rb +211 -0
  140. data/processor/help.rb +72 -0
  141. data/processor/hook.rb +133 -0
  142. data/processor/load_cmds.rb +101 -0
  143. data/processor/location.rb +128 -0
  144. data/processor/main.rb +394 -0
  145. data/processor/mock.rb +137 -0
  146. data/processor/msg.rb +28 -0
  147. data/processor/running.rb +230 -0
  148. data/processor/stepping.rb +115 -0
  149. data/processor/subcmd.rb +160 -0
  150. data/processor/validate.rb +355 -0
  151. data/test/data/enable.right +36 -0
  152. data/test/data/fname-with-blank.cmd +6 -0
  153. data/test/data/fname-with-blank.right +1 -0
  154. data/test/data/quit-Xdebug.right +3 -0
  155. data/test/data/quit.cmd +5 -0
  156. data/test/data/quit.right +0 -0
  157. data/test/example/fname with blank.rb +1 -0
  158. data/test/example/gcd-xx.rb +18 -0
  159. data/test/example/gcd.rb +19 -0
  160. data/test/example/gcd1.rb +24 -0
  161. data/test/example/null.rb +1 -0
  162. data/test/example/thread1.rb +3 -0
  163. data/test/functional/fn_helper.rb +112 -0
  164. data/test/functional/test-break-name.rb +52 -0
  165. data/test/functional/test-break.rb +51 -0
  166. data/test/functional/test-finish.rb +70 -0
  167. data/test/functional/test-fn_helper.rb +43 -0
  168. data/test/functional/test-list.rb +55 -0
  169. data/test/functional/test-next-bug.rb +49 -0
  170. data/test/functional/test-next.rb +101 -0
  171. data/test/functional/test-step.rb +272 -0
  172. data/test/functional/test-step2.rb +35 -0
  173. data/test/functional/test-tbreak.rb +41 -0
  174. data/test/integration/file-diff.rb +89 -0
  175. data/test/integration/helper.rb +78 -0
  176. data/test/integration/test-fname-with-blank.rb +12 -0
  177. data/test/integration/test-quit.rb +25 -0
  178. data/test/unit/cmd-helper.rb +46 -0
  179. data/test/unit/test-app-brkpt.rb +30 -0
  180. data/test/unit/test-app-brkptmgr.rb +51 -0
  181. data/test/unit/test-app-iseq.rb +49 -0
  182. data/test/unit/test-app-method.rb +54 -0
  183. data/test/unit/test-app-options.rb +61 -0
  184. data/test/unit/test-app-run.rb +16 -0
  185. data/test/unit/test-app-util.rb +28 -0
  186. data/test/unit/test-app-validate.rb +18 -0
  187. data/test/unit/test-base-subcmd.rb +61 -0
  188. data/test/unit/test-bin-trepanx.rb +48 -0
  189. data/test/unit/test-cmd-alias.rb +49 -0
  190. data/test/unit/test-cmd-break.rb +23 -0
  191. data/test/unit/test-cmd-exit.rb +27 -0
  192. data/test/unit/test-cmd-help.rb +101 -0
  193. data/test/unit/test-cmd-kill.rb +48 -0
  194. data/test/unit/test-intf-user.rb +46 -0
  195. data/test/unit/test-io-input.rb +27 -0
  196. data/test/unit/test-proc-eval.rb +37 -0
  197. data/test/unit/test-proc-frame.rb +79 -0
  198. data/test/unit/test-proc-help.rb +16 -0
  199. data/test/unit/test-proc-hook.rb +30 -0
  200. data/test/unit/test-proc-load_cmds.rb +41 -0
  201. data/test/unit/test-proc-location.rb +48 -0
  202. data/test/unit/test-proc-main.rb +96 -0
  203. data/test/unit/test-proc-validate.rb +91 -0
  204. data/test/unit/test-subcmd-help.rb +51 -0
  205. metadata +337 -0
data/app/validate.rb ADDED
@@ -0,0 +1,30 @@
1
+ # Copyright (C) 2010 Rocky Bernstein <rockyb@rubyforge.net>
2
+
3
+ class Trepan
4
+ module Validate
5
+ def line_or_ip(arg_str)
6
+ arg=arg_str.dup
7
+ is_ip =
8
+ if 'o' == arg[0..0].downcase
9
+ arg[0] = ''
10
+ true
11
+ else
12
+ false
13
+ end
14
+ line_or_ip = Integer(arg) rescue nil
15
+ if is_ip
16
+ return line_or_ip, nil
17
+ else
18
+ return nil, line_or_ip
19
+ end
20
+ end
21
+ module_function :line_or_ip
22
+ end
23
+ end
24
+
25
+ if __FILE__ == $0
26
+ include Trepan::Validate
27
+ %w(o1 O2 oink 1 12 -12).each do |arg|
28
+ puts "line_or_ip(#{arg})=#{line_or_ip(arg).inspect}"
29
+ end
30
+ end
data/app/validate.rbc ADDED
@@ -0,0 +1,676 @@
1
+ !RBIX
2
+ 0
3
+ x
4
+ M
5
+ 1
6
+ n
7
+ n
8
+ x
9
+ 10
10
+ __script__
11
+ i
12
+ 85
13
+ 99
14
+ 7
15
+ 0
16
+ 1
17
+ 65
18
+ 49
19
+ 1
20
+ 3
21
+ 13
22
+ 99
23
+ 12
24
+ 7
25
+ 2
26
+ 12
27
+ 7
28
+ 3
29
+ 12
30
+ 65
31
+ 12
32
+ 49
33
+ 4
34
+ 4
35
+ 15
36
+ 49
37
+ 2
38
+ 0
39
+ 15
40
+ 65
41
+ 49
42
+ 5
43
+ 0
44
+ 99
45
+ 43
46
+ 6
47
+ 7
48
+ 7
49
+ 49
50
+ 8
51
+ 1
52
+ 83
53
+ 9
54
+ 9
55
+ 81
56
+ 5
57
+ 45
58
+ 0
59
+ 10
60
+ 43
61
+ 11
62
+ 47
63
+ 49
64
+ 12
65
+ 1
66
+ 15
67
+ 7
68
+ 13
69
+ 64
70
+ 7
71
+ 14
72
+ 64
73
+ 7
74
+ 15
75
+ 64
76
+ 7
77
+ 16
78
+ 64
79
+ 7
80
+ 17
81
+ 64
82
+ 7
83
+ 18
84
+ 64
85
+ 35
86
+ 6
87
+ 56
88
+ 19
89
+ 50
90
+ 20
91
+ 0
92
+ 8
93
+ 82
94
+ 1
95
+ 15
96
+ 2
97
+ 11
98
+ I
99
+ 6
100
+ I
101
+ 0
102
+ I
103
+ 0
104
+ I
105
+ 0
106
+ n
107
+ p
108
+ 21
109
+ x
110
+ 6
111
+ Trepan
112
+ x
113
+ 10
114
+ open_class
115
+ x
116
+ 14
117
+ __class_init__
118
+ M
119
+ 1
120
+ n
121
+ n
122
+ x
123
+ 6
124
+ Trepan
125
+ i
126
+ 28
127
+ 5
128
+ 66
129
+ 99
130
+ 7
131
+ 0
132
+ 65
133
+ 49
134
+ 1
135
+ 2
136
+ 13
137
+ 99
138
+ 12
139
+ 7
140
+ 2
141
+ 12
142
+ 7
143
+ 3
144
+ 12
145
+ 65
146
+ 12
147
+ 49
148
+ 4
149
+ 4
150
+ 15
151
+ 49
152
+ 2
153
+ 0
154
+ 11
155
+ I
156
+ 6
157
+ I
158
+ 0
159
+ I
160
+ 0
161
+ I
162
+ 0
163
+ n
164
+ p
165
+ 5
166
+ x
167
+ 8
168
+ Validate
169
+ x
170
+ 11
171
+ open_module
172
+ x
173
+ 15
174
+ __module_init__
175
+ M
176
+ 1
177
+ n
178
+ n
179
+ x
180
+ 8
181
+ Validate
182
+ i
183
+ 24
184
+ 5
185
+ 66
186
+ 99
187
+ 7
188
+ 0
189
+ 7
190
+ 1
191
+ 65
192
+ 67
193
+ 49
194
+ 2
195
+ 0
196
+ 49
197
+ 3
198
+ 4
199
+ 15
200
+ 5
201
+ 7
202
+ 0
203
+ 47
204
+ 49
205
+ 4
206
+ 1
207
+ 11
208
+ I
209
+ 5
210
+ I
211
+ 0
212
+ I
213
+ 0
214
+ I
215
+ 0
216
+ n
217
+ p
218
+ 5
219
+ x
220
+ 10
221
+ line_or_ip
222
+ M
223
+ 1
224
+ n
225
+ n
226
+ x
227
+ 10
228
+ line_or_ip
229
+ i
230
+ 121
231
+ 20
232
+ 0
233
+ 49
234
+ 0
235
+ 0
236
+ 19
237
+ 1
238
+ 15
239
+ 7
240
+ 1
241
+ 64
242
+ 20
243
+ 1
244
+ 44
245
+ 43
246
+ 2
247
+ 78
248
+ 78
249
+ 49
250
+ 3
251
+ 2
252
+ 49
253
+ 4
254
+ 1
255
+ 49
256
+ 5
257
+ 0
258
+ 83
259
+ 6
260
+ 9
261
+ 48
262
+ 20
263
+ 1
264
+ 78
265
+ 7
266
+ 7
267
+ 64
268
+ 13
269
+ 18
270
+ 3
271
+ 49
272
+ 8
273
+ 2
274
+ 15
275
+ 15
276
+ 2
277
+ 8
278
+ 49
279
+ 3
280
+ 19
281
+ 2
282
+ 15
283
+ 26
284
+ 93
285
+ 0
286
+ 15
287
+ 29
288
+ 69
289
+ 0
290
+ 5
291
+ 20
292
+ 1
293
+ 47
294
+ 49
295
+ 9
296
+ 1
297
+ 30
298
+ 8
299
+ 96
300
+ 26
301
+ 93
302
+ 1
303
+ 15
304
+ 24
305
+ 13
306
+ 45
307
+ 10
308
+ 11
309
+ 12
310
+ 49
311
+ 12
312
+ 1
313
+ 10
314
+ 86
315
+ 8
316
+ 91
317
+ 15
318
+ 1
319
+ 25
320
+ 8
321
+ 96
322
+ 15
323
+ 92
324
+ 1
325
+ 27
326
+ 34
327
+ 92
328
+ 0
329
+ 27
330
+ 19
331
+ 3
332
+ 15
333
+ 20
334
+ 2
335
+ 9
336
+ 114
337
+ 20
338
+ 3
339
+ 1
340
+ 35
341
+ 2
342
+ 11
343
+ 8
344
+ 120
345
+ 1
346
+ 20
347
+ 3
348
+ 35
349
+ 2
350
+ 11
351
+ 11
352
+ I
353
+ b
354
+ I
355
+ 4
356
+ I
357
+ 1
358
+ I
359
+ 1
360
+ n
361
+ p
362
+ 13
363
+ x
364
+ 3
365
+ dup
366
+ s
367
+ 1
368
+ o
369
+ x
370
+ 5
371
+ Range
372
+ x
373
+ 3
374
+ new
375
+ x
376
+ 2
377
+ []
378
+ x
379
+ 8
380
+ downcase
381
+ x
382
+ 2
383
+ ==
384
+ s
385
+ 0
386
+
387
+ x
388
+ 3
389
+ []=
390
+ x
391
+ 7
392
+ Integer
393
+ x
394
+ 13
395
+ StandardError
396
+ n
397
+ x
398
+ 3
399
+ ===
400
+ p
401
+ 21
402
+ I
403
+ 0
404
+ I
405
+ 5
406
+ I
407
+ 0
408
+ I
409
+ 6
410
+ I
411
+ 8
412
+ I
413
+ 8
414
+ I
415
+ 1f
416
+ I
417
+ 9
418
+ I
419
+ 2d
420
+ I
421
+ a
422
+ I
423
+ 30
424
+ I
425
+ c
426
+ I
427
+ 34
428
+ I
429
+ e
430
+ I
431
+ 66
432
+ I
433
+ f
434
+ I
435
+ 6a
436
+ I
437
+ 10
438
+ I
439
+ 72
440
+ I
441
+ 12
442
+ I
443
+ 79
444
+ x
445
+ 55
446
+ /home/rocky-rvm/.rvm/src/rbx-trepanning/app/validate.rb
447
+ p
448
+ 4
449
+ x
450
+ 7
451
+ arg_str
452
+ x
453
+ 3
454
+ arg
455
+ x
456
+ 5
457
+ is_ip
458
+ x
459
+ 10
460
+ line_or_ip
461
+ x
462
+ 17
463
+ method_visibility
464
+ x
465
+ 15
466
+ add_defn_method
467
+ x
468
+ 15
469
+ module_function
470
+ p
471
+ 5
472
+ I
473
+ 2
474
+ I
475
+ 5
476
+ I
477
+ 10
478
+ I
479
+ 15
480
+ I
481
+ 18
482
+ x
483
+ 55
484
+ /home/rocky-rvm/.rvm/src/rbx-trepanning/app/validate.rb
485
+ p
486
+ 0
487
+ x
488
+ 13
489
+ attach_method
490
+ p
491
+ 3
492
+ I
493
+ 2
494
+ I
495
+ 4
496
+ I
497
+ 1c
498
+ x
499
+ 55
500
+ /home/rocky-rvm/.rvm/src/rbx-trepanning/app/validate.rb
501
+ p
502
+ 0
503
+ x
504
+ 13
505
+ attach_method
506
+ x
507
+ 11
508
+ active_path
509
+ x
510
+ 7
511
+ Globals
512
+ x
513
+ 2
514
+ $0
515
+ x
516
+ 2
517
+ []
518
+ x
519
+ 2
520
+ ==
521
+ n
522
+ x
523
+ 8
524
+ Validate
525
+ x
526
+ 7
527
+ include
528
+ s
529
+ 2
530
+ o1
531
+ s
532
+ 2
533
+ O2
534
+ s
535
+ 4
536
+ oink
537
+ s
538
+ 1
539
+ 1
540
+ s
541
+ 2
542
+ 12
543
+ s
544
+ 3
545
+ -12
546
+ M
547
+ 1
548
+ p
549
+ 2
550
+ x
551
+ 9
552
+ for_block
553
+ t
554
+ n
555
+ x
556
+ 9
557
+ __block__
558
+ i
559
+ 36
560
+ 57
561
+ 19
562
+ 0
563
+ 15
564
+ 5
565
+ 7
566
+ 0
567
+ 20
568
+ 0
569
+ 47
570
+ 49
571
+ 1
572
+ 0
573
+ 7
574
+ 2
575
+ 5
576
+ 20
577
+ 0
578
+ 47
579
+ 49
580
+ 3
581
+ 1
582
+ 49
583
+ 4
584
+ 0
585
+ 47
586
+ 49
587
+ 1
588
+ 0
589
+ 63
590
+ 4
591
+ 47
592
+ 49
593
+ 5
594
+ 1
595
+ 11
596
+ I
597
+ 8
598
+ I
599
+ 1
600
+ I
601
+ 1
602
+ I
603
+ 1
604
+ n
605
+ p
606
+ 6
607
+ s
608
+ 11
609
+ line_or_ip(
610
+ x
611
+ 4
612
+ to_s
613
+ s
614
+ 2
615
+ )=
616
+ x
617
+ 10
618
+ line_or_ip
619
+ x
620
+ 7
621
+ inspect
622
+ x
623
+ 4
624
+ puts
625
+ p
626
+ 5
627
+ I
628
+ 0
629
+ I
630
+ 1b
631
+ I
632
+ 4
633
+ I
634
+ 1c
635
+ I
636
+ 24
637
+ x
638
+ 55
639
+ /home/rocky-rvm/.rvm/src/rbx-trepanning/app/validate.rb
640
+ p
641
+ 1
642
+ x
643
+ 3
644
+ arg
645
+ x
646
+ 4
647
+ each
648
+ p
649
+ 11
650
+ I
651
+ 0
652
+ I
653
+ 3
654
+ I
655
+ 1b
656
+ I
657
+ 19
658
+ I
659
+ 2b
660
+ I
661
+ 1a
662
+ I
663
+ 36
664
+ I
665
+ 1b
666
+ I
667
+ 51
668
+ I
669
+ 19
670
+ I
671
+ 55
672
+ x
673
+ 55
674
+ /home/rocky-rvm/.rvm/src/rbx-trepanning/app/validate.rb
675
+ p
676
+ 0