debugger 1.0.0.rc1 → 1.0.0.rc2
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +4 -0
- data/CHANGELOG.md +8 -0
- data/{CHANGES → OLDER_CHANGELOG} +0 -0
- data/{ChangeLog → OLD_CHANGELOG} +0 -0
- data/README.md +60 -2
- data/Rakefile +14 -142
- data/debugger.gemspec +5 -2
- data/ext/ruby_debug/extconf.rb +5 -5
- data/lib/debugger/version.rb +3 -1
- metadata +43 -9
- data/INSTALL.SVN +0 -154
data/.travis.yml
ADDED
data/CHANGELOG.md
ADDED
data/{CHANGES → OLDER_CHANGELOG}
RENAMED
File without changes
|
data/{ChangeLog → OLD_CHANGELOG}
RENAMED
File without changes
|
data/README.md
CHANGED
@@ -1,10 +1,68 @@
|
|
1
1
|
## Description
|
2
|
-
A fork of ruby-debug19 that works on 1.9.3 and installs easily.
|
2
|
+
A fork of ruby-debug19 that works on 1.9.3 and installs easily for rvm/rbenv rubies. 1.9.2 support
|
3
|
+
coming...
|
4
|
+
|
5
|
+
[![Build Status](https://secure.travis-ci.org/cldwalker/debugger.png?branch=master)](http://travis-ci.org/cldwalker/log_buddy)
|
6
|
+
|
7
|
+
## Install
|
8
|
+
|
9
|
+
$ gem install debugger
|
10
|
+
|
11
|
+
# If install fails, try passing headers path
|
12
|
+
$ gem install debugger -- --with-ruby-include=PATH_TO_HEADERS
|
13
|
+
|
14
|
+
For Windows install instructions, see OLD\_README.
|
3
15
|
|
4
16
|
## Usage
|
5
17
|
|
18
|
+
To use in your Rails app, drop in your Gemfile:
|
19
|
+
|
20
|
+
gem 'debugger'
|
21
|
+
|
22
|
+
Wherever you need a debugger, simply:
|
6
23
|
```ruby
|
7
24
|
require 'debugger'; debugger
|
8
25
|
```
|
9
26
|
|
10
|
-
|
27
|
+
## Reason for Fork
|
28
|
+
|
29
|
+
* ruby-debug19 maintainer isn't maintaining:
|
30
|
+
* Despite patches from ruby core, no gem release in 2+ years! - 9/1/09.
|
31
|
+
* Requests to release a known working 1.9.3 version have been ignored.
|
32
|
+
* Doesn't respond to rubyforge issues and doesn't have github issues open.
|
33
|
+
* Current install is painful. Requires either [manually downloading gems from rubyforge](
|
34
|
+
http://blog.wyeworks.com/2011/11/1/ruby-1-9-3-and-ruby-debug) and installing with compiler flags
|
35
|
+
or [recompiling
|
36
|
+
ruby](http://blog.sj26.com/post/12146951658/updated-using-ruby-debug-on-ruby-1-9-3-p0).
|
37
|
+
* We need a decent ruby debugger for future rubies!
|
38
|
+
|
39
|
+
## What's different from ruby-debug19
|
40
|
+
|
41
|
+
* Works on 1.9.3 but not 1.9.2 yet
|
42
|
+
* Install painlessly for rvm and rbenv rubies i.e. no compiler flags needed
|
43
|
+
* Tests are up on travis-ci
|
44
|
+
* The gem name matches the module namespace, Debugger, and main required file, debugger.
|
45
|
+
* Rake tasks have been updated
|
46
|
+
* ruby-debug-base19 and ruby-debug19 are released as one gem
|
47
|
+
* No downloading ruby source during install - was behavior of old ruby_core_source dependency
|
48
|
+
* Fix LocalJumpError caused by using proc in extconf.rb
|
49
|
+
|
50
|
+
## Issues
|
51
|
+
Please report them [on github](http://github.com/cldwalker/debugger/issues).
|
52
|
+
|
53
|
+
## Contributing
|
54
|
+
[See here](http://tagaholic.me/contributing.html) for contribution policies.
|
55
|
+
Let's keep this working for the ruby community!
|
56
|
+
|
57
|
+
## Credits
|
58
|
+
|
59
|
+
* Thanks to the original authors: Kent Sibilev and Mark Moseley
|
60
|
+
* Fork started on awesome @relevance fridays!
|
61
|
+
|
62
|
+
## TODO
|
63
|
+
|
64
|
+
* Add back support for 1.9.2
|
65
|
+
* Doing something stupid simple i.e. copy latest ruby-debug19 that works and require as needed
|
66
|
+
* Fix test/test-*.rb
|
67
|
+
* Work with others willing to tackle jruby, rubinius or windows support
|
68
|
+
* Clean up (merge) lib + cli as separate runtime paths for ruby-debug-base19 and ruby-debug19
|
data/Rakefile
CHANGED
@@ -1,8 +1,5 @@
|
|
1
|
-
#!/usr/bin/env rake
|
2
1
|
# -*- Ruby -*-
|
3
|
-
require 'rubygems'
|
4
|
-
require 'rake/gempackagetask'
|
5
|
-
require 'rake/rdoctask'
|
2
|
+
require 'rubygems/package_task'
|
6
3
|
require 'rake/testtask'
|
7
4
|
require 'rake/extensiontask'
|
8
5
|
|
@@ -11,7 +8,7 @@ Rake::ExtensionTask.new('ruby_debug')
|
|
11
8
|
SO_NAME = "ruby_debug.so"
|
12
9
|
|
13
10
|
# ------- Default Package ----------
|
14
|
-
RUBY_DEBUG_VERSION = open("ext/ruby_debug/ruby_debug.c") do |f|
|
11
|
+
RUBY_DEBUG_VERSION = open("ext/ruby_debug/ruby_debug.c") do |f|
|
15
12
|
f.grep(/^#define DEBUG_VERSION/).first[/"(.+)"/,1]
|
16
13
|
end
|
17
14
|
|
@@ -24,12 +21,13 @@ COMMON_FILES = FileList[
|
|
24
21
|
'LICENSE',
|
25
22
|
'README',
|
26
23
|
'Rakefile',
|
27
|
-
]
|
24
|
+
]
|
28
25
|
|
29
26
|
CLI_TEST_FILE_LIST = FileList['test/cli/commands/unit/*.rb',
|
30
|
-
'test/cli/commands/*_test.rb',
|
31
|
-
'test/cli/**/*_test.rb'
|
32
|
-
|
27
|
+
'test/cli/commands/*_test.rb',
|
28
|
+
'test/cli/**/*_test.rb']
|
29
|
+
# disabled until requires fixed and tests pass
|
30
|
+
# 'test/test-*.rb']
|
33
31
|
CLI_FILES = COMMON_FILES + FileList[
|
34
32
|
"cli/**/*",
|
35
33
|
'ChangeLog',
|
@@ -43,8 +41,8 @@ CLI_FILES = COMMON_FILES + FileList[
|
|
43
41
|
]
|
44
42
|
|
45
43
|
BASE_TEST_FILE_LIST = %w(
|
46
|
-
test/base/base.rb
|
47
|
-
test/base/binding.rb
|
44
|
+
test/base/base.rb
|
45
|
+
test/base/binding.rb
|
48
46
|
test/base/catchpoint.rb)
|
49
47
|
BASE_FILES = COMMON_FILES + FileList[
|
50
48
|
'ext/ruby_debug/breakpoint.c',
|
@@ -57,7 +55,7 @@ BASE_FILES = COMMON_FILES + FileList[
|
|
57
55
|
]
|
58
56
|
|
59
57
|
desc "Test everything."
|
60
|
-
task :test => :test_base do
|
58
|
+
task :test => :test_base do
|
61
59
|
Rake::TestTask.new(:test) do |t|
|
62
60
|
t.libs << './ext'
|
63
61
|
t.libs << './lib'
|
@@ -68,7 +66,7 @@ task :test => :test_base do
|
|
68
66
|
end
|
69
67
|
|
70
68
|
desc "Test ruby-debug-base."
|
71
|
-
task :test_base => :lib do
|
69
|
+
task :test_base => :lib do
|
72
70
|
Rake::TestTask.new(:test_base) do |t|
|
73
71
|
t.libs << './ext'
|
74
72
|
t.libs << './lib'
|
@@ -95,92 +93,12 @@ file "emacs/rdebug.elc" => ["emacs/elisp-comp", "emacs/rdebug.el"] do
|
|
95
93
|
end
|
96
94
|
end
|
97
95
|
|
98
|
-
|
99
|
-
task :ChangeLog do
|
100
|
-
system("svn2cl --authors=svn2cl_usermap svn://rubyforge.org/var/svn/ruby-debug/trunk")
|
101
|
-
system("svn2cl --authors=svn2cl_usermap svn://rubyforge.org/var/svn/ruby-debug/trunk/ext -o ext/ChangeLog")
|
102
|
-
system("svn2cl --authors=svn2cl_usermap svn://rubyforge.org/var/svn/ruby-debug/trunk/lib -o lib/ChangeLog")
|
103
|
-
end
|
104
|
-
|
105
|
-
# Base GEM Specification
|
106
|
-
base_spec = Gem::Specification.new do |spec|
|
107
|
-
spec.name = "ruby-debug-base19"
|
108
|
-
|
109
|
-
spec.homepage = "http://rubyforge.org/projects/ruby-debug19/"
|
110
|
-
spec.summary = "Fast Ruby debugger - core component"
|
111
|
-
spec.description = <<-EOF
|
112
|
-
ruby-debug-base19 is a fast implementation of the standard Ruby debugger debug.rb.
|
113
|
-
It is implemented by utilizing a new Ruby C API hook. The core component
|
114
|
-
provides support that front-ends can build on. It provides breakpoint
|
115
|
-
handling, bindings for stack frames among other things.
|
116
|
-
EOF
|
117
|
-
|
118
|
-
spec.version = RUBY_DEBUG_VERSION + RUBY_DEBUG_BASE_TEENY
|
119
|
-
|
120
|
-
spec.authors = ["Kent Sibilev", "Mark Moseley"]
|
121
|
-
spec.email = "mark@fast-software.com"
|
122
|
-
spec.platform = Gem::Platform::RUBY
|
123
|
-
spec.require_path = "lib"
|
124
|
-
spec.extensions = ["ext/ruby_debug/extconf.rb"]
|
125
|
-
spec.files = BASE_FILES.to_a
|
126
|
-
|
127
|
-
spec.required_ruby_version = '>= 1.8.2'
|
128
|
-
spec.date = Time.now
|
129
|
-
spec.rubyforge_project = 'ruby-debug19'
|
130
|
-
spec.add_dependency('ruby_core_source', '>= 0.1.4')
|
131
|
-
spec.add_dependency('linecache19', '>= 0.5.11')
|
132
|
-
|
133
|
-
spec.test_files = FileList[BASE_TEST_FILE_LIST]
|
134
|
-
|
135
|
-
# rdoc
|
136
|
-
spec.has_rdoc = true
|
137
|
-
spec.extra_rdoc_files = ['README', 'ext/ruby_debug/ruby_debug.c']
|
138
|
-
end
|
139
|
-
|
140
|
-
cli_spec = Gem::Specification.new do |spec|
|
141
|
-
spec.name = "ruby-debug19"
|
142
|
-
|
143
|
-
spec.homepage = "http://rubyforge.org/projects/ruby-debug19/"
|
144
|
-
spec.summary = "Command line interface (CLI) for ruby-debug-base19"
|
145
|
-
spec.description = <<-EOF
|
146
|
-
A generic command line interface for ruby-debug.
|
147
|
-
EOF
|
148
|
-
|
149
|
-
spec.version = RUBY_DEBUG_VERSION + RUBY_DEBUG_TEENY
|
150
|
-
|
151
|
-
spec.authors = ["Kent Sibilev", "Mark Moseley"]
|
152
|
-
spec.email = "mark@fast-software.com"
|
153
|
-
spec.platform = Gem::Platform::RUBY
|
154
|
-
spec.require_path = "cli"
|
155
|
-
spec.bindir = "bin"
|
156
|
-
spec.executables = ["rdebug"]
|
157
|
-
spec.files = CLI_FILES.to_a
|
158
|
-
|
159
|
-
spec.required_ruby_version = '>= 1.8.2'
|
160
|
-
spec.date = Time.now
|
161
|
-
spec.rubyforge_project = 'ruby-debug'
|
162
|
-
spec.add_dependency('columnize', '>= 0.3.1')
|
163
|
-
spec.add_dependency('linecache19', '>= 0.5.11')
|
164
|
-
spec.add_dependency('ruby-debug-base19', '>= 0.12.0')
|
165
|
-
|
166
|
-
# FIXME: work out operational logistics for this
|
167
|
-
# spec.test_files = FileList[CLI_TEST_FILE_LIST]
|
168
|
-
|
169
|
-
# rdoc
|
170
|
-
spec.has_rdoc = true
|
171
|
-
spec.extra_rdoc_files = ['README']
|
172
|
-
end
|
173
|
-
|
96
|
+
base_spec = eval(File.read('debugger.gemspec'), binding, 'debugger.gemspec')
|
174
97
|
# Rake task to build the default package
|
175
|
-
|
176
|
-
pkg.need_tar = true
|
177
|
-
end
|
178
|
-
Rake::GemPackageTask.new(cli_spec) do |pkg|
|
98
|
+
Gem::PackageTask.new(base_spec) do |pkg|
|
179
99
|
pkg.need_tar = true
|
180
100
|
end
|
181
101
|
|
182
|
-
task :default => [:package]
|
183
|
-
|
184
102
|
# Windows specification
|
185
103
|
win_spec = base_spec.clone
|
186
104
|
win_spec.extensions = []
|
@@ -205,17 +123,6 @@ task :win32_gem do
|
|
205
123
|
rm(target)
|
206
124
|
end
|
207
125
|
|
208
|
-
desc "Publish ruby-debug to RubyForge."
|
209
|
-
task :publish do
|
210
|
-
require 'rake/contrib/sshpublisher'
|
211
|
-
|
212
|
-
# Get ruby-debug path.
|
213
|
-
ruby_debug_path = File.expand_path(File.dirname(__FILE__))
|
214
|
-
|
215
|
-
Rake::SshDirPublisher.new("kent@rubyforge.org",
|
216
|
-
"/var/www/gforge-projects/ruby-debug", ruby_debug_path)
|
217
|
-
end
|
218
|
-
|
219
126
|
desc "Remove built files"
|
220
127
|
task :clean do
|
221
128
|
cd "ext" do
|
@@ -228,39 +135,4 @@ task :clean do
|
|
228
135
|
end
|
229
136
|
end
|
230
137
|
|
231
|
-
|
232
|
-
desc "Generate rdoc documentation"
|
233
|
-
Rake::RDocTask.new("rdoc") do |rdoc|
|
234
|
-
rdoc.rdoc_dir = 'doc/rdoc'
|
235
|
-
rdoc.title = "ruby-debug"
|
236
|
-
# Show source inline with line numbers
|
237
|
-
rdoc.options << "--inline-source" << "--line-numbers"
|
238
|
-
# Make the readme file the start page for the generated html
|
239
|
-
rdoc.options << '--main' << 'README'
|
240
|
-
rdoc.rdoc_files.include('bin/**/*',
|
241
|
-
'cli/ruby-debug/commands/*.rb',
|
242
|
-
'lib/**/*.rb',
|
243
|
-
'ext/**/ruby_debug.c',
|
244
|
-
'README',
|
245
|
-
'LICENSE')
|
246
|
-
end
|
247
|
-
|
248
|
-
desc "Publish the release files to RubyForge."
|
249
|
-
task :rubyforge_upload do
|
250
|
-
`rubyforge login`
|
251
|
-
release_command = "rubyforge add_release #{PKG_NAME} #{PKG_NAME} '#{PKG_NAME}-#{PKG_VERSION}' pkg/#{PKG_NAME}-#{PKG_VERSION}.gem"
|
252
|
-
puts release_command
|
253
|
-
system(release_command)
|
254
|
-
end
|
255
|
-
|
256
|
-
PKG_NAME = 'ruby-debug'
|
257
|
-
desc "Publish the release files to RubyForge."
|
258
|
-
task :rubyforge_upload do
|
259
|
-
`rubyforge login`
|
260
|
-
for pkg_name in ['ruby-debug', 'ruby-debug-base'] do
|
261
|
-
pkg_file_name = "#{pkg_name}-#{pkg_version}"
|
262
|
-
release_command = "rubyforge add_release ruby-debug #{pkg_name} '#{pkg_file_name}' pkg/#{pkg_file_name}.gem"
|
263
|
-
puts release_command
|
264
|
-
system(release_command)
|
265
|
-
end
|
266
|
-
end
|
138
|
+
task :default => :test
|
data/debugger.gemspec
CHANGED
@@ -18,7 +18,10 @@ handling, bindings for stack frames among other things.
|
|
18
18
|
s.extra_rdoc_files = [ "README.md" ]
|
19
19
|
s.files = `git ls-files`.split("\n")
|
20
20
|
s.extensions << "ext/ruby_debug/extconf.rb"
|
21
|
-
s.
|
22
|
-
s.add_dependency
|
21
|
+
s.executables = ["rdebug"]
|
22
|
+
s.add_dependency "columnize", ">= 0.3.1"
|
23
|
+
s.add_dependency "debugger-ruby_core_source"
|
23
24
|
s.add_dependency "debugger-linecache"
|
25
|
+
s.add_development_dependency 'rake', '~> 0.9.2.2'
|
26
|
+
s.add_development_dependency 'rake-compiler', '~> 0.8.0'
|
24
27
|
end
|
data/ext/ruby_debug/extconf.rb
CHANGED
@@ -16,17 +16,17 @@ if RUBY_VERSION < "1.9"
|
|
16
16
|
exit(1)
|
17
17
|
end
|
18
18
|
|
19
|
-
hdrs =
|
19
|
+
hdrs = lambda {
|
20
20
|
iseqs = %w[vm_core.h iseq.h]
|
21
21
|
begin
|
22
22
|
have_struct_member("rb_method_entry_t", "called_id", "method.h") or
|
23
23
|
have_struct_member("rb_control_frame_t", "method_id", "method.h")
|
24
24
|
end and
|
25
25
|
have_header("vm_core.h") and have_header("iseq.h") and have_header("insns.inc") and
|
26
|
-
have_header("insns_info.inc") and have_header("eval_intern.h") or
|
26
|
+
have_header("insns_info.inc") and have_header("eval_intern.h") or return(false)
|
27
27
|
have_type("struct iseq_line_info_entry", iseqs) or
|
28
28
|
have_type("struct iseq_insn_info_entry", iseqs) or
|
29
|
-
|
29
|
+
return(false)
|
30
30
|
if checking_for(checking_message("if rb_iseq_compile_with_option was added an argument filepath")) do
|
31
31
|
try_compile(<<SRC)
|
32
32
|
#include <ruby.h>
|
@@ -42,8 +42,8 @@ dir_config("ruby")
|
|
42
42
|
if !Ruby_core_source::create_makefile_with_core(hdrs, "ruby_debug")
|
43
43
|
STDERR.print("Makefile creation failed\n")
|
44
44
|
STDERR.print("*************************************************************\n\n")
|
45
|
-
STDERR.print(" NOTE:
|
46
|
-
STDERR.print("
|
45
|
+
STDERR.print(" NOTE: If your headers were not found, try passing\n")
|
46
|
+
STDERR.print(" --with-ruby-include=PATH_TO_HEADERS \n\n")
|
47
47
|
STDERR.print("*************************************************************\n\n")
|
48
48
|
exit(1)
|
49
49
|
end
|
data/lib/debugger/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: debugger
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0.
|
4
|
+
version: 1.0.0.rc2
|
5
5
|
prerelease: 6
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2012-
|
14
|
+
date: 2012-04-04 00:00:00.000000000Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: columnize
|
@@ -30,13 +30,13 @@ dependencies:
|
|
30
30
|
- !ruby/object:Gem::Version
|
31
31
|
version: 0.3.1
|
32
32
|
- !ruby/object:Gem::Dependency
|
33
|
-
name: ruby_core_source
|
33
|
+
name: debugger-ruby_core_source
|
34
34
|
requirement: !ruby/object:Gem::Requirement
|
35
35
|
none: false
|
36
36
|
requirements:
|
37
37
|
- - ! '>='
|
38
38
|
- !ruby/object:Gem::Version
|
39
|
-
version: 0
|
39
|
+
version: '0'
|
40
40
|
type: :runtime
|
41
41
|
prerelease: false
|
42
42
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -44,7 +44,7 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - ! '>='
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 0
|
47
|
+
version: '0'
|
48
48
|
- !ruby/object:Gem::Dependency
|
49
49
|
name: debugger-linecache
|
50
50
|
requirement: !ruby/object:Gem::Requirement
|
@@ -61,6 +61,38 @@ dependencies:
|
|
61
61
|
- - ! '>='
|
62
62
|
- !ruby/object:Gem::Version
|
63
63
|
version: '0'
|
64
|
+
- !ruby/object:Gem::Dependency
|
65
|
+
name: rake
|
66
|
+
requirement: !ruby/object:Gem::Requirement
|
67
|
+
none: false
|
68
|
+
requirements:
|
69
|
+
- - ~>
|
70
|
+
- !ruby/object:Gem::Version
|
71
|
+
version: 0.9.2.2
|
72
|
+
type: :development
|
73
|
+
prerelease: false
|
74
|
+
version_requirements: !ruby/object:Gem::Requirement
|
75
|
+
none: false
|
76
|
+
requirements:
|
77
|
+
- - ~>
|
78
|
+
- !ruby/object:Gem::Version
|
79
|
+
version: 0.9.2.2
|
80
|
+
- !ruby/object:Gem::Dependency
|
81
|
+
name: rake-compiler
|
82
|
+
requirement: !ruby/object:Gem::Requirement
|
83
|
+
none: false
|
84
|
+
requirements:
|
85
|
+
- - ~>
|
86
|
+
- !ruby/object:Gem::Version
|
87
|
+
version: 0.8.0
|
88
|
+
type: :development
|
89
|
+
prerelease: false
|
90
|
+
version_requirements: !ruby/object:Gem::Requirement
|
91
|
+
none: false
|
92
|
+
requirements:
|
93
|
+
- - ~>
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
version: 0.8.0
|
64
96
|
description: ! 'debugger is a fast implementation of the standard Ruby debugger debug.rb.
|
65
97
|
|
66
98
|
It is implemented by utilizing a new Ruby C API hook. The core component
|
@@ -71,18 +103,20 @@ description: ! 'debugger is a fast implementation of the standard Ruby debugger
|
|
71
103
|
|
72
104
|
'
|
73
105
|
email: gabriel.horner@gmail.com
|
74
|
-
executables:
|
106
|
+
executables:
|
107
|
+
- rdebug
|
75
108
|
extensions:
|
76
109
|
- ext/ruby_debug/extconf.rb
|
77
110
|
extra_rdoc_files:
|
78
111
|
- README.md
|
79
112
|
files:
|
113
|
+
- .travis.yml
|
80
114
|
- AUTHORS
|
81
|
-
-
|
82
|
-
- ChangeLog
|
83
|
-
- INSTALL.SVN
|
115
|
+
- CHANGELOG.md
|
84
116
|
- LICENSE
|
85
117
|
- Makefile.am
|
118
|
+
- OLDER_CHANGELOG
|
119
|
+
- OLD_CHANGELOG
|
86
120
|
- OLD_README
|
87
121
|
- README.md
|
88
122
|
- Rakefile
|
data/INSTALL.SVN
DELETED
@@ -1,154 +0,0 @@
|
|
1
|
-
Building and Installing ruby-debug from rubyforge's Subversion Repository (svn)
|
2
|
-
|
3
|
-
The below are Unix-centric instructions. If you have Microsoft Windows see
|
4
|
-
the section on building Microsoft Windows.
|
5
|
-
|
6
|
-
|
7
|
-
0. Prerequisites: To build the package you'll need at a minimum:
|
8
|
-
|
9
|
-
- Ruby (of course). Currently only version 1.8.6 and above but not
|
10
|
-
version 1.9.x work.
|
11
|
-
- Ruby development headers. This typically includes a file called "ruby.h"
|
12
|
-
- A C compiler like GNU C (gcc)
|
13
|
-
- Rake
|
14
|
-
- Subversion (svn)
|
15
|
-
|
16
|
-
If you want to build the documentation and install Emacs files, you'll
|
17
|
-
also need:
|
18
|
-
|
19
|
-
- a POSIX shell
|
20
|
-
- autoconf
|
21
|
-
- automake
|
22
|
-
- GNU Make
|
23
|
-
- texinfo
|
24
|
-
|
25
|
-
1. Basic package checkout and installation
|
26
|
-
|
27
|
-
Check out the trunk of repository following the instructions at
|
28
|
-
http://rubyforge.org/scm/?group_id=1900 For example on a Unixy system,
|
29
|
-
this may work:
|
30
|
-
|
31
|
-
mkdir ruby-debug
|
32
|
-
cd ruby-debug
|
33
|
-
svn checkout svn://rubyforge.org/var/svn/ruby-debug/trunk trunk
|
34
|
-
|
35
|
-
In order to make the Ruby gems, ruby-debug and ruby-debug-base, get
|
36
|
-
yourself into the trunk directory after the code has been checked out and run:
|
37
|
-
|
38
|
-
cd trunk # This is the same trunk checked out above.
|
39
|
-
rake package
|
40
|
-
|
41
|
-
If all goes well you should have some gem files put in the directory
|
42
|
-
pkg. Use the gem command to install that.
|
43
|
-
|
44
|
-
sudo gem install ruby-debug-*.gem # See gem help for other possibilities
|
45
|
-
|
46
|
-
If all goes well the rdebug script has been installed ruby-debug is
|
47
|
-
now ready to run. But if everything goes well you might want to run
|
48
|
-
the built-in regression tests to make sure everything is okay.
|
49
|
-
See step 3 below.
|
50
|
-
|
51
|
-
If the gem install didn't work,'t there may be a problem with your C
|
52
|
-
compiler or the Ruby headers are not installed.
|
53
|
-
|
54
|
-
2. Trying out without installing.
|
55
|
-
|
56
|
-
You don't have to build a gem file to try out ruby debug. In fact when
|
57
|
-
developing new features for ruby-debug, developers often you want to
|
58
|
-
try it out *before* installing. If you have a problem in the latter
|
59
|
-
part of step 1 you may want to try this approach since we go into a
|
60
|
-
little more detail as to what happens under the covers when you do the
|
61
|
-
gem install.
|
62
|
-
|
63
|
-
Run (from trunk)
|
64
|
-
rake lib
|
65
|
-
|
66
|
-
This creates a Makefile and builds the ruby-debug shared library. (On
|
67
|
-
Unix the name is ruby_debug.so).
|
68
|
-
|
69
|
-
Once this is done you can run the debugger as you would rdebug using the
|
70
|
-
script rdbg.rb. For example (again from trunk)
|
71
|
-
|
72
|
-
./rdbg.rb ~/my-ruby-program.rb
|
73
|
-
|
74
|
-
3. Running the Regression tests
|
75
|
-
|
76
|
-
We've put together some basic tests to make sure ruby-debug is doing
|
77
|
-
what we think it should do. To run these (from trunk):
|
78
|
-
|
79
|
-
rake test
|
80
|
-
|
81
|
-
If you didn't build the ruby-debug shared library and skipped step 2,
|
82
|
-
don't worry "rake test" will do step 2 for you. You should see a line that
|
83
|
-
ends something like:
|
84
|
-
|
85
|
-
Finished in 2.767579 seconds.
|
86
|
-
|
87
|
-
12 tests, 35 assertions, 0 failures, 0 errors
|
88
|
-
|
89
|
-
The number of seconds, tests, and assertions may be different from the
|
90
|
-
above. However you *should* see exactly "0 failures, 0 errors".
|
91
|
-
|
92
|
-
4. Building the documentation and testing/installing Emacs files
|
93
|
-
|
94
|
-
Of course, I recommend you read the ruby-debug manual that comes with
|
95
|
-
the package. If you have the prerequisites described above, run this
|
96
|
-
once:
|
97
|
-
sh ./autogen.sh
|
98
|
-
|
99
|
-
Then run:
|
100
|
-
./configure
|
101
|
-
make
|
102
|
-
make test # Runs Emacs regression tests
|
103
|
-
sudo make install # Or arrange to do this as root
|
104
|
-
|
105
|
-
|
106
|
-
Microsoft Windows
|
107
|
-
|
108
|
-
A problem here seems to be that the "One-click" install is compiled
|
109
|
-
using Microsoft Visual Studio C 6 which is not sold anymore and is
|
110
|
-
rather old.
|
111
|
-
|
112
|
-
Instead I suggest building via mingw/msys.
|
113
|
-
http://eigenclass.org/hiki.rb?cmd=view&p=cross+compiling+rcovrt&key=mingw has instructions on how to do. Some amendments to these instructions.
|
114
|
-
|
115
|
-
First, those instructions are a little GNU/Linux centric. If you are
|
116
|
-
using Ubuntu or Debian, then this should be the easiest to follow the
|
117
|
-
instructions. On Ubuntu or Debian there is a mingw3 Debian
|
118
|
-
package. Installing that will give you the cross compiler that is a
|
119
|
-
prerequisite. Alternatively if you are running MS Windows I notice
|
120
|
-
that cygwin also has a mingw package. Or possibly you could use MinGW
|
121
|
-
directly. For other OS's you might have to build a cross-compiler,
|
122
|
-
i.e. gcc which emits win32 code and can create a win32 DLL.
|
123
|
-
|
124
|
-
After you have a cross compiler you need to download the Ruby source
|
125
|
-
and basically build a ruby interpreter. The cross-compile.sh script
|
126
|
-
works although when I downloaded it, it had lots of blank space at the
|
127
|
-
beginning which will mess up the Unix magic interpretation. That is
|
128
|
-
remove the blanks in front of "#/bin/sh"
|
129
|
-
|
130
|
-
On my system, this script fails in running "make ruby" because the
|
131
|
-
fake.rb that got created needed to have a small change:
|
132
|
-
|
133
|
-
ALT_SEPARATOR = "\"; \
|
134
|
-
should be
|
135
|
-
ALT_SEPARATOR = "\\"; \
|
136
|
-
|
137
|
-
After fixing this, run
|
138
|
-
make ruby
|
139
|
-
Also, I needed to run
|
140
|
-
make rubyw
|
141
|
-
|
142
|
-
And then "make install" as indicated.
|
143
|
-
|
144
|
-
Once all of that's in place, the place you want be is in
|
145
|
-
ruby-debug/trunk/ext/win32, not ruby-debug/ext.
|
146
|
-
|
147
|
-
So let's say you've installed the cross-compiled install ruby in
|
148
|
-
/usr/local/ruby-mingw32/. Here then are the commands to build ruby-debug-base-xxx-mswin32.gem
|
149
|
-
|
150
|
-
cd .../ruby-debug/trunk/ext/win32
|
151
|
-
ruby -I /usr/local/ruby-mingw32/lib/ruby/1.8/i386-mingw32 ../extconf.rb
|
152
|
-
make # Not rake
|
153
|
-
cd ../.. # back in ruby-debug/trunk
|
154
|
-
rake win32_gem
|