utils 0.6.4 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/Rakefile +2 -1
- data/VERSION +1 -1
- data/bin/blameline +2 -2
- data/bin/classify +48 -12
- data/bin/dialog-pick +11 -0
- data/bin/discover +2 -5
- data/bin/edit +1 -1
- data/bin/probe +1 -1
- data/bin/rssr +37 -0
- data/bin/search +3 -2
- data/bin/serve +24 -0
- data/bin/ssh-tunnel +1 -1
- data/bin/strip_spaces +1 -1
- data/bin/utils-utilsrc +1 -1
- data/lib/utils.rb +1 -2
- data/lib/utils/{config/config_file.rb → config_file.rb} +19 -4
- data/lib/utils/editor.rb +1 -1
- data/lib/utils/finder.rb +18 -19
- data/lib/utils/grepper.rb +20 -3
- data/lib/utils/line_blamer.rb +1 -1
- data/lib/utils/patterns.rb +3 -1
- data/lib/utils/version.rb +1 -1
- data/utils.gemspec +9 -9
- metadata +12 -18
- data/bin/utils-install-config +0 -10
- data/lib/utils/config.rb +0 -23
- data/lib/utils/config/gdb/asm +0 -179
- data/lib/utils/config/gdb/ruby +0 -514
- data/lib/utils/config/gdbinit +0 -8
- data/lib/utils/config/irbrc +0 -3
- data/lib/utils/config/rdebugrc +0 -2
- data/lib/utils/config/rvmrc +0 -5
- data/lib/utils/config/screenrc +0 -143
- data/lib/utils/config/utilsrc +0 -14
data/lib/utils/config/gdb/ruby
DELETED
@@ -1,514 +0,0 @@
|
|
1
|
-
|
2
|
-
###################
|
3
|
-
# #### RUBY STUFF
|
4
|
-
|
5
|
-
define eval
|
6
|
-
call (VALUE) rb_p((VALUE) rb_eval_string_protect($arg0,(int*)0))
|
7
|
-
end
|
8
|
-
|
9
|
-
define redirect_stdout
|
10
|
-
call (VALUE) rb_eval_string("$_old_stdout, $stdout = $stdout, File.open('/tmp/ruby-debug.' + Process.pid.to_s, 'a'); $stdout.sync = true")
|
11
|
-
end
|
12
|
-
|
13
|
-
define restore_stdout
|
14
|
-
call (VALUE) rb_eval_string("$stdout = $_old_stdout")
|
15
|
-
end
|
16
|
-
|
17
|
-
define rb_finish
|
18
|
-
call (VALUE) rb_eval_string_protect("set_trace_func lambda{|event, file, line, id, binding, classname| if /return/ =~ event; sleep 0; set_trace_func(nil) end}",(int*)0)
|
19
|
-
tbreak rb_f_sleep
|
20
|
-
cont
|
21
|
-
end
|
22
|
-
|
23
|
-
define rb_object_counts
|
24
|
-
call (VALUE) rb_eval_string_protect("counts = Hash.new{|h,k| h[k] = 0}; ObjectSpace.each_object{|o| counts[o.class] += 1}; counts.sort_by{|k,c| c}.reverse.each{|k,c| puts '%7d %s' % [c, k] } ",(int*)0)
|
25
|
-
end
|
26
|
-
|
27
|
-
define rb_locals
|
28
|
-
eval "local_variables.map{|x| puts '%s = %s' % [x, eval(x)]}; nil"
|
29
|
-
end
|
30
|
-
|
31
|
-
define rp
|
32
|
-
if ($arg0 & 0x1)
|
33
|
-
echo T_FIXNUM\n
|
34
|
-
print (long)$arg0 >> 1
|
35
|
-
else
|
36
|
-
if ($arg0 == 0)
|
37
|
-
echo T_FALSE\n
|
38
|
-
else
|
39
|
-
if ($arg0 == 2)
|
40
|
-
echo T_TRUE\n
|
41
|
-
else
|
42
|
-
if ($arg0 == 4)
|
43
|
-
echo T_NIL\n
|
44
|
-
else
|
45
|
-
if ($arg0 == 6)
|
46
|
-
echo T_UNDEF\n
|
47
|
-
else
|
48
|
-
if (($arg0 & 0xff) == 0x0e)
|
49
|
-
echo T_SYMBOL\n
|
50
|
-
output $arg0 >> 8
|
51
|
-
echo \n
|
52
|
-
call (const char *) rb_id2name($arg0 >> 8)
|
53
|
-
else
|
54
|
-
set $rbasic = (struct RBasic*)$arg0
|
55
|
-
# output $rbasic
|
56
|
-
# echo \ =\
|
57
|
-
# output *$rbasic
|
58
|
-
# echo \n
|
59
|
-
set $flags = (*$rbasic).flags & 0x3f
|
60
|
-
if ($flags == 0x01)
|
61
|
-
echo T_NIL\n
|
62
|
-
echo impossible\n
|
63
|
-
else
|
64
|
-
if ($flags == 0x02)
|
65
|
-
echo T_OBJECT\n
|
66
|
-
print *(struct RObject*)$rbasic
|
67
|
-
else
|
68
|
-
if ($flags == 0x03)
|
69
|
-
echo T_CLASS\n
|
70
|
-
# rb_classname($arg0)
|
71
|
-
else
|
72
|
-
if ($flags == 0x04)
|
73
|
-
echo T_ICLASS\n
|
74
|
-
print *(struct RClass*)$rbasic
|
75
|
-
else
|
76
|
-
if ($flags == 0x05)
|
77
|
-
echo T_MODULE\n
|
78
|
-
print *(struct RClass*)$rbasic
|
79
|
-
else
|
80
|
-
if ($flags == 0x06)
|
81
|
-
echo T_FLOAT\n
|
82
|
-
print *(struct RFloat*)$rbasic
|
83
|
-
else
|
84
|
-
if ($flags == 0x07)
|
85
|
-
echo T_STRING\n
|
86
|
-
print *(struct RString*)$rbasic
|
87
|
-
else
|
88
|
-
if ($flags == 0x08)
|
89
|
-
echo T_REGEXP\n
|
90
|
-
print *(struct RRegexp*)$rbasic
|
91
|
-
else
|
92
|
-
if ($flags == 0x09)
|
93
|
-
echo T_ARRAY\n
|
94
|
-
print *(struct RArray*)$rbasic
|
95
|
-
else
|
96
|
-
if ($flags == 0x0a)
|
97
|
-
echo T_FIXNUM\n
|
98
|
-
echo impossible\n
|
99
|
-
else
|
100
|
-
if ($flags == 0x0b)
|
101
|
-
echo T_HASH\n
|
102
|
-
print *(struct RHash*)$rbasic
|
103
|
-
else
|
104
|
-
if ($flags == 0x0c)
|
105
|
-
echo T_STRUCT\n
|
106
|
-
print *(struct RStruct*)$rbasic
|
107
|
-
else
|
108
|
-
if ($flags == 0x0d)
|
109
|
-
echo T_BIGNUM\n
|
110
|
-
print *(struct RBignum*)$rbasic
|
111
|
-
else
|
112
|
-
if ($flags == 0x0e)
|
113
|
-
echo T_FILE\n
|
114
|
-
print *(struct RFile*)$rbasic
|
115
|
-
else
|
116
|
-
if ($flags == 0x20)
|
117
|
-
echo T_TRUE\n
|
118
|
-
echo impossible\n
|
119
|
-
else
|
120
|
-
if ($flags == 0x21)
|
121
|
-
echo T_FALSE\n
|
122
|
-
echo impossible\n
|
123
|
-
else
|
124
|
-
if ($flags == 0x22)
|
125
|
-
echo T_DATA\n
|
126
|
-
print *(struct RData*)$rbasic
|
127
|
-
else
|
128
|
-
if ($flags == 0x23)
|
129
|
-
echo T_MATCH\n
|
130
|
-
print *(struct RMatch*)$rbasic
|
131
|
-
else
|
132
|
-
if ($flags == 0x24)
|
133
|
-
echo T_SYMBOL\n
|
134
|
-
echo impossible\n
|
135
|
-
else
|
136
|
-
if ($flags == 0x3c)
|
137
|
-
echo T_UNDEF\n
|
138
|
-
echo impossible\n
|
139
|
-
else
|
140
|
-
if ($flags == 0x3d)
|
141
|
-
echo T_VARMAP\n
|
142
|
-
else
|
143
|
-
if ($flags == 0x3e)
|
144
|
-
echo T_SCOPE\n
|
145
|
-
else
|
146
|
-
if ($flags == 0x3f)
|
147
|
-
echo T_NODE\n
|
148
|
-
print (NODE*)$arg0
|
149
|
-
else
|
150
|
-
echo Unknown\n
|
151
|
-
end
|
152
|
-
end
|
153
|
-
end
|
154
|
-
end
|
155
|
-
end
|
156
|
-
end
|
157
|
-
end
|
158
|
-
end
|
159
|
-
end
|
160
|
-
end
|
161
|
-
end
|
162
|
-
end
|
163
|
-
end
|
164
|
-
end
|
165
|
-
end
|
166
|
-
end
|
167
|
-
end
|
168
|
-
end
|
169
|
-
end
|
170
|
-
end
|
171
|
-
end
|
172
|
-
end
|
173
|
-
end
|
174
|
-
|
175
|
-
end
|
176
|
-
end
|
177
|
-
end
|
178
|
-
end
|
179
|
-
end
|
180
|
-
end
|
181
|
-
end
|
182
|
-
|
183
|
-
define nd_type
|
184
|
-
print nodetype($arg0)
|
185
|
-
end
|
186
|
-
|
187
|
-
define nd_file
|
188
|
-
print ((NODE*)$arg0)->nd_file
|
189
|
-
end
|
190
|
-
|
191
|
-
define nd_line
|
192
|
-
print nodeline($arg0)
|
193
|
-
end
|
194
|
-
|
195
|
-
define nd_head
|
196
|
-
print "u1.node"
|
197
|
-
what $arg0.u1.node
|
198
|
-
p $arg0.u1.node
|
199
|
-
end
|
200
|
-
|
201
|
-
define nd_alen
|
202
|
-
print "u2.argc"
|
203
|
-
what $arg0.u2.argc
|
204
|
-
p $arg0.u2.argc
|
205
|
-
end
|
206
|
-
|
207
|
-
define nd_next
|
208
|
-
print "u3.node"
|
209
|
-
what $arg0.u3.node
|
210
|
-
p $arg0.u3.node
|
211
|
-
end
|
212
|
-
|
213
|
-
|
214
|
-
define nd_cond
|
215
|
-
print "u1.node"
|
216
|
-
what $arg0.u1.node
|
217
|
-
p $arg0.u1.node
|
218
|
-
end
|
219
|
-
|
220
|
-
define nd_body
|
221
|
-
print "u2.node"
|
222
|
-
what $arg0.u2.node
|
223
|
-
p $arg0.u2.node
|
224
|
-
end
|
225
|
-
|
226
|
-
define nd_else
|
227
|
-
print "u3.node"
|
228
|
-
what $arg0.u3.node
|
229
|
-
p $arg0.u3.node
|
230
|
-
end
|
231
|
-
|
232
|
-
|
233
|
-
define nd_orig
|
234
|
-
print "u3.value"
|
235
|
-
what $arg0.u3.value
|
236
|
-
p $arg0.u3.value
|
237
|
-
end
|
238
|
-
|
239
|
-
|
240
|
-
define nd_resq
|
241
|
-
print "u2.node"
|
242
|
-
what $arg0.u2.node
|
243
|
-
p $arg0.u2.node
|
244
|
-
end
|
245
|
-
|
246
|
-
define nd_ensr
|
247
|
-
print "u3.node"
|
248
|
-
what $arg0.u3.node
|
249
|
-
p $arg0.u3.node
|
250
|
-
end
|
251
|
-
|
252
|
-
|
253
|
-
define nd_1st
|
254
|
-
print "u1.node"
|
255
|
-
what $arg0.u1.node
|
256
|
-
p $arg0.u1.node
|
257
|
-
end
|
258
|
-
|
259
|
-
define nd_2nd
|
260
|
-
print "u2.node"
|
261
|
-
what $arg0.u2.node
|
262
|
-
p $arg0.u2.node
|
263
|
-
end
|
264
|
-
|
265
|
-
|
266
|
-
define nd_stts
|
267
|
-
print "u1.node"
|
268
|
-
what $arg0.u1.node
|
269
|
-
p $arg0.u1.node
|
270
|
-
end
|
271
|
-
|
272
|
-
|
273
|
-
define nd_entry
|
274
|
-
print "u3.entry"
|
275
|
-
what $arg0.u3.entry
|
276
|
-
p $arg0.u3.entry
|
277
|
-
end
|
278
|
-
|
279
|
-
define nd_vid
|
280
|
-
print "u1.id"
|
281
|
-
what $arg0.u1.id
|
282
|
-
p $arg0.u1.id
|
283
|
-
end
|
284
|
-
|
285
|
-
define nd_cflag
|
286
|
-
print "u2.id"
|
287
|
-
what $arg0.u2.id
|
288
|
-
p $arg0.u2.id
|
289
|
-
end
|
290
|
-
|
291
|
-
define nd_cval
|
292
|
-
print "u3.value"
|
293
|
-
what $arg0.u3.value
|
294
|
-
p $arg0.u3.value
|
295
|
-
end
|
296
|
-
|
297
|
-
|
298
|
-
define nd_cnt
|
299
|
-
print "u3.cnt"
|
300
|
-
what $arg0.u3.cnt
|
301
|
-
p $arg0.u3.cnt
|
302
|
-
end
|
303
|
-
|
304
|
-
define nd_tbl
|
305
|
-
print "u1.tbl"
|
306
|
-
what $arg0.u1.tbl
|
307
|
-
p $arg0.u1.tbl
|
308
|
-
end
|
309
|
-
|
310
|
-
|
311
|
-
define nd_var
|
312
|
-
print "u1.node"
|
313
|
-
what $arg0.u1.node
|
314
|
-
p $arg0.u1.node
|
315
|
-
end
|
316
|
-
|
317
|
-
define nd_ibdy
|
318
|
-
print "u2.node"
|
319
|
-
what $arg0.u2.node
|
320
|
-
p $arg0.u2.node
|
321
|
-
end
|
322
|
-
|
323
|
-
define nd_iter
|
324
|
-
print "u3.node"
|
325
|
-
what $arg0.u3.node
|
326
|
-
p $arg0.u3.node
|
327
|
-
end
|
328
|
-
|
329
|
-
|
330
|
-
define nd_value
|
331
|
-
print "u2.node"
|
332
|
-
what $arg0.u2.node
|
333
|
-
p $arg0.u2.node
|
334
|
-
end
|
335
|
-
|
336
|
-
define nd_aid
|
337
|
-
print "u3.id"
|
338
|
-
what $arg0.u3.id
|
339
|
-
p $arg0.u3.id
|
340
|
-
end
|
341
|
-
|
342
|
-
|
343
|
-
define nd_lit
|
344
|
-
print "u1.value"
|
345
|
-
what $arg0.u1.value
|
346
|
-
p $arg0.u1.value
|
347
|
-
end
|
348
|
-
|
349
|
-
|
350
|
-
define nd_frml
|
351
|
-
print "u1.node"
|
352
|
-
what $arg0.u1.node
|
353
|
-
p $arg0.u1.node
|
354
|
-
end
|
355
|
-
|
356
|
-
define nd_rest
|
357
|
-
print "u2.argc"
|
358
|
-
what $arg0.u2.argc
|
359
|
-
p $arg0.u2.argc
|
360
|
-
end
|
361
|
-
|
362
|
-
define nd_opt
|
363
|
-
print "u1.node"
|
364
|
-
what $arg0.u1.node
|
365
|
-
p $arg0.u1.node
|
366
|
-
end
|
367
|
-
|
368
|
-
|
369
|
-
define nd_recv
|
370
|
-
print "u1.node"
|
371
|
-
what $arg0.u1.node
|
372
|
-
p $arg0.u1.node
|
373
|
-
end
|
374
|
-
|
375
|
-
define nd_mid
|
376
|
-
print "u2.id"
|
377
|
-
what $arg0.u2.id
|
378
|
-
p $arg0.u2.id
|
379
|
-
end
|
380
|
-
|
381
|
-
define nd_args
|
382
|
-
print "u3.node"
|
383
|
-
what $arg0.u3.node
|
384
|
-
p $arg0.u3.node
|
385
|
-
end
|
386
|
-
|
387
|
-
|
388
|
-
define nd_noex
|
389
|
-
print "u1.id"
|
390
|
-
what $arg0.u1.id
|
391
|
-
p $arg0.u1.id
|
392
|
-
end
|
393
|
-
|
394
|
-
define nd_defn
|
395
|
-
print "u3.node"
|
396
|
-
what $arg0.u3.node
|
397
|
-
p $arg0.u3.node
|
398
|
-
end
|
399
|
-
|
400
|
-
|
401
|
-
define nd_old
|
402
|
-
print "u1.id"
|
403
|
-
what $arg0.u1.id
|
404
|
-
p $arg0.u1.id
|
405
|
-
end
|
406
|
-
|
407
|
-
define nd_new
|
408
|
-
print "u2.id"
|
409
|
-
what $arg0.u2.id
|
410
|
-
p $arg0.u2.id
|
411
|
-
end
|
412
|
-
|
413
|
-
|
414
|
-
define nd_cfnc
|
415
|
-
print "u1.cfunc"
|
416
|
-
what $arg0.u1.cfunc
|
417
|
-
p $arg0.u1.cfunc
|
418
|
-
end
|
419
|
-
|
420
|
-
define nd_argc
|
421
|
-
print "u2.argc"
|
422
|
-
what $arg0.u2.argc
|
423
|
-
p $arg0.u2.argc
|
424
|
-
end
|
425
|
-
|
426
|
-
|
427
|
-
define nd_cname
|
428
|
-
print "u1.id"
|
429
|
-
what $arg0.u1.id
|
430
|
-
p $arg0.u1.id
|
431
|
-
end
|
432
|
-
|
433
|
-
define nd_super
|
434
|
-
print "u3.node"
|
435
|
-
what $arg0.u3.node
|
436
|
-
p $arg0.u3.node
|
437
|
-
end
|
438
|
-
|
439
|
-
|
440
|
-
define nd_modl
|
441
|
-
print "u1.id"
|
442
|
-
what $arg0.u1.id
|
443
|
-
p $arg0.u1.id
|
444
|
-
end
|
445
|
-
|
446
|
-
define nd_clss
|
447
|
-
print "u1.value"
|
448
|
-
what $arg0.u1.value
|
449
|
-
p $arg0.u1.value
|
450
|
-
end
|
451
|
-
|
452
|
-
|
453
|
-
define nd_beg
|
454
|
-
print "u1.node"
|
455
|
-
what $arg0.u1.node
|
456
|
-
p $arg0.u1.node
|
457
|
-
end
|
458
|
-
|
459
|
-
define nd_end
|
460
|
-
print "u2.node"
|
461
|
-
what $arg0.u2.node
|
462
|
-
p $arg0.u2.node
|
463
|
-
end
|
464
|
-
|
465
|
-
define nd_state
|
466
|
-
print "u3.state"
|
467
|
-
what $arg0.u3.state
|
468
|
-
p $arg0.u3.state
|
469
|
-
end
|
470
|
-
|
471
|
-
define nd_rval
|
472
|
-
print "u2.value"
|
473
|
-
what $arg0.u2.value
|
474
|
-
p $arg0.u2.value
|
475
|
-
end
|
476
|
-
|
477
|
-
|
478
|
-
define nd_nth
|
479
|
-
print "u2.argc"
|
480
|
-
what $arg0.u2.argc
|
481
|
-
p $arg0.u2.argc
|
482
|
-
end
|
483
|
-
|
484
|
-
|
485
|
-
define nd_tag
|
486
|
-
print "u1.id"
|
487
|
-
what $arg0.u1.id
|
488
|
-
p $arg0.u1.id
|
489
|
-
end
|
490
|
-
|
491
|
-
define nd_tval
|
492
|
-
print "u2.value"
|
493
|
-
what $arg0.u2.value
|
494
|
-
p $arg0.u2.value
|
495
|
-
end
|
496
|
-
|
497
|
-
define rb_p
|
498
|
-
call (void) rb_p($arg0)
|
499
|
-
end
|
500
|
-
|
501
|
-
define rb_id2name
|
502
|
-
call (const char *) rb_id2name($arg0)
|
503
|
-
end
|
504
|
-
|
505
|
-
define rb_classname
|
506
|
-
call (VALUE) classname($arg0)
|
507
|
-
rb_p $
|
508
|
-
p *(struct RClass*)$arg0
|
509
|
-
end
|
510
|
-
|
511
|
-
define rb_backtrace
|
512
|
-
call (void) rb_backtrace()
|
513
|
-
end
|
514
|
-
|