ruby-debug-base 0.10.0-mswin32 → 0.10.4-mswin32

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGES CHANGED
@@ -1,4 +1,131 @@
1
+ 0.10.4
2
+ 10/27/10
3
+
4
+ - Various bug fixes:
5
+ * reload command.
6
+ * plain 'info' command
7
+ * improve list and list - (backwards) handling when hitting end of file
8
+ - Add ability to specify port to debug on
9
+ - Allow breakpoints at class methods
10
+ - "quit!" is same as "quit unconditionally"
11
+ - irb improvements: Access to non-executing rdebug commands inside irb via
12
+ "dbgr" method
13
+ - Go over documentation including that created by rdoc.
14
+ - For emacs package: add README, INSTALL, AUTHORS.
15
+
16
+ 0.10.3
17
+ 11/17/08
18
+
19
+ - a backtrace now warns when it thinks the callstack is truncated which it
20
+ gets by comparing with caller()
21
+ - fix setting $0.
22
+ - fix bug in showing variables in post-mortem
23
+ - Document how Debugger.start with a block is intended to be used.
24
+ - Move Kernel#debugger from ruby-debug-base into ruby-debug
25
+ - Get regression tests working again
26
+ - Warn and add a "confirmation" when setting a breakpoint on a
27
+ file that is not loaded.
28
+
29
+ 0.10.2
30
+ - debugger(steps=0) breaks inside of debugger rather than wait for a line event.
31
+ - trace var varname (stop|nostop) added which issues trace_var.
32
+ - start method is now properly defined in Debugger module
33
+ - fixed 'finish' command
34
+ - rdebug script now works with Ruby 1.8.7
35
+
36
+ 0.10.1
37
+ 4/10/08 - in honor of the 30th Birthday of Kate Schwarz
38
+
39
+ - bin/rdebug
40
+
41
+ * "rdebug --post-mortem" now really catches uncaught exceptions and
42
+ brings you to post-mortem handling. "info program" shows the exception.
43
+
44
+ * rdebug now searches using ENV['PATH'] for a Ruby program to debug
45
+ if the program name is not found and doesn't have any path
46
+ characters in it.
47
+
48
+ * Use ~/.rdboptrc (rdbopt.ini on MS Windows) to change default options.
49
+
50
+ * --emacs is now --emacs-basic while --emacs 3 now implies emacs-basic
51
+ ---annotate=3 --post-mortem --no-control --no-start --no-quit
52
+
53
+ - rdebug (CLI)
54
+
55
+ * "info" command additions and changes:
56
+ o fix bug in "info variables" when string had embedded %s'
57
+ o "info program" now shows uncaught exception information
58
+ o "info files" show what Ruby files are loaded
59
+ o "info file <f>" specific file information of <f> (e.g. time, # of lines, SHA1)
60
+ o "info catch" - Exceptions that can be caught in the current stack frame.
61
+ o "info "variables" shows "self" and class variables
62
+ o "info threads verbose" shows stack trace of all threads
63
+ o "info thread <t> verbose" shows stack trace of thread <t>.
64
+
65
+ * "frame" command now accepts an optional thread number argument
66
+
67
+ * Long information added to commands with subcommands: show, set,
68
+ info, enable, and disable. For example "help info <xxx>" will give
69
+ more detailed information about the "info <xxx>" command.
70
+
71
+ * columnize now pulled in from a separate package.
72
+
73
+ * add "var cl[ass]" command. Note "var const" can no longer be
74
+ abbreviated "var c"; use "var co" (or const or constant).
75
+
76
+ * add "condition" command. Allow removal of condition.
77
+
78
+ * $0 == __FILE__ when running rdebug should work -- most of the
79
+ time. See comments in code for a better solution.
80
+
81
+ * rdebug command history can be displayed with "show commands". Fix a bug
82
+ in history saving.
83
+
84
+ * INCOMPATIBLE CHANGE: "finish" works like gdb - stop just before the most
85
+ recent method finishes. Will now accept a number which stops that many
86
+ frames completed. (Note that return line numbers will be funny, the
87
+ first line of the method until Ruby 1.8.7.)
88
+
89
+ * fix bug in 'list' command when wrapping off the end.
90
+
91
+ - Emacs interaction drastically reworked, expanded, and improved.
92
+
93
+ - rdebug base
94
+ * allow catching multiple exceptions.
95
+ INCOMPATIBLE CHANGE: variable "Debugger.catchpoint", a String, was turned
96
+ into "Debugger.catchpoints", a Hash. Method "Debugger.catchpoint=" no
97
+ longer exists. Debugger.set_catchpoint was turned into
98
+ Debugger.add_catchpoint
99
+
100
+ * Add Debugger.last_exception which is set in post-mortem.
101
+
102
+ * remove Debugger.stop() when an exception is raised that would terminate the
103
+ debugged program. This may allow catchpoints to work and allow tracing user
104
+ code which handles "Exit" exceptions
105
+
106
+ * split off breakpoint code in ruby_debug.c.
107
+
108
+ * preface ruby_debug global Ruby variables with rdebug_.
109
+
110
+ * Change Debugger.start() to accept an optional options argument
111
+ :init => true saves things (like $0 and ARGV) necessary to
112
+ allow restart. Default: true
113
+ :post_mortem => true runs post-mortem on an uncaught exception
114
+ Default: false
115
+
116
+ The old Debugger.start() is now renamed to Debugger.start_()
117
+
118
+ * split of line caching to an external gem. We now only allow setting
119
+ breakpoints on lines where it makes sense to do so.
120
+
121
+ * Incompatible enhancement: even return/end will now call event handler
122
+
123
+ See ChangeLog for full details, and the reference guide for more complete
124
+ documentation of these changes.
125
+
1
126
  0.10.0
127
+ 12/25/07
128
+
2
129
  - '-r' option can be used to require additional libraries.
3
130
  - --noquit option added to stay in debugger when the program exits
4
131
  - gdb-like --annotate option added. Can be used by front-ends to get information
@@ -27,7 +154,7 @@
27
154
  - INCOMPATIBLE CHANGE: "script" command removed. Use "source" command instead
28
155
  (same as gdb).
29
156
  - Run .rdebugrc on Debugger.start. Look for a file in the current directory and
30
- run that instead the one in $HOME if that exists. Again, inspired and compatible
157
+ run that instead of the one in $HOME if that exists. Again, inspired by and compatible
31
158
  with gdb.
32
159
  - Changes compatible with Ruby 1.9. NOTE: this debugger will NOT work with
33
160
  Ruby 1.9
@@ -35,7 +162,7 @@
35
162
  is also cleared when leaving irb
36
163
  - help "foo" gives message "Undefined command "foo" rather than a list
37
164
  of help commands. (Message test is gdb's)
38
- - Add set linetrace+ - similar step+ for linetrace
165
+ - Add set linetrace+ - similar to step+ for linetrace
39
166
  - Start unit tests.
40
167
  - Start a reference guide.
41
168
 
data/README CHANGED
@@ -3,7 +3,8 @@
3
3
  == Overview
4
4
 
5
5
  ruby-debug is a fast implementation of the standard debugger debug.rb.
6
- The faster execution speed is achieved by utilizing a new hook Ruby C API.
6
+ The faster execution speed is achieved by utilizing a new hook in the
7
+ Ruby C API.
7
8
 
8
9
  == Requirements
9
10
 
@@ -14,6 +15,12 @@ are sometimes available), you'll need a C compiler and Ruby
14
15
  development headers, and a Make program so the extension in
15
16
  ruby-debug-base can be compiled when it is installed.
16
17
 
18
+ To install on Microsoft Windows, unless you run under cygwin or mingw
19
+ you'll need Microsoft Visual C++ 6.0 also known as VC6.
20
+ http://rubyforge.org/tracker/index.php?func=detail&aid=16774&group_id=1900&atid=7436
21
+ suggests why.
22
+
23
+
17
24
  == Install
18
25
 
19
26
  ruby-debug is provided as a RubyGem. To install:
@@ -22,15 +29,37 @@ ruby-debug is provided as a RubyGem. To install:
22
29
 
23
30
  This should also pull in <tt>ruby-debug-base</tt> as a dependency.
24
31
 
32
+ (If you install ruby-debug-base explicitly, you can add in the <tt>--test</tt>
33
+ option after "install" to have the regression test run before
34
+ installing.)
35
+
25
36
  For Emacs support and the Reference Manual, get
26
37
  <tt>ruby-debug-extra</tt>. This is not a RubyGem, you'll need a Make
27
38
  program and a POSIX shell. With this installed, run:
28
39
 
29
- <pre>
30
40
  sh ./configure
31
41
  make
32
- make install
33
- </pre>
42
+ make test # optional, but a good idea
43
+ sudo make install
44
+
45
+
46
+ ==== Install on MS Windows
47
+
48
+ Compiling under cygwin or mingw works like it does on Unix.
49
+
50
+ * Have Microsoft Visual C++ 6.0 (VC6) installed - exactly that version.
51
+
52
+ * Set the appropriate environment variables.
53
+
54
+ * run `nmake'.
55
+
56
+ * Copy ruby_debug.so to `win32'.
57
+
58
+ * Go to the ruby_debug root.
59
+
60
+ * rake win32_gem
61
+
62
+ * The file is in named `rdebug-debug-base-0.10.0-mswin32.gem'.
34
63
 
35
64
  == Usage
36
65
 
@@ -57,13 +86,21 @@ code execution at run time.
57
86
  ...
58
87
  end
59
88
 
89
+ or
90
+
91
+ require 'ruby-debug' ;
92
+ Debugger.start do
93
+ ...
94
+ debugger
95
+ end
96
+
60
97
  When Kernel#debugger method is executed, the debugger is activated
61
98
  and you will be able to inspect and step through your code.
62
99
 
63
100
  == Performance
64
101
 
65
- The debug.rb script that comes with the standard Ruby library uses
66
- Kernel#set_trace_func API. Implementing the debugger in pure Ruby has
102
+ The <tt>debug.rb</tt> script that comes with the standard Ruby library uses
103
+ <tt>Kernel#set_trace_func</tt> API. Implementing the debugger in pure Ruby has
67
104
  a negative impact on the speed of your program execution. This is
68
105
  because the Ruby interpreter creates a Binding object each trace call,
69
106
  even though it is not being used most of the time. ruby-debug moves
data/Rakefile CHANGED
@@ -6,50 +6,93 @@ require 'rake/rdoctask'
6
6
  require 'rake/testtask'
7
7
 
8
8
  SO_NAME = "ruby_debug.so"
9
+ ROOT_DIR = File.dirname(__FILE__)
10
+ VERSION_FILE = ROOT_DIR + '/VERSION'
9
11
 
10
- # ------- Default Package ----------
11
- RUBY_DEBUG_VERSION = open("ext/ruby_debug.c"){|f| f.grep(/^#define DEBUG_VERSION/).first[/"(.+)"/,1]}
12
+ def make_version_file
13
+ ruby_debug_version = open("ext/ruby_debug.c").
14
+ grep(/^#define DEBUG_VERSION/).first[/"(.+)"/,1]
15
+ File.open(VERSION_FILE, 'w') do |f|
16
+ f.write(
17
+ "# This file was created automatically from data in ext/ruby_debug.c via:
18
+ # rake :make_version_file.
19
+ #{ruby_debug_version}
20
+ ")
21
+ end
22
+ end
12
23
 
24
+ make_version_file unless File.exist?(VERSION_FILE)
25
+ ruby_debug_version = nil
26
+ open(VERSION_FILE).each do |line|
27
+ next if line =~ /^#/
28
+ ruby_debug_version = line.chomp
29
+ break
30
+ end
31
+
32
+
33
+ # ------- Default Package ----------
13
34
  COMMON_FILES = FileList[
14
35
  'AUTHORS',
15
36
  'CHANGES',
16
37
  'LICENSE',
17
38
  'README',
39
+ 'VERSION',
18
40
  'Rakefile',
19
41
  ]
20
42
 
21
- CLI_TEST_FILE_LIST = 'test/**/*test-*.rb'
43
+ CLI_TEST_FILE_LIST = FileList['test/cli/commands/unit/*.rb',
44
+ 'test/cli/commands/*_test.rb',
45
+ 'test/cli/**/*_test.rb',
46
+ 'test/test-*.rb']
22
47
  CLI_FILES = COMMON_FILES + FileList[
23
48
  "cli/**/*",
24
49
  'ChangeLog',
25
50
  'bin/*',
26
51
  'doc/rdebug.1',
27
- 'test/**/*.cmd',
28
- 'test/**/*.right',
29
- 'test/**/gcd.rb',
30
- 'test/**/helper.rb',
31
- 'test/**/info-var-bug.rb',
32
- 'test/**/tdebug.rb',
33
- 'test/**/test-*.cmd',
52
+ 'test/rdebug-save.1',
53
+ 'test/**/data/*.cmd',
54
+ 'test/**/data/*.right',
55
+ 'test/config.yaml',
56
+ 'test/**/*.rb',
57
+ 'rdbg.rb',
34
58
  'runner.sh',
35
- CLI_TEST_FILE_LIST,
59
+ CLI_TEST_FILE_LIST
36
60
  ]
37
61
 
38
- BASE_TEST_FILE_LIST = 'test/test-ruby-debug-base.rb'
62
+ BASE_TEST_FILE_LIST = %w(
63
+ test/base/base.rb
64
+ test/base/binding.rb
65
+ test/base/catchpoint.rb
66
+ test/base/reload_bug.rb
67
+ )
68
+
39
69
  BASE_FILES = COMMON_FILES + FileList[
40
- 'lib/**/*',
41
- 'ext/ChangeLog',
42
- 'ext/ruby_debug.c',
70
+ 'ext/breakpoint.c',
43
71
  'ext/extconf.rb',
72
+ 'ext/ruby_debug.c',
73
+ 'ext/ruby_debug.h',
44
74
  'ext/win32/*',
75
+ 'lib/**/*',
45
76
  BASE_TEST_FILE_LIST,
46
77
  ]
47
78
 
48
79
  desc "Test everything."
49
- test_task = task :test => :lib do
80
+ ext = File.join(ROOT_DIR, 'ext')
81
+ test_and_args = File.exist?(ext) ? {:test => :test_base} : [:test]
82
+ task test_and_args do
50
83
  Rake::TestTask.new(:test) do |t|
51
- t.libs << ['./ext', './lib', './cli']
52
- t.pattern = CLI_TEST_FILE_LIST
84
+ t.libs += %W(#{ROOT_DIR}/lib #{ROOT_DIR}/cli)
85
+ t.libs << ext if File.exist?(ext)
86
+ t.test_files = CLI_TEST_FILE_LIST
87
+ t.verbose = true
88
+ end
89
+ end
90
+
91
+ desc "Test ruby-debug-base."
92
+ task :test_base => :lib do
93
+ Rake::TestTask.new(:test_base) do |t|
94
+ t.libs += ['./ext', './lib']
95
+ t.test_files = FileList[BASE_TEST_FILE_LIST]
53
96
  t.verbose = true
54
97
  end
55
98
  end
@@ -74,9 +117,9 @@ end
74
117
 
75
118
  desc "Create a GNU-style ChangeLog via svn2cl"
76
119
  task :ChangeLog do
77
- system("svn2cl --authors=svn2cl_usermap svn://rubyforge.org/var/svn/ruby-debug/trunk")
78
- system("svn2cl --authors=svn2cl_usermap svn://rubyforge.org/var/svn/ruby-debug/trunk/ext -o ext/ChangeLog")
79
- system("svn2cl --authors=svn2cl_usermap svn://rubyforge.org/var/svn/ruby-debug/trunk/lib -o lib/ChangeLog")
120
+ system('svn2cl --authors=svn2cl_usermap http://ruby-debug.rubyforge.org/svn/trunk')
121
+ system("svn2cl --authors=svn2cl_usermap http://ruby-debug.rubyforge.org/svn/trunk/ext -o ext/ChangeLog")
122
+ system("svn2cl --authors=svn2cl_usermap http://ruby-debug.rubyforge.org/svn/trunk/lib -o lib/ChangeLog")
80
123
  end
81
124
 
82
125
  # Base GEM Specification
@@ -92,19 +135,19 @@ provides support that front-ends can build on. It provides breakpoint
92
135
  handling, bindings for stack frames among other things.
93
136
  EOF
94
137
 
95
- spec.version = RUBY_DEBUG_VERSION
138
+ spec.version = ruby_debug_version
96
139
 
97
140
  spec.author = "Kent Sibilev"
98
141
  spec.email = "ksibilev@yahoo.com"
99
142
  spec.platform = Gem::Platform::RUBY
100
143
  spec.require_path = "lib"
101
144
  spec.extensions = ["ext/extconf.rb"]
102
- spec.autorequire = "ruby-debug-base"
103
145
  spec.files = BASE_FILES.to_a
104
146
 
105
147
  spec.required_ruby_version = '>= 1.8.2'
106
148
  spec.date = Time.now
107
149
  spec.rubyforge_project = 'ruby-debug'
150
+ spec.add_dependency('linecache', '>= 0.3')
108
151
 
109
152
  spec.test_files = FileList[BASE_TEST_FILE_LIST]
110
153
 
@@ -122,7 +165,7 @@ cli_spec = Gem::Specification.new do |spec|
122
165
  A generic command line interface for ruby-debug.
123
166
  EOF
124
167
 
125
- spec.version = RUBY_DEBUG_VERSION
168
+ spec.version = ruby_debug_version
126
169
 
127
170
  spec.author = "Kent Sibilev"
128
171
  spec.email = "ksibilev@yahoo.com"
@@ -130,13 +173,13 @@ EOF
130
173
  spec.require_path = "cli"
131
174
  spec.bindir = "bin"
132
175
  spec.executables = ["rdebug"]
133
- spec.autorequire = "ruby-debug"
134
176
  spec.files = CLI_FILES.to_a
135
177
 
136
178
  spec.required_ruby_version = '>= 1.8.2'
137
179
  spec.date = Time.now
138
180
  spec.rubyforge_project = 'ruby-debug'
139
- spec.add_dependency('ruby-debug-base', RUBY_DEBUG_VERSION)
181
+ spec.add_dependency('columnize', '>= 0.1')
182
+ spec.add_dependency('ruby-debug-base', "~> #{ruby_debug_version}.0")
140
183
 
141
184
  # FIXME: work out operational logistics for this
142
185
  # spec.test_files = FileList[CLI_TEST_FILE_LIST]
@@ -159,7 +202,8 @@ task :default => [:package]
159
202
  # Windows specification
160
203
  win_spec = base_spec.clone
161
204
  win_spec.extensions = []
162
- win_spec.platform = Gem::Platform::WIN32
205
+ ## win_spec.platform = Gem::Platform::WIN32 # deprecated
206
+ win_spec.platform = 'mswin32'
163
207
  win_spec.files += ["lib/#{SO_NAME}"]
164
208
 
165
209
  desc "Create Windows Gem"
@@ -170,23 +214,23 @@ task :win32_gem do
170
214
  target = File.join(current_dir, "lib", SO_NAME)
171
215
  cp(source, target)
172
216
 
173
- # Create the gem, then move it to pkg
174
- Gem::Builder.new(win_spec).build
175
- gem_file = "#{win_spec.name}-#{win_spec.version}-#{win_spec.platform}.gem"
217
+ # Create the gem, then move it to pkg.
218
+ Gem::Builder.new(win_spec).build
219
+ gem_file = "#{win_spec.name}-#{win_spec.version}-#{win_spec.platform}.gem"
176
220
  mv(gem_file, "pkg/#{gem_file}")
177
221
 
178
- # Remove win extension fro top level directory
179
- rm(target)
222
+ # Remove win extension from top level directory.
223
+ rm(target)
180
224
  end
181
225
 
182
226
  desc "Publish ruby-debug to RubyForge."
183
227
  task :publish do
184
228
  require 'rake/contrib/sshpublisher'
185
229
 
186
- # Get ruby-debug path
230
+ # Get ruby-debug path.
187
231
  ruby_debug_path = File.expand_path(File.dirname(__FILE__))
188
232
 
189
- publisher = Rake::SshDirPublisher.new("kent@rubyforge.org",
233
+ Rake::SshDirPublisher.new("kent@rubyforge.org",
190
234
  "/var/www/gforge-projects/ruby-debug", ruby_debug_path)
191
235
  end
192
236
 
@@ -205,16 +249,63 @@ end
205
249
  # --------- RDoc Documentation ------
206
250
  desc "Generate rdoc documentation"
207
251
  Rake::RDocTask.new("rdoc") do |rdoc|
208
- rdoc.rdoc_dir = 'doc'
252
+ rdoc.rdoc_dir = 'doc/rdoc'
209
253
  rdoc.title = "ruby-debug"
210
254
  # Show source inline with line numbers
211
255
  rdoc.options << "--inline-source" << "--line-numbers"
212
256
  # Make the readme file the start page for the generated html
213
257
  rdoc.options << '--main' << 'README'
214
258
  rdoc.rdoc_files.include('bin/**/*',
259
+ 'cli/ruby-debug/commands/*.rb',
260
+ 'cli/ruby-debug/*.rb',
215
261
  'lib/**/*.rb',
216
262
  'ext/**/ruby_debug.c',
217
263
  'README',
218
264
  'LICENSE')
219
265
  end
220
266
 
267
+ desc "Publish the release files to RubyForge."
268
+ task :rubyforge_upload do
269
+ `rubyforge login`
270
+ release_command = "rubyforge add_release #{PKG_NAME} #{PKG_NAME} '#{PKG_NAME}-#{PKG_VERSION}' pkg/#{PKG_NAME}-#{PKG_VERSION}.gem"
271
+ puts release_command
272
+ system(release_command)
273
+ end
274
+
275
+ PKG_NAME = 'ruby-debug'
276
+ desc "Publish the release files to RubyForge."
277
+ task :rubyforge_upload do
278
+ `rubyforge login`
279
+ for pkg_name in ['ruby-debug', 'ruby-debug-base'] do
280
+ pkg_file_name = "#{pkg_name}-#{pkg_version}"
281
+ release_command = "rubyforge add_release ruby-debug #{pkg_name} '#{pkg_file_name}' pkg/#{pkg_file_name}.gem"
282
+ puts release_command
283
+ system(release_command)
284
+ end
285
+ end
286
+
287
+ def install(spec, *opts)
288
+ args = ['gem', 'install', "pkg/#{spec.name}-#{spec.version}.gem"] + opts
289
+ args.unshift 'sudo' unless 0 == Process.uid
290
+ system(*args)
291
+ end
292
+
293
+ desc 'Install locally'
294
+ task :install => :package do
295
+ Dir.chdir(File::dirname(__FILE__)) do
296
+ # ri and rdoc take lots of time
297
+ install(base_spec, '--no-ri', '--no-rdoc')
298
+ install(cli_spec, '--no-ri', '--no-rdoc')
299
+ end
300
+ end
301
+
302
+ task :install_full => :package do
303
+ Dir.chdir(File::dirname(__FILE__)) do
304
+ install(base_spec)
305
+ install(cli_spec)
306
+ end
307
+ end
308
+
309
+ task :make_version_file do
310
+ make_version_file
311
+ end