gdb.rb 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- data/README +1 -2
- data/bin/gdb.rb +1 -0
- data/ext/extconf.rb +10 -2
- data/gdb.rb.gemspec +1 -3
- data/scripts/ruby-gdb.py +1 -19
- data/scripts/settings.gdb +8 -0
- metadata +11 -5
data/README
CHANGED
data/bin/gdb.rb
CHANGED
data/ext/extconf.rb
CHANGED
@@ -3,7 +3,7 @@ CWD = File.expand_path(File.dirname(__FILE__))
|
|
3
3
|
def sys(cmd)
|
4
4
|
puts " -- #{cmd}"
|
5
5
|
unless ret = xsystem(cmd)
|
6
|
-
raise "#{cmd} failed, please report to gdb@tmm1.net with pastie.org link to #{CWD}/mkmf.log and #{CWD}/src/gdb-7.
|
6
|
+
raise "#{cmd} failed, please report to gdb@tmm1.net with pastie.org link to #{CWD}/mkmf.log and #{CWD}/src/gdb-7.2/config.log"
|
7
7
|
end
|
8
8
|
ret
|
9
9
|
end
|
@@ -20,7 +20,7 @@ if RUBY_PLATFORM !~ /(i686|x86_64)-linux/
|
|
20
20
|
end
|
21
21
|
|
22
22
|
dir_config('python')
|
23
|
-
unless have_header('python2.5/Python.h') or have_header('python2.6/Python.h') or have_header('python2.
|
23
|
+
unless have_header('python2.4/Python.h') or have_header('python2.5/Python.h') or have_header('python2.6/Python.h') or have_header('python2.7/Python.h')
|
24
24
|
STDERR.puts "\n\n"
|
25
25
|
STDERR.puts "***************************************************************************************"
|
26
26
|
STDERR.puts "***************** Python required (apt-get install python2.5-dev) =( ******************"
|
@@ -36,6 +36,14 @@ unless have_header('ncurses.h') or have_header('ncurses/ncurses.h')
|
|
36
36
|
exit(1)
|
37
37
|
end
|
38
38
|
|
39
|
+
if `which make`.strip.empty?
|
40
|
+
STDERR.puts "\n\n"
|
41
|
+
STDERR.puts "***************************************************************************************"
|
42
|
+
STDERR.puts "*************** make required (apt-get install make build-essential) =( ***************"
|
43
|
+
STDERR.puts "***************************************************************************************"
|
44
|
+
exit(1)
|
45
|
+
end
|
46
|
+
|
39
47
|
gdb = File.basename('gdb-7.2.tar.bz2')
|
40
48
|
dir = File.basename(gdb, '.tar.bz2')
|
41
49
|
|
data/gdb.rb.gemspec
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
spec = Gem::Specification.new do |s|
|
2
2
|
s.name = 'gdb.rb'
|
3
|
-
s.version = '0.1.
|
4
|
-
s.date = '2010-11-16'
|
3
|
+
s.version = '0.1.7'
|
5
4
|
s.rubyforge_project = 'gdb-rb'
|
6
5
|
s.summary = 'gdb hooks for MRI/REE and YARV'
|
7
6
|
s.description = 'A set of gdb7 extensions for the MRI/REE 1.8.x interpreter (and basic support for YARV 1.9.2)'
|
@@ -11,7 +10,6 @@ spec = Gem::Specification.new do |s|
|
|
11
10
|
s.authors = ["Aman Gupta"]
|
12
11
|
s.email = "gdb@tmm1.net"
|
13
12
|
|
14
|
-
s.has_rdoc = false
|
15
13
|
s.extensions = 'ext/extconf.rb'
|
16
14
|
s.bindir = 'bin'
|
17
15
|
s.executables << 'gdb.rb'
|
data/scripts/ruby-gdb.py
CHANGED
@@ -459,7 +459,6 @@ class RubyEval (gdb.Command):
|
|
459
459
|
|
460
460
|
def invoke (self, arg, from_tty):
|
461
461
|
self.dont_repeat()
|
462
|
-
# check if rb_during_gc
|
463
462
|
arg = arg.replace('\\', '\\\\').replace('"', '\\\"')
|
464
463
|
print gdb.parse_and_eval("RSTRING_PTR(rb_eval_string_protect(\"begin; (%s).inspect; rescue Exception => e; e.inspect; end\", 0))" % arg).string()
|
465
464
|
|
@@ -564,6 +563,7 @@ else:
|
|
564
563
|
# Common 1.8 macros
|
565
564
|
macros += """
|
566
565
|
#define RSTRING_PTR(obj) (RSTRING(obj)->ptr)
|
566
|
+
#define RSTRING_LEN(obj) (RSTRING(obj)->len)
|
567
567
|
#define CHAR_BIT 8
|
568
568
|
#define NODE_LSHIFT (FL_USHIFT+8)
|
569
569
|
#define NODE_LMASK (((long)1<<(sizeof(NODE*)*CHAR_BIT-NODE_LSHIFT))-1)
|
@@ -640,21 +640,3 @@ else:
|
|
640
640
|
RubyObjects.TYPES[int(val,16)] = name[2:].lower()
|
641
641
|
|
642
642
|
RubyObjects.ITYPES = dict([[v,k] for k,v in RubyObjects.TYPES.items()])
|
643
|
-
|
644
|
-
##
|
645
|
-
# Set GDB options
|
646
|
-
|
647
|
-
settings = """
|
648
|
-
set height 0
|
649
|
-
set width 0
|
650
|
-
set print pretty
|
651
|
-
|
652
|
-
set history save on
|
653
|
-
set history filename ~/.gdbrb_history
|
654
|
-
|
655
|
-
set debug-file-directory /usr/lib/debug
|
656
|
-
""".split("\n")
|
657
|
-
|
658
|
-
for s in settings:
|
659
|
-
if len(s.strip()) > 0:
|
660
|
-
gdb.execute(s)
|
metadata
CHANGED
@@ -1,12 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gdb.rb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
hash: 21
|
5
|
+
prerelease:
|
5
6
|
segments:
|
6
7
|
- 0
|
7
8
|
- 1
|
8
|
-
-
|
9
|
-
version: 0.1.
|
9
|
+
- 7
|
10
|
+
version: 0.1.7
|
10
11
|
platform: ruby
|
11
12
|
authors:
|
12
13
|
- Aman Gupta
|
@@ -14,7 +15,7 @@ autorequire:
|
|
14
15
|
bindir: bin
|
15
16
|
cert_chain: []
|
16
17
|
|
17
|
-
date:
|
18
|
+
date: 2011-05-20 00:00:00 -04:00
|
18
19
|
default_executable:
|
19
20
|
dependencies: []
|
20
21
|
|
@@ -36,6 +37,7 @@ files:
|
|
36
37
|
- patches/gdb-leak.patch
|
37
38
|
- patches/gdb-strings.patch
|
38
39
|
- scripts/ruby-gdb.py
|
40
|
+
- scripts/settings.gdb
|
39
41
|
has_rdoc: true
|
40
42
|
homepage: http://github.com/tmm1/gdb.rb
|
41
43
|
licenses: []
|
@@ -46,23 +48,27 @@ rdoc_options: []
|
|
46
48
|
require_paths:
|
47
49
|
- lib
|
48
50
|
required_ruby_version: !ruby/object:Gem::Requirement
|
51
|
+
none: false
|
49
52
|
requirements:
|
50
53
|
- - ">="
|
51
54
|
- !ruby/object:Gem::Version
|
55
|
+
hash: 3
|
52
56
|
segments:
|
53
57
|
- 0
|
54
58
|
version: "0"
|
55
59
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
60
|
+
none: false
|
56
61
|
requirements:
|
57
62
|
- - ">="
|
58
63
|
- !ruby/object:Gem::Version
|
64
|
+
hash: 3
|
59
65
|
segments:
|
60
66
|
- 0
|
61
67
|
version: "0"
|
62
68
|
requirements: []
|
63
69
|
|
64
70
|
rubyforge_project: gdb-rb
|
65
|
-
rubygems_version: 1.
|
71
|
+
rubygems_version: 1.4.2
|
66
72
|
signing_key:
|
67
73
|
specification_version: 3
|
68
74
|
summary: gdb hooks for MRI/REE and YARV
|