gdb.rb 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/gdb.rb.gemspec +14 -14
- data/scripts/ruby-gdb.py +20 -3
- metadata +5 -5
data/gdb.rb.gemspec
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
spec = Gem::Specification.new do |s|
|
2
2
|
s.name = 'gdb.rb'
|
3
|
-
s.version = '0.1.
|
4
|
-
s.date = '2009-12-
|
3
|
+
s.version = '0.1.3'
|
4
|
+
s.date = '2009-12-22'
|
5
5
|
s.rubyforge_project = 'gdb-rb'
|
6
6
|
s.summary = 'gdb hooks for MRI'
|
7
7
|
s.description = 'A set of gdb7 extensions for the MRI interpreter'
|
@@ -17,17 +17,17 @@ spec = Gem::Specification.new do |s|
|
|
17
17
|
s.executables << 'gdb.rb'
|
18
18
|
|
19
19
|
# ruby -rpp -e' pp `git ls-files`.split("\n").sort '
|
20
|
-
s.files = [
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
20
|
+
s.files = %w[
|
21
|
+
README
|
22
|
+
bin/gdb.rb
|
23
|
+
ext/Makefile
|
24
|
+
ext/extconf.rb
|
25
|
+
ext/src/gdb-7.0.tar.bz2
|
26
|
+
gdb.rb.gemspec
|
27
|
+
patches/gdb-breakpoints.patch
|
28
|
+
patches/gdb-eval.patch
|
29
|
+
patches/gdb-leak.patch
|
30
|
+
patches/gdb-strings.patch
|
31
|
+
scripts/ruby-gdb.py
|
32
32
|
]
|
33
33
|
end
|
data/scripts/ruby-gdb.py
CHANGED
@@ -269,8 +269,22 @@ class RubyObjects (gdb.Command):
|
|
269
269
|
classes = ZeroDict()
|
270
270
|
|
271
271
|
for (obj, type) in self.live_objects():
|
272
|
-
if type ==
|
273
|
-
|
272
|
+
if type == 0x0:
|
273
|
+
pass # none
|
274
|
+
elif type == 0x3b:
|
275
|
+
pass # blktag
|
276
|
+
elif type == 0x3c:
|
277
|
+
pass # undef
|
278
|
+
elif type == 0x3d:
|
279
|
+
pass # varmap
|
280
|
+
elif type == 0x3e:
|
281
|
+
pass # scope
|
282
|
+
elif type == 0x3f:
|
283
|
+
pass # node
|
284
|
+
else:
|
285
|
+
klass = obj['as']['basic']['klass']
|
286
|
+
if klass:
|
287
|
+
classes[ int(klass) ] += 1
|
274
288
|
|
275
289
|
for (klass, num) in sorted(classes.items(), key=lambda(k,v):(v,k)):
|
276
290
|
print "% 8d %s" % (num, gdb.eval('rb_class2name(%d)' % klass).string())
|
@@ -285,7 +299,10 @@ class RubyObjects (gdb.Command):
|
|
285
299
|
ptr = s['ptr']
|
286
300
|
if ptr:
|
287
301
|
bytes += s['len']
|
288
|
-
|
302
|
+
try:
|
303
|
+
strings[ ptr.string() ] += 1
|
304
|
+
except:
|
305
|
+
None
|
289
306
|
|
290
307
|
for (s, num) in sorted(strings.items(), key=lambda(k,v):(v,k)):
|
291
308
|
print "% 9d" % num, repr(s)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gdb.rb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aman Gupta
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-12-
|
12
|
+
date: 2009-12-22 00:00:00 -08:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|
@@ -24,15 +24,15 @@ extra_rdoc_files: []
|
|
24
24
|
files:
|
25
25
|
- README
|
26
26
|
- bin/gdb.rb
|
27
|
-
- ext/extconf.rb
|
28
27
|
- ext/Makefile
|
28
|
+
- ext/extconf.rb
|
29
29
|
- ext/src/gdb-7.0.tar.bz2
|
30
|
-
-
|
30
|
+
- gdb.rb.gemspec
|
31
31
|
- patches/gdb-breakpoints.patch
|
32
|
+
- patches/gdb-eval.patch
|
32
33
|
- patches/gdb-leak.patch
|
33
34
|
- patches/gdb-strings.patch
|
34
35
|
- scripts/ruby-gdb.py
|
35
|
-
- gdb.rb.gemspec
|
36
36
|
has_rdoc: true
|
37
37
|
homepage: http://github.com/tmm1/gdb.rb
|
38
38
|
licenses: []
|