From nobody at rubyforge.org Sun Nov 2 16:59:54 2008 From: nobody at rubyforge.org (nobody at rubyforge.org) Date: Sun, 2 Nov 2008 16:59:54 -0500 (EST) Subject: [Ruby-debug-commits] [870] trunk: Debugger.start with a block now stops inside the block. Message-ID: <20081102215955.0401E16780DA@rubyforge.org> Revision: 870 Author: rockyb Date: 2008-11-02 16:59:54 -0500 (Sun, 02 Nov 2008) Log Message: ----------- Debugger.start with a block now stops inside the block. Debugger.debugger with a block works like Debugger.start with a block. The whole interface is hopelessly kludgy and needs to be redone. Modified Paths: -------------- trunk/ChangeLog trunk/ext/ruby_debug.c trunk/lib/ChangeLog trunk/lib/ruby-debug-base.rb Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2008-10-27 15:29:13 UTC (rev 869) +++ trunk/ChangeLog 2008-11-02 21:59:54 UTC (rev 870) @@ -1,3 +1,8 @@ +2008-10-27 15:29 Rocky Bernstein + + * ChangeLog, test/data/raise.right: tdebug.rb line numbers changed. + Update test numbers -- I think this is right. + 2008-10-26 14:54 Rocky Bernstein * ChangeLog, ext/extconf.rb, ext/ruby_debug.c, lib/ChangeLog: Doc Modified: trunk/ext/ruby_debug.c =================================================================== --- trunk/ext/ruby_debug.c 2008-10-27 15:29:13 UTC (rev 869) +++ trunk/ext/ruby_debug.c 2008-11-02 21:59:54 UTC (rev 870) @@ -1034,8 +1034,29 @@ result = Qtrue; } - if(rb_block_given_p()) - return rb_ensure(rb_yield, self, debug_stop_i, self); + /* Run the given block with debugger tracing. + + I'm not sure it is necessary right now to save and restore + debugger context. However if sometime in the future we want to + run a nested debugger, e.g. we are inside the debugger and want + to debug a code fragment, then this may come in handy. + */ + if(rb_block_given_p()) + { + VALUE thread, context, return_val; + debug_context_t debug_context_save; + debug_context_t *debug_context; + + thread = rb_thread_current(); + thread_context_lookup(thread, &context, NULL); + Data_Get_Struct(context, debug_context_t, debug_context); + memcpy(&debug_context_save, debug_context, sizeof(debug_context_t)); + /* Should we allow this to get passed in as a parameter? */ + debug_context->stop_line = 1; + return_val = rb_ensure(rb_yield, self, debug_stop_i, self); + memcpy(debug_context, &debug_context_save, sizeof(debug_context_t)); + return return_val; + } return result; } @@ -2073,7 +2094,7 @@ /* * call-seq: - * context.tracking = bool + * context.tracing = bool * * Controls the tracing for this context. */ Modified: trunk/lib/ChangeLog =================================================================== --- trunk/lib/ChangeLog 2008-10-27 15:29:13 UTC (rev 869) +++ trunk/lib/ChangeLog 2008-11-02 21:59:54 UTC (rev 870) @@ -1,3 +1,8 @@ +2008-10-26 14:54 Rocky Bernstein + + * ChangeLog: Doc typo. Add comment to remind me how to turn off + optimizationin extconf.rb + 2008-10-25 16:01 Rocky Bernstein * ChangeLog: Warn and add a "confirmation" when setting a Modified: trunk/lib/ruby-debug-base.rb =================================================================== --- trunk/lib/ruby-debug-base.rb 2008-10-27 15:29:13 UTC (rev 869) +++ trunk/lib/ruby-debug-base.rb 2008-11-02 21:59:54 UTC (rev 870) @@ -7,7 +7,9 @@ # Default options to Debugger.start DEFAULT_START_SETTINGS = { :init => true, # Set $0 and save ARGV? - :post_mortem => false # post-mortem debugging on uncaught exception? + :post_mortem => false, # post-mortem debugging on uncaught exception? + :tracing => nil # Debugger.tracing value. true/false resets, + # nil keeps the prior value } unless defined?(DEFAULT_START_SETTINGS) class Context @@ -196,6 +198,7 @@ Debugger.const_set('INITIAL_DIR', Dir.pwd) unless defined? Debugger::INITIAL_DIR end + Debugger.tracing = options[:tracing] unless options[:tracing].nil? retval = Debugger.started? ? nil : Debugger.start_(&block) if options[:post_mortem] post_mortem @@ -213,16 +216,24 @@ # Setting _steps_ to 0 will cause a break in the debugger subroutine # and not wait for a line event to occur. You will have to go "up 1" # in order to be back in your debugged program rather than the - # debugger. Settings _stess_ to 0 could be useful you want to stop + # debugger. Settings _steps_ to 0 could be useful you want to stop # right after the last statement in some scope, because the next # step will take you out of some scope. - def debugger(steps = 1) - Debugger.start unless Debugger.started? - Debugger.run_init_script(StringIO.new) - if 0 == steps - Debugger.current_context.stop_frame = 0 + + # If a block is given (and the debugger hasn't been started, we run the + # block under the debugger. Alas, when a block is given, we can't support + # running the startup script or support the steps option. FIXME. + def debugger(steps = 1, &block) + if block + Debugger.start({}, &block) else - Debugger.current_context.stop_next = steps + Debugger.start unless Debugger.started? + Debugger.run_init_script(StringIO.new) + if 0 == steps + Debugger.current_context.stop_frame = 0 + else + Debugger.current_context.stop_next = steps + end end end alias breakpoint debugger unless respond_to?(:breakpoint) From nobody at rubyforge.org Thu Nov 6 11:17:09 2008 From: nobody at rubyforge.org (nobody at rubyforge.org) Date: Thu, 6 Nov 2008 11:17:09 -0500 (EST) Subject: [Ruby-debug-commits] [871] trunk: #22698 Allow ruby-debug-base 0.x.y. z be compatible with ruby-debug 0.x.y. Message-ID: <20081106161709.EC4B33C802A@rubyforge.org> Revision: 871 Author: rockyb Date: 2008-11-06 11:17:09 -0500 (Thu, 06 Nov 2008) Log Message: ----------- #22698 Allow ruby-debug-base 0.x.y.z be compatible with ruby-debug 0.x.y. Modified Paths: -------------- trunk/ChangeLog trunk/Rakefile trunk/lib/ChangeLog Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2008-11-02 21:59:54 UTC (rev 870) +++ trunk/ChangeLog 2008-11-06 16:17:09 UTC (rev 871) @@ -1,3 +1,12 @@ +2008-11-02 21:59 Rocky Bernstein + + * ChangeLog, ext/ruby_debug.c, lib/ChangeLog, + lib/ruby-debug-base.rb: Debugger.start with a block now stops + inside the block. Debugger.debugger with a block works like + Debugger.start with a block. + + The whole interface is hopelessly kludgy and needs to be redone. + 2008-10-27 15:29 Rocky Bernstein * ChangeLog, test/data/raise.right: tdebug.rb line numbers changed. Modified: trunk/Rakefile =================================================================== --- trunk/Rakefile 2008-11-02 21:59:54 UTC (rev 870) +++ trunk/Rakefile 2008-11-06 16:17:09 UTC (rev 871) @@ -147,7 +147,7 @@ spec.date = Time.now spec.rubyforge_project = 'ruby-debug' spec.add_dependency('columnize', '>= 0.1') - spec.add_dependency('ruby-debug-base', RUBY_DEBUG_VERSION) + spec.add_dependency('ruby-debug-base', "~> #{RUBY_DEBUG_VERSION}.0") # FIXME: work out operational logistics for this # spec.test_files = FileList[CLI_TEST_FILE_LIST] Modified: trunk/lib/ChangeLog =================================================================== --- trunk/lib/ChangeLog 2008-11-02 21:59:54 UTC (rev 870) +++ trunk/lib/ChangeLog 2008-11-06 16:17:09 UTC (rev 871) @@ -1,3 +1,11 @@ +2008-11-02 21:59 Rocky Bernstein + + * ChangeLog, ruby-debug-base.rb: Debugger.start with a block now + stops inside the block. Debugger.debugger with a block works like + Debugger.start with a block. + + The whole interface is hopelessly kludgy and needs to be redone. + 2008-10-26 14:54 Rocky Bernstein * ChangeLog: Doc typo. Add comment to remind me how to turn off From nobody at rubyforge.org Fri Nov 7 05:40:00 2008 From: nobody at rubyforge.org (nobody at rubyforge.org) Date: Fri, 7 Nov 2008 05:40:00 -0500 (EST) Subject: [Ruby-debug-commits] [872] trunk: Add check to "where" to see if the call stack is truncated; task #2354 Message-ID: <20081107104000.D2DF618581B8@rubyforge.org> Revision: 872 Author: rockyb Date: 2008-11-07 05:39:59 -0500 (Fri, 07 Nov 2008) Log Message: ----------- Add check to "where" to see if the call stack is truncated; task #2354 Modified Paths: -------------- trunk/ChangeLog trunk/bin/rdebug trunk/cli/ruby-debug/commands/frame.rb trunk/cli/ruby-debug.rb trunk/lib/ChangeLog trunk/test/tdebug.rb Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2008-11-06 16:17:09 UTC (rev 871) +++ trunk/ChangeLog 2008-11-07 10:39:59 UTC (rev 872) @@ -1,3 +1,8 @@ +2008-11-06 16:17 Rocky Bernstein + + * ChangeLog, Rakefile, lib/ChangeLog: #22698 Allow ruby-debug-base + 0.x.y.z be compatible with ruby-debug 0.x.y. + 2008-11-02 21:59 Rocky Bernstein * ChangeLog, ext/ruby_debug.c, lib/ChangeLog, Modified: trunk/bin/rdebug =================================================================== --- trunk/bin/rdebug 2008-11-06 16:17:09 UTC (rev 871) +++ trunk/bin/rdebug 2008-11-07 10:39:59 UTC (rev 872) @@ -44,6 +44,11 @@ $0[0..-1] = d0 end end + + # Record where we are we can know if the call stack has been + # truncated or not. + Debugger.start_sentinal=caller(0)[1] + bt = Debugger.debug_load(Debugger::PROG_SCRIPT, options.stop, false) if bt if options.post_mortem Modified: trunk/cli/ruby-debug/commands/frame.rb =================================================================== --- trunk/cli/ruby-debug/commands/frame.rb 2008-11-06 16:17:09 UTC (rev 871) +++ trunk/cli/ruby-debug/commands/frame.rb 2008-11-07 10:39:59 UTC (rev 872) @@ -107,6 +107,45 @@ print fmt % [CommandProcessor.canonic_file(file), line] end end + + # Check if call stack is truncated. This can happen if + # Debugger.start is not called low enough in the call stack. An + # array of additional callstack lines from caller is returned if + # definitely truncated, false if not, and nil if we don't know. + # + # We determine truncation based on a passed in sentinal set via + # caller which can be nil. + # + # First we see if we can find our position in caller. If so, then + # we compare context position to that in caller using sentinal + # as a place to start ignoring additional caller entries. sentinal + # is set by rdebug, but if it's not set, i.e. nil then additional + # entries are presumably ones that we haven't recorded in context + def truncated_callstack?(context, sentinal=nil, cs=caller) + recorded_size = context.stack_size + to_find_fl = "#{context.frame_file(0)}:#{context.frame_line(0)}" + top_discard = false + cs.each_with_index do |fl, i| + fl.gsub!(/in `.*'$/, '') + fl.gsub!(/:$/, '') + if fl == to_find_fl + top_discard = i + break + end + end + if top_discard + cs = cs[top_discard+recorded_size..-1] + return false unless cs + return cs unless sentinal + if cs.size > 2 && cs[2] != sentinal + return cs + end + return false + end + return nil + end + + end # Implements debugger "where" or "backtrace" command. @@ -123,7 +162,11 @@ print " " end print_frame(idx) + end + if truncated_callstack?(@state.context, Debugger.start_sentinal) + print "Warning: saved call stack may be incomplete.\n" + end end class << self Modified: trunk/cli/ruby-debug.rb =================================================================== --- trunk/cli/ruby-debug.rb 2008-11-06 16:17:09 UTC (rev 871) +++ trunk/cli/ruby-debug.rb 2008-11-07 10:39:59 UTC (rev 872) @@ -25,9 +25,15 @@ end class << self + # gdb-style annotation mode. Used in GNU Emacs interface + attr_accessor :annotate + # in remote mode, wait for the remote connection attr_accessor :wait_connection - attr_accessor :annotate + + # If set, a string to look for in caller() and is used to see + # if the call stack is truncated. + attr_accessor :start_sentinal attr_reader :thread, :control_thread Modified: trunk/lib/ChangeLog =================================================================== --- trunk/lib/ChangeLog 2008-11-06 16:17:09 UTC (rev 871) +++ trunk/lib/ChangeLog 2008-11-07 10:39:59 UTC (rev 872) @@ -1,1002 +0,0 @@ -2008-11-02 21:59 Rocky Bernstein - - * ChangeLog, ruby-debug-base.rb: Debugger.start with a block now - stops inside the block. Debugger.debugger with a block works like - Debugger.start with a block. - - The whole interface is hopelessly kludgy and needs to be redone. - -2008-10-26 14:54 Rocky Bernstein - - * ChangeLog: Doc typo. Add comment to remind me how to turn off - optimizationin extconf.rb - -2008-10-25 16:01 Rocky Bernstein - - * ChangeLog: Warn and add a "confirmation" when setting a - breakpoint on a file that is not loaded. Regression tests no - longer fail. - -2008-09-22 00:07 Rocky Bernstein - - * ruby-debug-base.rb: #22118 bug in showing variables post mortem. - Patch thanks to rubikitch. - Update pm.rb integration test. - -2008-09-03 17:29 Rocky Bernstein - - * ChangeLog: Show line numbers when $DEBUG is set. Patch #21772 - from Martin Krauskopf - -2008-07-07 07:11 Rocky Bernstein - - * ruby-debug-base.rb: Tracker [#20041] start erroneously moved to - Kernel - should be in - Debugger.start - -2008-06-20 06:46 Rocky Bernstein - - * ruby-debug-base.rb: trace.rb: add "trace var" - ruby-debug-base.rb: remove another undefined warning. - -2008-05-24 01:27 Rocky Bernstein - - * ChangeLog: Remove dup lines. - -2008-05-15 16:05 Rocky Bernstein - - * ChangeLog: Handle "catch nnn off" Forgotten there during r656. - From mkrauskopf [#20156]. - -2008-05-05 18:05 Rocky Bernstein - - * ChangeLog: make test-frame installation independent. Bug #19931 - -2008-04-29 13:37 Rocky Bernstein - - * ChangeLog: Test line number in "continue" command for validity. - -2008-04-28 16:16 Rocky Bernstein - - * ChangeLog: From Martin Krauskopf via patch #19779 - - Allow folks to configure Ruby used for CLI tests in the - test/config.yaml. The defaults are for native Ruby, so nothing - needs - to be done for ruby-debug. - - Developers of interfaces other than cli might override - config.yaml by - customized config.private.yaml which is ignored. So there will be - no - trash in e.g. 'svn st' output when developer customize the Ruby - to be - used. - - Handy for alternative interface implementations using - svn:externals. - -2008-04-22 02:49 Rocky Bernstein - - * ruby-debug-base.rb: Experiment with debugger(steps=0). Puts us in - the debugger call, but this may be the best we can do for now. - See tracker - #19639. - -2008-04-16 01:11 Rocky Bernstein - - * ChangeLog: In 0.10.2 now. Some work to cope systems without - readline. More work is needed. - Add test of "set autoeval." Undefined command message more - closely like gdb's. - -2008-04-10 08:49 Rocky Bernstein - - * ChangeLog: linecache is required by ruby-debug-base not - ruby-debug. Thanks Martin! - -2008-04-10 08:00 Rocky Bernstein - - * ChangeLog: Last change before 0.10.1 release. - -2008-04-10 02:03 Rocky Bernstein - - * ChangeLog: Cosmetic stuff: spelling corrections. Update node - structure so texinfo - doesn't complain. - -2008-04-08 14:52 Rocky Bernstein - - * ChangeLog: autorequire is deprecated and presumably no longer - needed - http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/182827 - -2008-04-07 00:36 Rocky Bernstein - - * ChangeLog, ruby-debug-base.rb: ruby-debug-base.rb: document - Debugger.start parameters. - CHANGES: Revise what's happened - test-shortkey.el: A failing regression test because I think - rdebug-shortkey-mode - is not correct. - -2008-04-03 19:01 Rocky Bernstein - - * ChangeLog, ruby-debug-base.rb: Allow setting :post_mortem => true - from Debugger.start. - -2008-03-28 13:53 Rocky Bernstein - - * ChangeLog: Don't unconditionally turn on short-key mode when - annotations are on. Use rdebug-short-key-mode setting to decide. - -2008-03-23 17:47 Rocky Bernstein - - * ChangeLog: set.rb -> settings.rb since it's already one command - per file, and - remove another :nodoc. - Rakefile: split long line - -2008-03-18 16:05 Rocky Bernstein - - * ChangeLog: Fix bug in 'list' command when wrapping off the end. - test-finish.rb: tolerate buggy in Ruby versions <= 1.8.7. - -2008-03-13 02:15 Rocky Bernstein - - * ruby-debug-base.rb: INCOMPATIBLE CHANGE: "finish" works like gdb - - stop just before the - most recent method finishes. Will now accept a number which stops - that - many frames completed. (Note that return line numbers will be - funny, - the first line of the method until Ruby 1.8.7.) - -2008-03-10 13:28 Rocky Bernstein - - * ChangeLog: Dunno why we are now one line number less. So be it - (for now). - -2008-03-09 23:30 Rocky Bernstein - - * ChangeLog: For now we require the duplicate numbers on - conditionals. - -2008-03-02 04:20 Rocky Bernstein - - * ruby-debug-base.rb: Better error message for an invalid break - command. - -2008-02-28 05:06 Rocky Bernstein - - * ChangeLog: breakpoints.{cmd,right}: test for an invalid stopping - line number - rdebug-fns.el: move generic split-string-and-unquote from - rdebug-core. - rdebug-core.el: Add rdebug-common-init to replace - gud-common-init. Is - simpler, and finds files better via debugger output/annotations. - Fix bug in rdebug-setup-windows: gud-find-file can return nil, - and - we still need to set buf. - -2008-02-27 04:04 Rocky Bernstein - - * ruby-debug-base.rb: Slightly more robust handle_post_mortem. - -2008-02-26 17:31 Rocky Bernstein - - * ChangeLog: Go over source location positioning. 0 is now the - oldest (first) position. Add M-S-down and M-S-up for first and - last. More tests needed in test-fns.el and need to prompt on wrap - around. - -2008-02-26 00:57 Rocky Bernstein - - * ChangeLog: Fix bug in "info file xxx breakpoints". - -2008-02-24 16:36 Rocky Bernstein - - * ChangeLog: rdebug; make more Ruby 1.9 compatible. - -2008-02-24 16:14 Rocky Bernstein - - * ChangeLog: Minor changes. - rdbg.rb: don't need $DEBUG test any more - rdebug-regexp.el: go over with checkdoc - bin/rdebug: use PATH_SEPARATOR (for 'doze again) - -2008-02-24 04:51 Rocky Bernstein - - * ChangeLog: CLI: Add long help for "info file". - - test/test-help.rb: Make test failures easier to fix and more like - the - other tests. - - emacs/test: finish testing all of the funcitons in rdebug-fns.el - - rdebug-layouts.el: Make checkdoc clean. - rdebug-track.el: don't need to rename shell buffer. Do it as an - option only. - rdebug-secondary.el: get rid of hoaky buffer finding for at least - gud-comint-buf. (Should probably do others as well) - - DOC: Note weird line stopping locations. Describe what "ctrl" in - prompt means. - -2008-02-21 02:56 Rocky Bernstein - - * ChangeLog: Fringe for frame buffer the same as in source code. - Move - miscellaneous small functions to a new file. Reduce duplication - of - "chomp" code. - -2008-02-19 23:44 Rocky Bernstein - - * ChangeLog: rdebug-cmd.el: M-insert toggles shortkey mode in the - command buffer - rdebug: search for Ruby program if file is not found and no - SEPARATOR - chars in the filename - -2008-02-18 19:56 Rocky Bernstein - - * ChangeLog: Frame switching shouldn't be recorded in position - history ring. - -2008-02-17 13:57 Rocky Bernstein - - * ruby-debug-base.rb: Add Debugger.last_exception. Show exception - in post-mortem when "info program" - is issued. Reorganize list of major changes better. - -2008-02-13 21:47 Rocky Bernstein - - * ChangeLog: processor.rb: spelled "post-mortem" incorrectly in - prompt. - -2008-02-13 17:32 Rocky Bernstein - - * ChangeLog: Set up keys for comint-next-prompt and - comint-previous-prompt. - -2008-02-12 02:06 Rocky Bernstein - - * ChangeLog: Fix bug in "info thread verbose" which wasn't showing - full traceback. - -2008-02-09 15:48 Rocky Bernstein - - * ChangeLog: helper.rb Failed attempt to DRY tests more. But save - what we have - which may someday in the future be used to go further. Minus to - undercore in Data file names in preparation such time. (We'll use - the - filename as the test name). - - testing - -2008-02-06 16:15 Rocky Bernstein - - * ChangeLog: Add 'nowarn to find-file-noselect and test that we - don't get a warning. - -2008-02-05 01:41 Rocky Bernstein - - * ChangeLog: rdebug.el: Add a defgroup for rdebug so customization - in Emacs 23 is possible. - Some other minor doc fixes. - setshow.* make sure we don't have an $Id line that we have to - check against. - -2008-02-03 15:23 Rocky Bernstein - - * ChangeLog: Try to get testing a little more organized, although - more work should - be done: Create a data directory for comparison ("right") and - script - command ("cmd") files. Code is now more uniform (and should DRY'd - a - bit more). - -2008-02-02 23:10 Rocky Bernstein - - * ChangeLog: Remove commands in post-mortem which are not - applicable, e.g."step", - "next", "continue"... - - "No breakpoints have been set" is now an error message when - trying to - set a breakpoint. - - Add post-mortem test. - - Debug.init no longer exists. - -2008-02-02 09:27 Rocky Bernstein - - * ruby-debug-base.rb: Remove Debugger.init and fold options - parameter into Debugger.start. - Old Debugger.start has been renamed Deebugger.start_ - -2008-01-31 16:30 Rocky Bernstein - - * ChangeLog: Leave ruby_debug.c this way for now. - -2008-01-31 16:24 Rocky Bernstein - - * ChangeLog: ruby_debug.c: more adventures in exception handling - processor.rb: Removal of crash when annotate is on. Need to fix - the source of the - problem though. - -2008-01-31 15:16 Rocky Bernstein - - * ruby-debug-base.rb: Handle post-mortem and exception traceback - reporting in ruby-debug - -2008-01-30 17:01 Rocky Bernstein - - * ChangeLog: Add Command.find() to find a subcommand name. - condition.right: correct for breakpoint hit counts. - -2008-01-30 01:43 Rocky Bernstein - - * ChangeLog: Add number of times a breakpoint is hit like gdb does. - -2008-01-29 22:37 Rocky Bernstein - - * ChangeLog: Columnize breakpoint output. - -2008-01-29 11:20 Rocky Bernstein - - * ChangeLog: More annotate=2 fixes. - -2008-01-28 15:59 Rocky Bernstein - - * ChangeLog: Add info file breakpoints to show lines which we can - set a breakpoint on. - Revise so we chdir into SRC_DIR. - test-hist.rb is broken - will fix later. - -2008-01-25 12:11 Rocky Bernstein - - * ChangeLog, ruby-debug-base.rb: Add Debugger.init which intializes - things that rdebug does. This - allows a restart even though rdebug wasn't called initially. - -2008-01-22 23:15 Rocky Bernstein - - * ChangeLog: Allow "help info xxx". Add ability for long help on - "info" command. - Add "info break xx". - - test: remove test/unit class name conflicts. All the tests we - wrote - now get run. - -2008-01-19 19:28 Rocky Bernstein - - * ChangeLog: Move ruby-debug-base tests to base directory. Add a - binding_n regression test. - -2008-01-16 18:42 Rocky Bernstein - - * ChangeLog: Need to present source filename (__FILE__) as Ruby and - therefore breakpoint - sees it. - - -2008-01-16 02:19 Rocky Bernstein - - * ChangeLog, ruby-debug-base.rb: Line caching moved to an external - gem, linecache. We now require - version 0.2 of that or greater. - -2008-01-14 01:31 Rocky Bernstein - - * ChangeLog: Make rdebug-track work better in the face of prompt - and error annotations. - control.rb: need another test when rdebug not called initially. - -2008-01-13 21:51 Rocky Bernstein - - * ChangeLog: Some stack -> frame renaming - ext/breakpoint.c: put methods in alpha order (to help with - reference man) - breakpoints.rb: one print -> errmsg - -2008-01-13 18:13 Rocky Bernstein - - * ChangeLog: Create errmsg routine for error output, start tagging - error messages - as errors. Under annotate 3, output errors similar to gdb - --annotate - does (although still simplified). Have Emacs pick up debugger - error - annotations. - -2008-01-13 04:05 Rocky Bernstein - - * ChangeLog: Check validity of expressions in breakpoint conditions - and don't allow - enabling a syntactically invalid expression. - - Start noting messages which are errors via an errmsg routine. - -2008-01-11 10:26 Rocky Bernstein - - * ChangeLog: Document that ruby-debug resets $0. Align program - options in ref manual and --help. Alphabetize better. - -2008-01-10 22:56 Rocky Bernstein - - * ChangeLog: More correct $0 fix. Deal with the case ./ is - automatically added. - However this might not be right in all cases. - -2008-01-10 22:25 Rocky Bernstein - - * ChangeLog: Was gobbling arg in processing --emacs. Add test. - -2008-01-10 10:34 Rocky Bernstein - - * ChangeLog: Add condition command. - -2008-01-09 19:10 Rocky Bernstein - - * ChangeLog: Rakefile: rdebug.rb -> rdbg.el - rdebug-dbg.el: Add $Id$ - -2008-01-09 19:03 Rocky Bernstein - - * ChangeLog: Break out secondary buffer into their own file, and - also internal - debug code and general secondary commands. Secondary buffer code - removed from rdebug-cmd and moved into the appropriate file. - - rdebug-edit-variables-value is not defined so comment out for - now. - -2008-01-08 16:04 Rocky Bernstein - - * ChangeLog: Restore $: to the value it was before rdebug call. - -2008-01-07 20:38 Rocky Bernstein - - * ChangeLog: Add "var class". This means "var const .." can no - longer be abbreviated "var c"; use "var co" instead. - (Or "var const" or "var constant" - -2008-01-07 19:57 Rocky Bernstein - - * ChangeLog: Add class level variables to "info variables" - -2008-01-07 17:37 Rocky Bernstein - - * ChangeLog: Add "self" to list "info variables" spits out. - -2008-01-07 09:59 Rocky Bernstein - - * ChangeLog: --emacs sets width to 120. rdebug-core.el will reset - to 120 unless it's already that. - -2008-01-07 04:29 Rocky Bernstein - - * ChangeLog: Split out ChangeLogs better (I hope). - -2008-01-06 20:56 Rocky Bernstein - - * ChangeLog: test/*-emacs-basic*, tdebug: Add test of running in - Emacs without annotations. - - emacs/*.el: make regexp tests work again, move regexp to from - core to regexp. - Add an annotate regexp test. - - processor.rb: Remove some anotation print from bleeding into - output - when annotations are not wanted. Reinstate "Program finished" in - annotations and outside (rdebug). - -2008-01-06 18:55 Rocky Bernstein - - * ChangeLog: Create Processor class and subclass that. Perhaps a - mixin would be good. - Remove annotation output bleanding when annotate is off. - Try to reduce the mess annotations is adding to processor.rb - rdebug-core.el: fix indentation to pass the regression test - Anders added - Makefile.am: Add rdebug-source.el to distribution. - Make sure "rake test" - -2008-01-06 02:15 Rocky Bernstein - - * ChangeLog: Some work on saving state across a restart. More work - is needed on the - script command to get this working. The save-file name is now - optional. save.rb split off from script.rb Display expressions - and - some settings are now captured in the save/restore file. - Add interface.finalize - things that need to be done before quit - or - restart. - -2008-01-05 21:16 Rocky Bernstein - - * ChangeLog: More work to make annotate more like gdb's. - starting/stopping/exiting - should be more similar. Some code has been commented out until we - get - the Emacs interface to match. See "FIXME: ANNOTATE" in - processor.rb. - Also regression tests for output and annotate currently fail for - this - reason. - -2008-01-02 20:35 Rocky Bernstein - - * ChangeLog: helper.rb: add regexp for a position. TODO: add - parsing routine and use in - various commands - -2008-01-02 14:41 Rocky Bernstein - - * ChangeLog: processor.rb: Redo where starting/exiting annotations - are done. - rdebug.el: back off on setting output command for now. - -2008-01-01 15:23 Rocky Bernstein - - * ChangeLog: Fix --emacs to do --no-quit properly. - -2008-01-01 09:00 Rocky Bernstein - - * ChangeLog: Remove RDoc warnings caused because C files have been - split up. - -2008-01-01 05:51 Rocky Bernstein - - * ChangeLog: reindent -> indent. Makefile.am: wasn't including all - test files. - -2007-12-31 06:26 Rocky Bernstein - - * ChangeLog: Rakefile: add spit-off C files to ruby-debug-base gem. - -2007-12-31 06:23 Rocky Bernstein - - * ChangeLog: rdebug-test-cmd.el: Indentation - -2007-12-31 06:08 Rocky Bernstein - - * ChangeLog: Changes and more changes. - -2007-12-29 13:31 Rocky Bernstein - - * ChangeLog: Remove looping on quit. "-n" is broken so remove it - for now. - -2007-12-28 15:33 Rocky Bernstein - - * ChangeLog: info.rb: Incorrect test for no display expressions. - display.rb: Grammar thing. - processor.rb: Slightly cleaner code - test/* more/better tests. - -2007-12-27 21:03 Rocky Bernstein - - * ChangeLog: Be more agressive about resetting gud-last-frame and - gud-last-last-frame. These foul up tracking when debugging is - interrupted. - We probably need a special "reset" command. - -2007-12-26 18:35 Rocky Bernstein - - * ChangeLog: Version number games - maybe 0.10.1 is better. - -2007-12-25 23:40 Rocky Bernstein - - * ChangeLog: Add step- and step+. Document as well as the new - toggle command. - -2007-12-25 09:55 Rocky Bernstein - - * ChangeLog: Small doc fixes. - -2007-12-25 07:51 Rocky Bernstein - - * ChangeLog: Last commit before 0.10.0 release. - -2007-12-25 02:51 Rocky Bernstein - - * ChangeLog: breakpoints.*: main -> Object. Add bad Class name test - AUTHOR: Add Anders - README: note ruby-debug-extra. More precise (I think) - -2007-12-24 00:25 Rocky Bernstein - - * ChangeLog: Rakefile: set up gem unit test for ruby-debug-base. - Add file in test/ - so we could do the same for ruby-debug were it not for other - mysterious - problems. - -2007-12-23 17:33 Rocky Bernstein - - * ChangeLog: Go over packaging: - ChangeLogs for ruby-debug-base (in ext and lib) separate from CLI - ChangeLog - ChangeLogs now map userid to names - ruby-debug-base regression test included in ruby-debug-base - Columnize test separated. (It will disappear when ruby-debug - requires it - as an external) - -2007-12-16 21:31 Rocky Bernstein - - * ruby-debug-base.rb: Add "info variables test". - - ruby-debug-base.rb: Not sure how test(?M, file) ever worked - before but change - to use File.stat(file).mtime - info.rb: ignore debugger variables which are sometimes set. - -2007-12-10 03:23 Rocky Bernstein - - * ruby-debug-base.rb: doc changes. - -2007-06-26 07:05 Rocky Bernstein - - * ruby-debug-base.rb: Run .rdebugrc on Debugger.start. Look for - this in the current directory and run that instead the one in - $HOME if that exists. Again, inspired and compatible with gdb. - - rdebug: Check script for syntax errors before loading. We get - more informative errors and it doesn't look like rdebug is at - fault. - -2007-06-05 16:36 Kent Sibilev - - * ruby-debug-base.rb: code reorganization. - reverted 'run' command. - -2007-06-05 07:59 Kent Sibilev - - * ruby-debug-base.rb: restore post_mortem - -2007-06-02 15:01 Rocky Bernstein - - * ruby-debug-base.rb: lib/ruby-debug-base.rb: add Quit and Restart - exceptions which can reliably be used after the delayed exception - handling bug is fixed - emacs/rdebug-track.el and cli/ruby-debug/processor.rb: more - accurate line tracking in EMACS. When not in emacs should be more - like what was there. - -2007-06-01 21:57 Rocky Bernstein - - * ruby-debug-base.rb: parens around a print seems to give a - warning. Remove. - -2007-05-23 16:43 Rocky Bernstein - - * ruby-debug-base.rb: post_mortem: to test $! *before* running - debug_at_ext or else we may get an erroneous message: - ruby-debug-base.rb:162:in `current_context': Debugger.start is - not called yet. (RuntimeError) - - A simple test case to show the problem: - - "require rubygems" - "require ruby-debug" - Debugger.start - Debugger.post_mortem - exit # Causes us to incorrectly give the above error - -2007-05-15 20:22 Kent Sibilev - - * ruby-debug-base.rb: various fixes - -2007-04-27 23:21 Kent Sibilev - - * ruby-debug-base.rb: ditto - -2007-04-27 23:19 Kent Sibilev - - * ruby-debug-base.rb: add breakpoint method as an alias for - debugger in case breakpoint method is not defined already - -2007-03-25 01:03 Kent Sibilev - - * ruby-debug-base.rb: will start the debugger if necessary - -2007-03-24 18:17 Kent Sibilev - - * : stable becomes the trunk - -2007-03-13 17:06 Kent Sibilev - - * : fixed rdoc - -2007-03-01 23:44 Kent Sibilev - - * : fixed post-mortem - -2007-02-27 08:02 Kent Sibilev - - * : repackaging ruby-debug - -2007-02-23 20:56 Kent Sibilev - - * : added an option for Debugger.debug_load to stop at the first - line of code - -2007-02-12 06:59 Kent Sibilev - - * : added --emacs option - -2007-02-09 16:56 Kent Sibilev - - * : in remote mode the debugger shouldn't stop inside of rdebug - script - -2007-02-09 06:20 Kent Sibilev - - * : -- - -2007-02-09 01:00 Kent Sibilev - - * : fixed code reloading - made 'reload on' as a part of the 'set' command - evaluate ~/.rdebugrc as an init script - -2007-02-07 02:42 Kent Sibilev - - * : should use ignored? method to check for the debugger's thread - -2007-02-06 22:21 Kent Sibilev - - * : - -2007-02-05 22:48 Kent Sibilev - - * : -- - -2007-02-05 22:11 Kent Sibilev - - * : fixed emacs integration - -2007-02-05 20:16 Kent Sibilev - - * : fixed another issue where a bogus frame is being left in the - stack - -2007-02-04 23:36 Kent Sibilev - - * : seg fault bugfixes - fixed suspend/resume - -2007-02-04 03:49 Kent Sibilev - - * : A better fix for the segmentation fault - -2007-02-03 20:24 Kent Sibilev - - * : fix seg fault by avoiding ruby's bug - fixed Context#resume - when handling post-mortem all threads must be suspended - -2007-02-02 18:47 Kent Sibilev - - * : removed ambiguity with down command - -2007-02-01 23:48 Kent Sibilev - - * : typo - -2007-02-01 22:15 Kent Sibilev - - * : made eval command available from the control thread - -2007-02-01 07:22 Kent Sibilev - - * : added setting command - added Context#suspended? method - dispay suspended status in the thread list - display frame starting from zero - -2007-01-31 21:13 Kent Sibilev - - * : ditto - -2007-01-31 21:12 Kent Sibilev - - * : fixed help command - -2007-01-31 19:39 Kent Sibilev - - * : fixed frame count - added frame_self method to context - -2007-01-31 16:48 Kent Sibilev - - * : removed all references to frames array - fixed post-mortem debugging - -2007-01-31 00:51 Kent Sibilev - - * : removed obsolete frames usage - -2007-01-31 00:41 Kent Sibilev - - * : refactored out frame class and preallocate stack - made local variable available even when bindings are not - collected. - -2007-01-28 20:25 Kent Sibilev - - * : -- - -2007-01-28 06:22 Kent Sibilev - - * : - Control thread is always started by rdebug script. - - Ability to specify negative frame number to frame commands. - Patch from R. Bernstein. - -2007-01-28 04:52 Kent Sibilev - - * : added top frame caching - control thread is always started by rdebug script - -2007-01-27 01:43 Kent Sibilev - - * : another performance optimization - -2007-01-26 20:28 Kent Sibilev - - * : fixed #7484 - -2007-01-26 17:59 Kent Sibilev - - * : revisited file name comparing procedure - -2007-01-26 09:03 Kent Sibilev - - * : performance improvements - -2007-01-26 03:12 Kent Sibilev - - * : added option to exclude collecting of frame bindings - -2007-01-24 18:33 Kent Sibilev - - * : disable tracing when in post-mortem - added -x/--trace option to rdebug script - -2007-01-21 08:13 Kent Sibilev - - * : - -2007-01-21 03:34 Kent Sibilev - - * : assign an id to the breakpoint - -2007-01-21 01:20 Kent Sibilev - - * : added post_mortem_method wrap method - -2006-12-21 20:16 Kent Sibilev - - * : added 'restart' command - -2006-12-21 14:12 Kent Sibilev - - * : made 'exit' an alias to 'quit' - fixed the interoperability problem with rspec - -2006-12-21 13:43 Kent Sibilev - - * : fixed trace command in post-mortem mode - -2006-12-21 01:59 Kent Sibilev - - * : initialize only once - -2006-12-21 01:08 Kent Sibilev - - * : fixes irb help command - -2006-12-20 21:19 Kent Sibilev - - * : check that debugger has been started - -2006-12-20 20:08 Kent Sibilev - - * : added post-mortem option to rdebug - -2006-12-20 19:38 Kent Sibilev - - * : initial support for post-mortem debugging - -2006-12-19 06:13 Kent Sibilev - - * : removed 'run' alias - -2006-12-18 08:34 Kent Sibilev - - * : added irb command - fixed source_for method - -2006-12-02 19:15 Kent Sibilev - - * : added reload command - -2006-12-02 18:32 Kent Sibilev - - * : fixed #6518 and #6545 - -2006-12-01 06:47 Kent Sibilev - - * : - -2006-11-21 23:29 Kent Sibilev - - * : ensure that on/off is the last on the line - -2006-11-16 00:04 Kent Sibilev - - * : fixed debug_method for assignment methods - -2006-11-16 00:01 Kent Sibilev - - * : added the new branch for the stable version - -2006-10-15 22:43 Kent Sibilev - - * : branching a stable version - -2006-10-15 22:26 Kent Sibilev - - * ruby-debug.rb: remove unused require - uploaded new windows binary - -2006-10-15 19:02 Kent Sibilev - - * ruby-debug/commands/display.rb: remove unused constructor - -2006-10-15 16:54 Kent Sibilev - - * ruby-debug.rb, ruby-debug/commands/threads.rb: new logic of - context suspend/resume - -2006-10-15 07:36 Kent Sibilev - - * ruby-debug.rb, ruby-debug/lock.rb: fixed locking of debugger - threads - -2006-10-09 22:01 Kent Sibilev - - * ruby-debug/interface.rb: fixes for windows version - -2006-10-09 19:06 Kent Sibilev - - * ruby-debug.rb, ruby-debug/interface.rb: added Debugger.skip and - Debugger.debug_at_exit methods - -2006-10-09 16:44 Kent Sibilev - - * ., ruby-debug, ruby-debug.rb, ruby-debug/command.rb, - ruby-debug/commands, ruby-debug/commands/breakpoints.rb, - ruby-debug/commands/catchpoint.rb, - ruby-debug/commands/control.rb, ruby-debug/commands/display.rb, - ruby-debug/commands/eval.rb, ruby-debug/commands/frame.rb, - ruby-debug/commands/help.rb, ruby-debug/commands/list.rb, - ruby-debug/commands/method.rb, ruby-debug/commands/script.rb, - ruby-debug/commands/stepping.rb, ruby-debug/commands/threads.rb, - ruby-debug/commands/tmate.rb, ruby-debug/commands/trace.rb, - ruby-debug/commands/variables.rb, ruby-debug/interface.rb, - ruby-debug/lock.rb, ruby-debug/processor.rb: initial import - Modified: trunk/test/tdebug.rb =================================================================== --- trunk/test/tdebug.rb 2008-11-06 16:17:09 UTC (rev 871) +++ trunk/test/tdebug.rb 2008-11-07 10:39:59 UTC (rev 872) @@ -53,6 +53,11 @@ $0[0..-1] = d0 end end + + # Record where we are we can know if the call stack has been + # truncated or not. + Debugger.start_sentinal=caller(0)[1] + bt = Debugger.debug_load(Debugger::PROG_SCRIPT, !options.nostop, false) if bt if options.post_mortem From nobody at rubyforge.org Fri Nov 7 14:35:41 2008 From: nobody at rubyforge.org (nobody at rubyforge.org) Date: Fri, 7 Nov 2008 14:35:41 -0500 (EST) Subject: [Ruby-debug-commits] [873] trunk: Change truncated frame message. Message-ID: <20081107193541.E5B6E18585B6@rubyforge.org> Revision: 873 Author: rockyb Date: 2008-11-07 14:35:41 -0500 (Fri, 07 Nov 2008) Log Message: ----------- Change truncated frame message. Modified Paths: -------------- trunk/ChangeLog trunk/cli/ruby-debug/commands/frame.rb trunk/lib/ChangeLog Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2008-11-07 10:39:59 UTC (rev 872) +++ trunk/ChangeLog 2008-11-07 19:35:41 UTC (rev 873) @@ -1,3 +1,10 @@ +2008-11-07 10:39 Rocky Bernstein + + * ChangeLog, bin/rdebug, cli/ruby-debug.rb, + cli/ruby-debug/commands/frame.rb, lib/ChangeLog, test/tdebug.rb: + Add check to "where" to see if the call stack is truncated; task + #2354 + 2008-11-06 16:17 Rocky Bernstein * ChangeLog, Rakefile, lib/ChangeLog: #22698 Allow ruby-debug-base Modified: trunk/cli/ruby-debug/commands/frame.rb =================================================================== --- trunk/cli/ruby-debug/commands/frame.rb 2008-11-07 10:39:59 UTC (rev 872) +++ trunk/cli/ruby-debug/commands/frame.rb 2008-11-07 19:35:41 UTC (rev 873) @@ -165,7 +165,7 @@ end if truncated_callstack?(@state.context, Debugger.start_sentinal) - print "Warning: saved call stack may be incomplete.\n" + print "Warning: saved frames may be incomplete; cf. caller(0).\n" end end Modified: trunk/lib/ChangeLog =================================================================== --- trunk/lib/ChangeLog 2008-11-07 10:39:59 UTC (rev 872) +++ trunk/lib/ChangeLog 2008-11-07 19:35:41 UTC (rev 873) @@ -0,0 +1,1012 @@ +2008-11-07 10:39 Rocky Bernstein + + * ChangeLog: Add check to "where" to see if the call stack is + truncated; task #2354 + +2008-11-06 16:17 Rocky Bernstein + + * ChangeLog: #22698 Allow ruby-debug-base 0.x.y.z be compatible + with ruby-debug 0.x.y. + +2008-11-02 21:59 Rocky Bernstein + + * ChangeLog, ruby-debug-base.rb: Debugger.start with a block now + stops inside the block. Debugger.debugger with a block works like + Debugger.start with a block. + + The whole interface is hopelessly kludgy and needs to be redone. + +2008-10-26 14:54 Rocky Bernstein + + * ChangeLog: Doc typo. Add comment to remind me how to turn off + optimizationin extconf.rb + +2008-10-25 16:01 Rocky Bernstein + + * ChangeLog: Warn and add a "confirmation" when setting a + breakpoint on a file that is not loaded. Regression tests no + longer fail. + +2008-09-22 00:07 Rocky Bernstein + + * ruby-debug-base.rb: #22118 bug in showing variables post mortem. + Patch thanks to rubikitch. + Update pm.rb integration test. + +2008-09-03 17:29 Rocky Bernstein + + * ChangeLog: Show line numbers when $DEBUG is set. Patch #21772 + from Martin Krauskopf + +2008-07-07 07:11 Rocky Bernstein + + * ruby-debug-base.rb: Tracker [#20041] start erroneously moved to + Kernel - should be in + Debugger.start + +2008-06-20 06:46 Rocky Bernstein + + * ruby-debug-base.rb: trace.rb: add "trace var" + ruby-debug-base.rb: remove another undefined warning. + +2008-05-24 01:27 Rocky Bernstein + + * ChangeLog: Remove dup lines. + +2008-05-15 16:05 Rocky Bernstein + + * ChangeLog: Handle "catch nnn off" Forgotten there during r656. + From mkrauskopf [#20156]. + +2008-05-05 18:05 Rocky Bernstein + + * ChangeLog: make test-frame installation independent. Bug #19931 + +2008-04-29 13:37 Rocky Bernstein + + * ChangeLog: Test line number in "continue" command for validity. + +2008-04-28 16:16 Rocky Bernstein + + * ChangeLog: From Martin Krauskopf via patch #19779 + + Allow folks to configure Ruby used for CLI tests in the + test/config.yaml. The defaults are for native Ruby, so nothing + needs + to be done for ruby-debug. + + Developers of interfaces other than cli might override + config.yaml by + customized config.private.yaml which is ignored. So there will be + no + trash in e.g. 'svn st' output when developer customize the Ruby + to be + used. + + Handy for alternative interface implementations using + svn:externals. + +2008-04-22 02:49 Rocky Bernstein + + * ruby-debug-base.rb: Experiment with debugger(steps=0). Puts us in + the debugger call, but this may be the best we can do for now. + See tracker + #19639. + +2008-04-16 01:11 Rocky Bernstein + + * ChangeLog: In 0.10.2 now. Some work to cope systems without + readline. More work is needed. + Add test of "set autoeval." Undefined command message more + closely like gdb's. + +2008-04-10 08:49 Rocky Bernstein + + * ChangeLog: linecache is required by ruby-debug-base not + ruby-debug. Thanks Martin! + +2008-04-10 08:00 Rocky Bernstein + + * ChangeLog: Last change before 0.10.1 release. + +2008-04-10 02:03 Rocky Bernstein + + * ChangeLog: Cosmetic stuff: spelling corrections. Update node + structure so texinfo + doesn't complain. + +2008-04-08 14:52 Rocky Bernstein + + * ChangeLog: autorequire is deprecated and presumably no longer + needed + http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/182827 + +2008-04-07 00:36 Rocky Bernstein + + * ChangeLog, ruby-debug-base.rb: ruby-debug-base.rb: document + Debugger.start parameters. + CHANGES: Revise what's happened + test-shortkey.el: A failing regression test because I think + rdebug-shortkey-mode + is not correct. + +2008-04-03 19:01 Rocky Bernstein + + * ChangeLog, ruby-debug-base.rb: Allow setting :post_mortem => true + from Debugger.start. + +2008-03-28 13:53 Rocky Bernstein + + * ChangeLog: Don't unconditionally turn on short-key mode when + annotations are on. Use rdebug-short-key-mode setting to decide. + +2008-03-23 17:47 Rocky Bernstein + + * ChangeLog: set.rb -> settings.rb since it's already one command + per file, and + remove another :nodoc. + Rakefile: split long line + +2008-03-18 16:05 Rocky Bernstein + + * ChangeLog: Fix bug in 'list' command when wrapping off the end. + test-finish.rb: tolerate buggy in Ruby versions <= 1.8.7. + +2008-03-13 02:15 Rocky Bernstein + + * ruby-debug-base.rb: INCOMPATIBLE CHANGE: "finish" works like gdb + - stop just before the + most recent method finishes. Will now accept a number which stops + that + many frames completed. (Note that return line numbers will be + funny, + the first line of the method until Ruby 1.8.7.) + +2008-03-10 13:28 Rocky Bernstein + + * ChangeLog: Dunno why we are now one line number less. So be it + (for now). + +2008-03-09 23:30 Rocky Bernstein + + * ChangeLog: For now we require the duplicate numbers on + conditionals. + +2008-03-02 04:20 Rocky Bernstein + + * ruby-debug-base.rb: Better error message for an invalid break + command. + +2008-02-28 05:06 Rocky Bernstein + + * ChangeLog: breakpoints.{cmd,right}: test for an invalid stopping + line number + rdebug-fns.el: move generic split-string-and-unquote from + rdebug-core. + rdebug-core.el: Add rdebug-common-init to replace + gud-common-init. Is + simpler, and finds files better via debugger output/annotations. + Fix bug in rdebug-setup-windows: gud-find-file can return nil, + and + we still need to set buf. + +2008-02-27 04:04 Rocky Bernstein + + * ruby-debug-base.rb: Slightly more robust handle_post_mortem. + +2008-02-26 17:31 Rocky Bernstein + + * ChangeLog: Go over source location positioning. 0 is now the + oldest (first) position. Add M-S-down and M-S-up for first and + last. More tests needed in test-fns.el and need to prompt on wrap + around. + +2008-02-26 00:57 Rocky Bernstein + + * ChangeLog: Fix bug in "info file xxx breakpoints". + +2008-02-24 16:36 Rocky Bernstein + + * ChangeLog: rdebug; make more Ruby 1.9 compatible. + +2008-02-24 16:14 Rocky Bernstein + + * ChangeLog: Minor changes. + rdbg.rb: don't need $DEBUG test any more + rdebug-regexp.el: go over with checkdoc + bin/rdebug: use PATH_SEPARATOR (for 'doze again) + +2008-02-24 04:51 Rocky Bernstein + + * ChangeLog: CLI: Add long help for "info file". + + test/test-help.rb: Make test failures easier to fix and more like + the + other tests. + + emacs/test: finish testing all of the funcitons in rdebug-fns.el + + rdebug-layouts.el: Make checkdoc clean. + rdebug-track.el: don't need to rename shell buffer. Do it as an + option only. + rdebug-secondary.el: get rid of hoaky buffer finding for at least + gud-comint-buf. (Should probably do others as well) + + DOC: Note weird line stopping locations. Describe what "ctrl" in + prompt means. + +2008-02-21 02:56 Rocky Bernstein + + * ChangeLog: Fringe for frame buffer the same as in source code. + Move + miscellaneous small functions to a new file. Reduce duplication + of + "chomp" code. + +2008-02-19 23:44 Rocky Bernstein + + * ChangeLog: rdebug-cmd.el: M-insert toggles shortkey mode in the + command buffer + rdebug: search for Ruby program if file is not found and no + SEPARATOR + chars in the filename + +2008-02-18 19:56 Rocky Bernstein + + * ChangeLog: Frame switching shouldn't be recorded in position + history ring. + +2008-02-17 13:57 Rocky Bernstein + + * ruby-debug-base.rb: Add Debugger.last_exception. Show exception + in post-mortem when "info program" + is issued. Reorganize list of major changes better. + +2008-02-13 21:47 Rocky Bernstein + + * ChangeLog: processor.rb: spelled "post-mortem" incorrectly in + prompt. + +2008-02-13 17:32 Rocky Bernstein + + * ChangeLog: Set up keys for comint-next-prompt and + comint-previous-prompt. + +2008-02-12 02:06 Rocky Bernstein + + * ChangeLog: Fix bug in "info thread verbose" which wasn't showing + full traceback. + +2008-02-09 15:48 Rocky Bernstein + + * ChangeLog: helper.rb Failed attempt to DRY tests more. But save + what we have + which may someday in the future be used to go further. Minus to + undercore in Data file names in preparation such time. (We'll use + the + filename as the test name). + + testing + +2008-02-06 16:15 Rocky Bernstein + + * ChangeLog: Add 'nowarn to find-file-noselect and test that we + don't get a warning. + +2008-02-05 01:41 Rocky Bernstein + + * ChangeLog: rdebug.el: Add a defgroup for rdebug so customization + in Emacs 23 is possible. + Some other minor doc fixes. + setshow.* make sure we don't have an $Id line that we have to + check against. + +2008-02-03 15:23 Rocky Bernstein + + * ChangeLog: Try to get testing a little more organized, although + more work should + be done: Create a data directory for comparison ("right") and + script + command ("cmd") files. Code is now more uniform (and should DRY'd + a + bit more). + +2008-02-02 23:10 Rocky Bernstein + + * ChangeLog: Remove commands in post-mortem which are not + applicable, e.g."step", + "next", "continue"... + + "No breakpoints have been set" is now an error message when + trying to + set a breakpoint. + + Add post-mortem test. + + Debug.init no longer exists. + +2008-02-02 09:27 Rocky Bernstein + + * ruby-debug-base.rb: Remove Debugger.init and fold options + parameter into Debugger.start. + Old Debugger.start has been renamed Deebugger.start_ + +2008-01-31 16:30 Rocky Bernstein + + * ChangeLog: Leave ruby_debug.c this way for now. + +2008-01-31 16:24 Rocky Bernstein + + * ChangeLog: ruby_debug.c: more adventures in exception handling + processor.rb: Removal of crash when annotate is on. Need to fix + the source of the + problem though. + +2008-01-31 15:16 Rocky Bernstein + + * ruby-debug-base.rb: Handle post-mortem and exception traceback + reporting in ruby-debug + +2008-01-30 17:01 Rocky Bernstein + + * ChangeLog: Add Command.find() to find a subcommand name. + condition.right: correct for breakpoint hit counts. + +2008-01-30 01:43 Rocky Bernstein + + * ChangeLog: Add number of times a breakpoint is hit like gdb does. + +2008-01-29 22:37 Rocky Bernstein + + * ChangeLog: Columnize breakpoint output. + +2008-01-29 11:20 Rocky Bernstein + + * ChangeLog: More annotate=2 fixes. + +2008-01-28 15:59 Rocky Bernstein + + * ChangeLog: Add info file breakpoints to show lines which we can + set a breakpoint on. + Revise so we chdir into SRC_DIR. + test-hist.rb is broken - will fix later. + +2008-01-25 12:11 Rocky Bernstein + + * ChangeLog, ruby-debug-base.rb: Add Debugger.init which intializes + things that rdebug does. This + allows a restart even though rdebug wasn't called initially. + +2008-01-22 23:15 Rocky Bernstein + + * ChangeLog: Allow "help info xxx". Add ability for long help on + "info" command. + Add "info break xx". + + test: remove test/unit class name conflicts. All the tests we + wrote + now get run. + +2008-01-19 19:28 Rocky Bernstein + + * ChangeLog: Move ruby-debug-base tests to base directory. Add a + binding_n regression test. + +2008-01-16 18:42 Rocky Bernstein + + * ChangeLog: Need to present source filename (__FILE__) as Ruby and + therefore breakpoint + sees it. + + +2008-01-16 02:19 Rocky Bernstein + + * ChangeLog, ruby-debug-base.rb: Line caching moved to an external + gem, linecache. We now require + version 0.2 of that or greater. + +2008-01-14 01:31 Rocky Bernstein + + * ChangeLog: Make rdebug-track work better in the face of prompt + and error annotations. + control.rb: need another test when rdebug not called initially. + +2008-01-13 21:51 Rocky Bernstein + + * ChangeLog: Some stack -> frame renaming + ext/breakpoint.c: put methods in alpha order (to help with + reference man) + breakpoints.rb: one print -> errmsg + +2008-01-13 18:13 Rocky Bernstein + + * ChangeLog: Create errmsg routine for error output, start tagging + error messages + as errors. Under annotate 3, output errors similar to gdb + --annotate + does (although still simplified). Have Emacs pick up debugger + error + annotations. + +2008-01-13 04:05 Rocky Bernstein + + * ChangeLog: Check validity of expressions in breakpoint conditions + and don't allow + enabling a syntactically invalid expression. + + Start noting messages which are errors via an errmsg routine. + +2008-01-11 10:26 Rocky Bernstein + + * ChangeLog: Document that ruby-debug resets $0. Align program + options in ref manual and --help. Alphabetize better. + +2008-01-10 22:56 Rocky Bernstein + + * ChangeLog: More correct $0 fix. Deal with the case ./ is + automatically added. + However this might not be right in all cases. + +2008-01-10 22:25 Rocky Bernstein + + * ChangeLog: Was gobbling arg in processing --emacs. Add test. + +2008-01-10 10:34 Rocky Bernstein + + * ChangeLog: Add condition command. + +2008-01-09 19:10 Rocky Bernstein + + * ChangeLog: Rakefile: rdebug.rb -> rdbg.el + rdebug-dbg.el: Add $Id$ + +2008-01-09 19:03 Rocky Bernstein + + * ChangeLog: Break out secondary buffer into their own file, and + also internal + debug code and general secondary commands. Secondary buffer code + removed from rdebug-cmd and moved into the appropriate file. + + rdebug-edit-variables-value is not defined so comment out for + now. + +2008-01-08 16:04 Rocky Bernstein + + * ChangeLog: Restore $: to the value it was before rdebug call. + +2008-01-07 20:38 Rocky Bernstein + + * ChangeLog: Add "var class". This means "var const .." can no + longer be abbreviated "var c"; use "var co" instead. + (Or "var const" or "var constant" + +2008-01-07 19:57 Rocky Bernstein + + * ChangeLog: Add class level variables to "info variables" + +2008-01-07 17:37 Rocky Bernstein + + * ChangeLog: Add "self" to list "info variables" spits out. + +2008-01-07 09:59 Rocky Bernstein + + * ChangeLog: --emacs sets width to 120. rdebug-core.el will reset + to 120 unless it's already that. + +2008-01-07 04:29 Rocky Bernstein + + * ChangeLog: Split out ChangeLogs better (I hope). + +2008-01-06 20:56 Rocky Bernstein + + * ChangeLog: test/*-emacs-basic*, tdebug: Add test of running in + Emacs without annotations. + + emacs/*.el: make regexp tests work again, move regexp to from + core to regexp. + Add an annotate regexp test. + + processor.rb: Remove some anotation print from bleeding into + output + when annotations are not wanted. Reinstate "Program finished" in + annotations and outside (rdebug). + +2008-01-06 18:55 Rocky Bernstein + + * ChangeLog: Create Processor class and subclass that. Perhaps a + mixin would be good. + Remove annotation output bleanding when annotate is off. + Try to reduce the mess annotations is adding to processor.rb + rdebug-core.el: fix indentation to pass the regression test + Anders added + Makefile.am: Add rdebug-source.el to distribution. + Make sure "rake test" + +2008-01-06 02:15 Rocky Bernstein + + * ChangeLog: Some work on saving state across a restart. More work + is needed on the + script command to get this working. The save-file name is now + optional. save.rb split off from script.rb Display expressions + and + some settings are now captured in the save/restore file. + Add interface.finalize - things that need to be done before quit + or + restart. + +2008-01-05 21:16 Rocky Bernstein + + * ChangeLog: More work to make annotate more like gdb's. + starting/stopping/exiting + should be more similar. Some code has been commented out until we + get + the Emacs interface to match. See "FIXME: ANNOTATE" in + processor.rb. + Also regression tests for output and annotate currently fail for + this + reason. + +2008-01-02 20:35 Rocky Bernstein + + * ChangeLog: helper.rb: add regexp for a position. TODO: add + parsing routine and use in + various commands + +2008-01-02 14:41 Rocky Bernstein + + * ChangeLog: processor.rb: Redo where starting/exiting annotations + are done. + rdebug.el: back off on setting output command for now. + +2008-01-01 15:23 Rocky Bernstein + + * ChangeLog: Fix --emacs to do --no-quit properly. + +2008-01-01 09:00 Rocky Bernstein + + * ChangeLog: Remove RDoc warnings caused because C files have been + split up. + +2008-01-01 05:51 Rocky Bernstein + + * ChangeLog: reindent -> indent. Makefile.am: wasn't including all + test files. + +2007-12-31 06:26 Rocky Bernstein + + * ChangeLog: Rakefile: add spit-off C files to ruby-debug-base gem. + +2007-12-31 06:23 Rocky Bernstein + + * ChangeLog: rdebug-test-cmd.el: Indentation + +2007-12-31 06:08 Rocky Bernstein + + * ChangeLog: Changes and more changes. + +2007-12-29 13:31 Rocky Bernstein + + * ChangeLog: Remove looping on quit. "-n" is broken so remove it + for now. + +2007-12-28 15:33 Rocky Bernstein + + * ChangeLog: info.rb: Incorrect test for no display expressions. + display.rb: Grammar thing. + processor.rb: Slightly cleaner code + test/* more/better tests. + +2007-12-27 21:03 Rocky Bernstein + + * ChangeLog: Be more agressive about resetting gud-last-frame and + gud-last-last-frame. These foul up tracking when debugging is + interrupted. + We probably need a special "reset" command. + +2007-12-26 18:35 Rocky Bernstein + + * ChangeLog: Version number games - maybe 0.10.1 is better. + +2007-12-25 23:40 Rocky Bernstein + + * ChangeLog: Add step- and step+. Document as well as the new + toggle command. + +2007-12-25 09:55 Rocky Bernstein + + * ChangeLog: Small doc fixes. + +2007-12-25 07:51 Rocky Bernstein + + * ChangeLog: Last commit before 0.10.0 release. + +2007-12-25 02:51 Rocky Bernstein + + * ChangeLog: breakpoints.*: main -> Object. Add bad Class name test + AUTHOR: Add Anders + README: note ruby-debug-extra. More precise (I think) + +2007-12-24 00:25 Rocky Bernstein + + * ChangeLog: Rakefile: set up gem unit test for ruby-debug-base. + Add file in test/ + so we could do the same for ruby-debug were it not for other + mysterious + problems. + +2007-12-23 17:33 Rocky Bernstein + + * ChangeLog: Go over packaging: + ChangeLogs for ruby-debug-base (in ext and lib) separate from CLI + ChangeLog + ChangeLogs now map userid to names + ruby-debug-base regression test included in ruby-debug-base + Columnize test separated. (It will disappear when ruby-debug + requires it + as an external) + +2007-12-16 21:31 Rocky Bernstein + + * ruby-debug-base.rb: Add "info variables test". + + ruby-debug-base.rb: Not sure how test(?M, file) ever worked + before but change + to use File.stat(file).mtime + info.rb: ignore debugger variables which are sometimes set. + +2007-12-10 03:23 Rocky Bernstein + + * ruby-debug-base.rb: doc changes. + +2007-06-26 07:05 Rocky Bernstein + + * ruby-debug-base.rb: Run .rdebugrc on Debugger.start. Look for + this in the current directory and run that instead the one in + $HOME if that exists. Again, inspired and compatible with gdb. + + rdebug: Check script for syntax errors before loading. We get + more informative errors and it doesn't look like rdebug is at + fault. + +2007-06-05 16:36 Kent Sibilev + + * ruby-debug-base.rb: code reorganization. + reverted 'run' command. + +2007-06-05 07:59 Kent Sibilev + + * ruby-debug-base.rb: restore post_mortem + +2007-06-02 15:01 Rocky Bernstein + + * ruby-debug-base.rb: lib/ruby-debug-base.rb: add Quit and Restart + exceptions which can reliably be used after the delayed exception + handling bug is fixed + emacs/rdebug-track.el and cli/ruby-debug/processor.rb: more + accurate line tracking in EMACS. When not in emacs should be more + like what was there. + +2007-06-01 21:57 Rocky Bernstein + + * ruby-debug-base.rb: parens around a print seems to give a + warning. Remove. + +2007-05-23 16:43 Rocky Bernstein + + * ruby-debug-base.rb: post_mortem: to test $! *before* running + debug_at_ext or else we may get an erroneous message: + ruby-debug-base.rb:162:in `current_context': Debugger.start is + not called yet. (RuntimeError) + + A simple test case to show the problem: + + "require rubygems" + "require ruby-debug" + Debugger.start + Debugger.post_mortem + exit # Causes us to incorrectly give the above error + +2007-05-15 20:22 Kent Sibilev + + * ruby-debug-base.rb: various fixes + +2007-04-27 23:21 Kent Sibilev + + * ruby-debug-base.rb: ditto + +2007-04-27 23:19 Kent Sibilev + + * ruby-debug-base.rb: add breakpoint method as an alias for + debugger in case breakpoint method is not defined already + +2007-03-25 01:03 Kent Sibilev + + * ruby-debug-base.rb: will start the debugger if necessary + +2007-03-24 18:17 Kent Sibilev + + * : stable becomes the trunk + +2007-03-13 17:06 Kent Sibilev + + * : fixed rdoc + +2007-03-01 23:44 Kent Sibilev + + * : fixed post-mortem + +2007-02-27 08:02 Kent Sibilev + + * : repackaging ruby-debug + +2007-02-23 20:56 Kent Sibilev + + * : added an option for Debugger.debug_load to stop at the first + line of code + +2007-02-12 06:59 Kent Sibilev + + * : added --emacs option + +2007-02-09 16:56 Kent Sibilev + + * : in remote mode the debugger shouldn't stop inside of rdebug + script + +2007-02-09 06:20 Kent Sibilev + + * : -- + +2007-02-09 01:00 Kent Sibilev + + * : fixed code reloading + made 'reload on' as a part of the 'set' command + evaluate ~/.rdebugrc as an init script + +2007-02-07 02:42 Kent Sibilev + + * : should use ignored? method to check for the debugger's thread + +2007-02-06 22:21 Kent Sibilev + + * : + +2007-02-05 22:48 Kent Sibilev + + * : -- + +2007-02-05 22:11 Kent Sibilev + + * : fixed emacs integration + +2007-02-05 20:16 Kent Sibilev + + * : fixed another issue where a bogus frame is being left in the + stack + +2007-02-04 23:36 Kent Sibilev + + * : seg fault bugfixes + fixed suspend/resume + +2007-02-04 03:49 Kent Sibilev + + * : A better fix for the segmentation fault + +2007-02-03 20:24 Kent Sibilev + + * : fix seg fault by avoiding ruby's bug + fixed Context#resume + when handling post-mortem all threads must be suspended + +2007-02-02 18:47 Kent Sibilev + + * : removed ambiguity with down command + +2007-02-01 23:48 Kent Sibilev + + * : typo + +2007-02-01 22:15 Kent Sibilev + + * : made eval command available from the control thread + +2007-02-01 07:22 Kent Sibilev + + * : added setting command + added Context#suspended? method + dispay suspended status in the thread list + display frame starting from zero + +2007-01-31 21:13 Kent Sibilev + + * : ditto + +2007-01-31 21:12 Kent Sibilev + + * : fixed help command + +2007-01-31 19:39 Kent Sibilev + + * : fixed frame count + added frame_self method to context + +2007-01-31 16:48 Kent Sibilev + + * : removed all references to frames array + fixed post-mortem debugging + +2007-01-31 00:51 Kent Sibilev + + * : removed obsolete frames usage + +2007-01-31 00:41 Kent Sibilev + + * : refactored out frame class and preallocate stack + made local variable available even when bindings are not + collected. + +2007-01-28 20:25 Kent Sibilev + + * : -- + +2007-01-28 06:22 Kent Sibilev + + * : - Control thread is always started by rdebug script. + - Ability to specify negative frame number to frame commands. + Patch from R. Bernstein. + +2007-01-28 04:52 Kent Sibilev + + * : added top frame caching + control thread is always started by rdebug script + +2007-01-27 01:43 Kent Sibilev + + * : another performance optimization + +2007-01-26 20:28 Kent Sibilev + + * : fixed #7484 + +2007-01-26 17:59 Kent Sibilev + + * : revisited file name comparing procedure + +2007-01-26 09:03 Kent Sibilev + + * : performance improvements + +2007-01-26 03:12 Kent Sibilev + + * : added option to exclude collecting of frame bindings + +2007-01-24 18:33 Kent Sibilev + + * : disable tracing when in post-mortem + added -x/--trace option to rdebug script + +2007-01-21 08:13 Kent Sibilev + + * : + +2007-01-21 03:34 Kent Sibilev + + * : assign an id to the breakpoint + +2007-01-21 01:20 Kent Sibilev + + * : added post_mortem_method wrap method + +2006-12-21 20:16 Kent Sibilev + + * : added 'restart' command + +2006-12-21 14:12 Kent Sibilev + + * : made 'exit' an alias to 'quit' + fixed the interoperability problem with rspec + +2006-12-21 13:43 Kent Sibilev + + * : fixed trace command in post-mortem mode + +2006-12-21 01:59 Kent Sibilev + + * : initialize only once + +2006-12-21 01:08 Kent Sibilev + + * : fixes irb help command + +2006-12-20 21:19 Kent Sibilev + + * : check that debugger has been started + +2006-12-20 20:08 Kent Sibilev + + * : added post-mortem option to rdebug + +2006-12-20 19:38 Kent Sibilev + + * : initial support for post-mortem debugging + +2006-12-19 06:13 Kent Sibilev + + * : removed 'run' alias + +2006-12-18 08:34 Kent Sibilev + + * : added irb command + fixed source_for method + +2006-12-02 19:15 Kent Sibilev + + * : added reload command + +2006-12-02 18:32 Kent Sibilev + + * : fixed #6518 and #6545 + +2006-12-01 06:47 Kent Sibilev + + * : + +2006-11-21 23:29 Kent Sibilev + + * : ensure that on/off is the last on the line + +2006-11-16 00:04 Kent Sibilev + + * : fixed debug_method for assignment methods + +2006-11-16 00:01 Kent Sibilev + + * : added the new branch for the stable version + +2006-10-15 22:43 Kent Sibilev + + * : branching a stable version + +2006-10-15 22:26 Kent Sibilev + + * ruby-debug.rb: remove unused require + uploaded new windows binary + +2006-10-15 19:02 Kent Sibilev + + * ruby-debug/commands/display.rb: remove unused constructor + +2006-10-15 16:54 Kent Sibilev + + * ruby-debug.rb, ruby-debug/commands/threads.rb: new logic of + context suspend/resume + +2006-10-15 07:36 Kent Sibilev + + * ruby-debug.rb, ruby-debug/lock.rb: fixed locking of debugger + threads + +2006-10-09 22:01 Kent Sibilev + + * ruby-debug/interface.rb: fixes for windows version + +2006-10-09 19:06 Kent Sibilev + + * ruby-debug.rb, ruby-debug/interface.rb: added Debugger.skip and + Debugger.debug_at_exit methods + +2006-10-09 16:44 Kent Sibilev + + * ., ruby-debug, ruby-debug.rb, ruby-debug/command.rb, + ruby-debug/commands, ruby-debug/commands/breakpoints.rb, + ruby-debug/commands/catchpoint.rb, + ruby-debug/commands/control.rb, ruby-debug/commands/display.rb, + ruby-debug/commands/eval.rb, ruby-debug/commands/frame.rb, + ruby-debug/commands/help.rb, ruby-debug/commands/list.rb, + ruby-debug/commands/method.rb, ruby-debug/commands/script.rb, + ruby-debug/commands/stepping.rb, ruby-debug/commands/threads.rb, + ruby-debug/commands/tmate.rb, ruby-debug/commands/trace.rb, + ruby-debug/commands/variables.rb, ruby-debug/interface.rb, + ruby-debug/lock.rb, ruby-debug/processor.rb: initial import + From nobody at rubyforge.org Sun Nov 9 20:35:45 2008 From: nobody at rubyforge.org (nobody at rubyforge.org) Date: Sun, 9 Nov 2008 20:35:45 -0500 (EST) Subject: [Ruby-debug-commits] [874] trunk/lib/ruby-debug-base.rb: Debugger. start must always call the passed block Message-ID: <20081110013545.62D6618585A0@rubyforge.org> Revision: 874 Author: kent Date: 2008-11-09 20:35:44 -0500 (Sun, 09 Nov 2008) Log Message: ----------- Debugger.start must always call the passed block Modified Paths: -------------- trunk/lib/ruby-debug-base.rb Modified: trunk/lib/ruby-debug-base.rb =================================================================== --- trunk/lib/ruby-debug-base.rb 2008-11-07 19:35:41 UTC (rev 873) +++ trunk/lib/ruby-debug-base.rb 2008-11-10 01:35:44 UTC (rev 874) @@ -199,7 +199,7 @@ defined? Debugger::INITIAL_DIR end Debugger.tracing = options[:tracing] unless options[:tracing].nil? - retval = Debugger.started? ? nil : Debugger.start_(&block) + retval = Debugger.started? ? (block.call(self) if block) : Debugger.start_(&block) if options[:post_mortem] post_mortem end From nobody at rubyforge.org Sun Nov 9 20:36:42 2008 From: nobody at rubyforge.org (nobody at rubyforge.org) Date: Sun, 9 Nov 2008 20:36:42 -0500 (EST) Subject: [Ruby-debug-commits] [875] trunk/ext/breakpoint.c: fix the compiler warning Message-ID: <20081110013642.575E518585A2@rubyforge.org> Revision: 875 Author: kent Date: 2008-11-09 20:36:42 -0500 (Sun, 09 Nov 2008) Log Message: ----------- fix the compiler warning Modified Paths: -------------- trunk/ext/breakpoint.c Modified: trunk/ext/breakpoint.c =================================================================== --- trunk/ext/breakpoint.c 2008-11-10 01:35:44 UTC (rev 874) +++ trunk/ext/breakpoint.c 2008-11-10 01:36:42 UTC (rev 875) @@ -67,7 +67,7 @@ return 0; } -static int +int check_breakpoint_by_method(VALUE breakpoint, VALUE klass, ID mid) { debug_breakpoint_t *debug_breakpoint; From nobody at rubyforge.org Sun Nov 9 20:39:16 2008 From: nobody at rubyforge.org (nobody at rubyforge.org) Date: Sun, 9 Nov 2008 20:39:16 -0500 (EST) Subject: [Ruby-debug-commits] [876] trunk/ext/ruby_debug.c: these two methods are unused Message-ID: <20081110013916.73C3D16780DF@rubyforge.org> Revision: 876 Author: kent Date: 2008-11-09 20:39:16 -0500 (Sun, 09 Nov 2008) Log Message: ----------- these two methods are unused Modified Paths: -------------- trunk/ext/ruby_debug.c Modified: trunk/ext/ruby_debug.c =================================================================== --- trunk/ext/ruby_debug.c 2008-11-10 01:36:42 UTC (rev 875) +++ trunk/ext/ruby_debug.c 2008-11-10 01:39:16 UTC (rev 876) @@ -4,7 +4,7 @@ #include #include #include -#include +#include #define DEBUG_VERSION "0.10.3" @@ -466,26 +466,6 @@ return rb_protect(call_at_line_unprotected, args, 0); } -static VALUE -call_at_return_unprotected(VALUE args) -{ - VALUE context; - context = *RARRAY(args)->ptr; - return rb_funcall2(context, idAtReturn, RARRAY(args)->len - 1, RARRAY(args)->ptr + 1); -} - -static VALUE -call_at_return(VALUE context, debug_context_t *debug_context, VALUE file, VALUE line) -{ - VALUE args; - - last_debugged_thnum = debug_context->thnum; - save_current_position(debug_context); - - args = rb_ary_new3(3, context, file, line); - return rb_protect(call_at_return_unprotected, args, 0); -} - static void save_call_frame(rb_event_t event, VALUE self, char *file, int line, ID mid, debug_context_t *debug_context) { From nobody at rubyforge.org Sun Nov 9 20:41:51 2008 From: nobody at rubyforge.org (nobody at rubyforge.org) Date: Sun, 9 Nov 2008 20:41:51 -0500 (EST) Subject: [Ruby-debug-commits] [877] trunk/ext/ruby_debug.c: can' t store a copy of the debug_context in the stack like that, it doesn' t play along with garbage collector. Message-ID: <20081110014151.1F345185859F@rubyforge.org> Revision: 877 Author: kent Date: 2008-11-09 20:41:50 -0500 (Sun, 09 Nov 2008) Log Message: ----------- can't store a copy of the debug_context in the stack like that, it doesn't play along with garbage collector. Modified Paths: -------------- trunk/ext/ruby_debug.c Modified: trunk/ext/ruby_debug.c =================================================================== --- trunk/ext/ruby_debug.c 2008-11-10 01:39:16 UTC (rev 876) +++ trunk/ext/ruby_debug.c 2008-11-10 01:41:50 UTC (rev 877) @@ -1014,29 +1014,9 @@ result = Qtrue; } - /* Run the given block with debugger tracing. - - I'm not sure it is necessary right now to save and restore - debugger context. However if sometime in the future we want to - run a nested debugger, e.g. we are inside the debugger and want - to debug a code fragment, then this may come in handy. - */ if(rb_block_given_p()) - { - VALUE thread, context, return_val; - debug_context_t debug_context_save; - debug_context_t *debug_context; + rb_ensure(rb_yield, self, debug_stop_i, self); - thread = rb_thread_current(); - thread_context_lookup(thread, &context, NULL); - Data_Get_Struct(context, debug_context_t, debug_context); - memcpy(&debug_context_save, debug_context, sizeof(debug_context_t)); - /* Should we allow this to get passed in as a parameter? */ - debug_context->stop_line = 1; - return_val = rb_ensure(rb_yield, self, debug_stop_i, self); - memcpy(debug_context, &debug_context_save, sizeof(debug_context_t)); - return return_val; - } return result; } From nobody at rubyforge.org Sun Nov 9 20:43:30 2008 From: nobody at rubyforge.org (nobody at rubyforge.org) Date: Sun, 9 Nov 2008 20:43:30 -0500 (EST) Subject: [Ruby-debug-commits] [878] trunk/ext/ruby_debug.c: running at_exit hooks at the end of the debug_load method in order to fix test cases a chance to run Message-ID: <20081110014330.41F3218585A0@rubyforge.org> Revision: 878 Author: kent Date: 2008-11-09 20:43:29 -0500 (Sun, 09 Nov 2008) Log Message: ----------- running at_exit hooks at the end of the debug_load method in order to fix test cases a chance to run Modified Paths: -------------- trunk/ext/ruby_debug.c Modified: trunk/ext/ruby_debug.c =================================================================== --- trunk/ext/ruby_debug.c 2008-11-10 01:41:50 UTC (rev 877) +++ trunk/ext/ruby_debug.c 2008-11-10 01:43:29 UTC (rev 878) @@ -1396,6 +1396,11 @@ ruby_errinfo = Qnil; return errinfo; } + + /* We should run all at_exit handler's in order to provide, + * for instance, a chance to run all defined test cases */ + rb_exec_end_proc(); + /* We could have issued a Debugger.stop inside the debug session. */ if (start_count > 0) { From nobody at rubyforge.org Sun Nov 9 20:48:42 2008 From: nobody at rubyforge.org (nobody at rubyforge.org) Date: Sun, 9 Nov 2008 20:48:42 -0500 (EST) Subject: [Ruby-debug-commits] [879] trunk/lib/ruby-debug-base.rb: a little bit more readable Message-ID: <20081110014842.3F4A218581AE@rubyforge.org> Revision: 879 Author: kent Date: 2008-11-09 20:48:41 -0500 (Sun, 09 Nov 2008) Log Message: ----------- a little bit more readable Modified Paths: -------------- trunk/lib/ruby-debug-base.rb Modified: trunk/lib/ruby-debug-base.rb =================================================================== --- trunk/lib/ruby-debug-base.rb 2008-11-10 01:43:29 UTC (rev 878) +++ trunk/lib/ruby-debug-base.rb 2008-11-10 01:48:41 UTC (rev 879) @@ -199,7 +199,7 @@ defined? Debugger::INITIAL_DIR end Debugger.tracing = options[:tracing] unless options[:tracing].nil? - retval = Debugger.started? ? (block.call(self) if block) : Debugger.start_(&block) + retval = Debugger.started? ? block && block.call(self) : Debugger.start_(&block) if options[:post_mortem] post_mortem end From nobody at rubyforge.org Sun Nov 9 20:50:01 2008 From: nobody at rubyforge.org (nobody at rubyforge.org) Date: Sun, 9 Nov 2008 20:50:01 -0500 (EST) Subject: [Ruby-debug-commits] [880] trunk/ext/ruby_debug.h: added declaration of check_breakpoints_by_method method to remove compiler warning Message-ID: <20081110015001.220DC185859F@rubyforge.org> Revision: 880 Author: kent Date: 2008-11-09 20:50:00 -0500 (Sun, 09 Nov 2008) Log Message: ----------- added declaration of check_breakpoints_by_method method to remove compiler warning Modified Paths: -------------- trunk/ext/ruby_debug.h Modified: trunk/ext/ruby_debug.h =================================================================== --- trunk/ext/ruby_debug.h 2008-11-10 01:48:41 UTC (rev 879) +++ trunk/ext/ruby_debug.h 2008-11-10 01:50:00 UTC (rev 880) @@ -109,8 +109,10 @@ /* routines in breakpoint.c */ extern int check_breakpoint_expression(VALUE breakpoint, VALUE binding); extern int check_breakpoint_hit_condition(VALUE breakpoint); +extern VALUE check_breakpoints_by_method(debug_context_t *debug_context, + VALUE klass, ID mid); extern VALUE check_breakpoints_by_pos(debug_context_t *debug_context, - char *file, int line); + char *file, int line); extern VALUE create_breakpoint_from_args(int argc, VALUE *argv, int id); extern VALUE context_breakpoint(VALUE self); extern VALUE context_set_breakpoint(int argc, VALUE *argv, VALUE self); From nobody at rubyforge.org Sun Nov 9 21:56:13 2008 From: nobody at rubyforge.org (nobody at rubyforge.org) Date: Sun, 9 Nov 2008 21:56:13 -0500 (EST) Subject: [Ruby-debug-commits] [881] trunk: Trying to fix "if $0 == __FILE__" ruby's idiom. Message-ID: <20081110025614.1129C18585A0@rubyforge.org> Revision: 881 Author: kent Date: 2008-11-09 21:56:13 -0500 (Sun, 09 Nov 2008) Log Message: ----------- Trying to fix "if $0 == __FILE__" ruby's idiom. Apparently setting $0 to a new value doesn't work correctly. (Ruby's bug?) $ cat t3.rb p $0 p File.expand_path $0 $0 = File.expand_path $0 p $0 $ ruby t3.rb "t3.rb" "/Users/kent/Work/ruby-debug/trunk/t3.rb" "/Users/ke" Modified Paths: -------------- trunk/bin/rdebug trunk/ext/ruby_debug.c Modified: trunk/bin/rdebug =================================================================== --- trunk/bin/rdebug 2008-11-10 01:50:00 UTC (rev 880) +++ trunk/bin/rdebug 2008-11-10 02:56:13 UTC (rev 881) @@ -16,35 +16,7 @@ exit $?.exitstatus end print "\032\032starting\n" if Debugger.annotate and Debugger.annotate > 2 - unless options.no_rewrite_program - # Set $0 so things like __FILE == $0 work. - # A more reliable way to do this is to put $0 = __FILE__ *after* - # loading the script to be debugged. For this, adding a debug hook - # for the first time and then switching to the debug hook that's - # normally used would be helpful. Doing this would also help other - # first-time initializations such as reloading debugger state - # after a restart. - # However This is just a little more than I want to take on right - # now, so I think I'll stick with the slightly hacky approach. - $RDEBUG_0 = $0 - - # cygwin does some sort of funky truncation on $0 ./abcdef => ./ab - # probably something to do with 3-letter extension truncation. - # The hacky workaround is to do slice assignment. Ugh. - d0 = if '.' == File.dirname(Debugger::PROG_SCRIPT) and - Debugger::PROG_SCRIPT[0..0] != '.' - File.join('.', Debugger::PROG_SCRIPT) - else - Debugger::PROG_SCRIPT - end - if $0.frozen? - $0 = d0 - else - $0[0..-1] = d0 - end - end - # Record where we are we can know if the call stack has been # truncated or not. Debugger.start_sentinal=caller(0)[1] @@ -272,7 +244,7 @@ # save script name prog_script = ARGV.shift prog_script = whence_file(prog_script) unless File.exist?(prog_script) - Debugger::PROG_SCRIPT = prog_script + Debugger::PROG_SCRIPT = File.expand_path prog_script # install interruption handler trap('INT') { Debugger.interrupt_last } Modified: trunk/ext/ruby_debug.c =================================================================== --- trunk/ext/ruby_debug.c 2008-11-10 01:50:00 UTC (rev 880) +++ trunk/ext/ruby_debug.c 2008-11-10 02:56:13 UTC (rev 881) @@ -1388,6 +1388,8 @@ debug_context->stack_size = 0; if(RTEST(stop)) debug_context->stop_next = 1; + /* Initializing $0 to the script's path */ + ruby_script(RSTRING(file)->ptr); rb_load_protect(file, 0, &state); if (0 != state) { VALUE errinfo = ruby_errinfo; From nobody at rubyforge.org Mon Nov 10 03:47:14 2008 From: nobody at rubyforge.org (nobody at rubyforge.org) Date: Mon, 10 Nov 2008 03:47:14 -0500 (EST) Subject: [Ruby-debug-commits] [882] trunk/ext/ruby_debug.c: register debug_frame_t->arg_ary with GC Message-ID: <20081110084714.4B2B718582B4@rubyforge.org> Revision: 882 Author: kent Date: 2008-11-10 03:47:13 -0500 (Mon, 10 Nov 2008) Log Message: ----------- register debug_frame_t->arg_ary with GC Modified Paths: -------------- trunk/ext/ruby_debug.c Modified: trunk/ext/ruby_debug.c =================================================================== --- trunk/ext/ruby_debug.c 2008-11-10 02:56:13 UTC (rev 881) +++ trunk/ext/ruby_debug.c 2008-11-10 08:47:13 UTC (rev 882) @@ -341,6 +341,7 @@ frame = &(debug_context->frames[i]); rb_gc_mark(frame->binding); rb_gc_mark(frame->self); + rb_gc_mark(frame->arg_ary); if(frame->dead) { rb_gc_mark(frame->info.copy.locals); @@ -490,6 +491,7 @@ debug_frame->orig_id = mid; debug_frame->dead = 0; debug_frame->self = self; + debug_frame->arg_ary = Qnil; debug_frame->info.runtime.frame = ruby_frame; debug_frame->info.runtime.scope = ruby_scope; debug_frame->info.runtime.dyna_vars = event == RUBY_EVENT_LINE ? ruby_dyna_vars : NULL; From nobody at rubyforge.org Mon Nov 10 21:07:11 2008 From: nobody at rubyforge.org (nobody at rubyforge.org) Date: Mon, 10 Nov 2008 21:07:11 -0500 (EST) Subject: [Ruby-debug-commits] [883] trunk: Tweak truncated stack test since Ruby's caller doesn' t seem to include (tail?) recursive calls and we do. Message-ID: <20081111020711.5AA7216780DB@rubyforge.org> Revision: 883 Author: rockyb Date: 2008-11-10 21:07:10 -0500 (Mon, 10 Nov 2008) Log Message: ----------- Tweak truncated stack test since Ruby's caller doesn't seem to include (tail?) recursive calls and we do. Get regression tests working in light of recent changes. Modified Paths: -------------- trunk/ChangeLog trunk/cli/ruby-debug/commands/frame.rb trunk/lib/ChangeLog trunk/test/test-dollar-0.rb trunk/test/test-frame.rb Added Paths: ----------- trunk/test/trunc-call.rb Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2008-11-10 08:47:13 UTC (rev 882) +++ trunk/ChangeLog 2008-11-11 02:07:10 UTC (rev 883) @@ -1,3 +1,21 @@ +2008-11-10 01:39 Kent Sibilev + + * ext/ruby_debug.c: these two methods are unused + +2008-11-10 01:36 Kent Sibilev + + * ext/breakpoint.c: fix the compiler warning + +2008-11-10 01:35 Kent Sibilev + + * lib/ruby-debug-base.rb: Debugger.start must always call the + passed block + +2008-11-07 19:35 Rocky Bernstein + + * ChangeLog, cli/ruby-debug/commands/frame.rb, lib/ChangeLog: + Change truncated frame message. + 2008-11-07 10:39 Rocky Bernstein * ChangeLog, bin/rdebug, cli/ruby-debug.rb, Modified: trunk/cli/ruby-debug/commands/frame.rb =================================================================== --- trunk/cli/ruby-debug/commands/frame.rb 2008-11-10 08:47:13 UTC (rev 882) +++ trunk/cli/ruby-debug/commands/frame.rb 2008-11-11 02:07:10 UTC (rev 883) @@ -134,10 +134,13 @@ end end if top_discard - cs = cs[top_discard+recorded_size..-1] + cs = cs[top_discard..-1] return false unless cs return cs unless sentinal - if cs.size > 2 && cs[2] != sentinal + if cs.size > recorded_size+2 && cs[recorded_size+2] != sentinal + # caller seems to truncate recursive calls and we don't. + # See if we can find sentinal in the first 0..recorded_size+1 entries + return false if cs[0..recorded_size+1].any?{ |f| f==sentinal } return cs end return false Modified: trunk/lib/ChangeLog =================================================================== --- trunk/lib/ChangeLog 2008-11-10 08:47:13 UTC (rev 882) +++ trunk/lib/ChangeLog 2008-11-11 02:07:10 UTC (rev 883) @@ -1,3 +1,12 @@ +2008-11-10 01:35 Kent Sibilev + + * ruby-debug-base.rb: Debugger.start must always call the passed + block + +2008-11-07 19:35 Rocky Bernstein + + * ChangeLog: Change truncated frame message. + 2008-11-07 10:39 Rocky Bernstein * ChangeLog: Add check to "where" to see if the call stack is Modified: trunk/test/test-dollar-0.rb =================================================================== --- trunk/test/test-dollar-0.rb 2008-11-10 08:47:13 UTC (rev 882) +++ trunk/test/test-dollar-0.rb 2008-11-11 02:07:10 UTC (rev 883) @@ -18,21 +18,27 @@ Dir.chdir(@@SRC_DIR) do home_save = ENV['HOME'] ENV['HOME'] = '.' + filter = Proc.new{|got_lines, correct_lines| + [got_lines, correct_lines].flatten.each do |s| + s.gsub!(/.*dollar-0.rb$/, 'dollar-0.rb') + end + } + assert_equal(true, run_debugger('dollar-0', '-nx --no-stop ./dollar-0.rb', - nil, nil, false, '../bin/rdebug')) + nil, filter, false, '../bin/rdebug')) # Ruby's __FILE__ seems to prepend ./ when no directory was added. assert_equal(true, run_debugger('dollar-0a', '-nx --no-stop dollar-0.rb', - nil, nil, false, '../bin/rdebug')) + nil, filter, false, '../bin/rdebug')) # Ruby's __FILE__ seems to prepend ./ when no directory was added. assert_equal(true, run_debugger('dollar-0b', '-nx --no-stop ' + File.join('..', 'test', 'dollar-0.rb'), - nil, nil, false, '../bin/rdebug')) + nil, filter, false, '../bin/rdebug')) ENV['HOME'] = home_save end end Modified: trunk/test/test-frame.rb =================================================================== --- trunk/test/test-frame.rb 2008-11-10 08:47:13 UTC (rev 882) +++ trunk/test/test-frame.rb 2008-11-11 02:07:10 UTC (rev 883) @@ -19,7 +19,7 @@ # Ruby 1.8.6 and earlier have a trace-line number bug for return # statements. filter = Proc.new{|got_lines, correct_lines| - [got_lines[11], got_lines[11]].flatten.each do |s| + [got_lines[11], correct_lines[11]].flatten.each do |s| s.sub!(/in file ".*gcd.rb/, 'in file "gcd.rb') end } Added: trunk/test/trunc-call.rb =================================================================== --- trunk/test/trunc-call.rb (rev 0) +++ trunk/test/trunc-call.rb 2008-11-11 02:07:10 UTC (rev 883) @@ -0,0 +1,31 @@ +#!/usr/bin/env ruby +# This program is used to test that 'restart' works when we didn't call +# the debugger initially. + +TOP_SRC_DIR = File.join(File.expand_path(File.dirname(__FILE__), "..")) unless + defined?(TOP_SRC_DIR) + +$:.unshift File.join(TOP_SRC_DIR, "ext") +$:.unshift File.join(TOP_SRC_DIR, "lib") +$:.unshift File.join(TOP_SRC_DIR, "cli") +require 'ruby-debug' + +# GCD. We assume positive numbers +def gcd(a, b) + # Make: a <= b + if a > b + a, b = [b, a] + end + if a==3 + Debugger.debugger + end + + return nil if a <= 0 + + if a == 1 or b-a == 0 + return a + end + return gcd(b-a, a) +end + +gcd(13,8) From nobody at rubyforge.org Tue Nov 11 09:40:35 2008 From: nobody at rubyforge.org (nobody at rubyforge.org) Date: Tue, 11 Nov 2008 09:40:35 -0500 (EST) Subject: [Ruby-debug-commits] [884] trunk/test/data/raise.right: tdebug lines have changed Message-ID: <20081111144035.B14A116783B5@rubyforge.org> Revision: 884 Author: rockyb Date: 2008-11-11 09:40:35 -0500 (Tue, 11 Nov 2008) Log Message: ----------- tdebug lines have changed Modified Paths: -------------- trunk/test/data/raise.right Modified: trunk/test/data/raise.right =================================================================== --- trunk/test/data/raise.right 2008-11-11 02:07:10 UTC (rev 883) +++ trunk/test/data/raise.right 2008-11-11 14:40:35 UTC (rev 884) @@ -17,8 +17,8 @@ Catch exception 5. # step ./raise.rb:3 - ./tdebug.rb:56:in `debug_load' - ./tdebug.rb:56:in `debug_program' + ./tdebug.rb:61:in `debug_load' + ./tdebug.rb:61:in `debug_program' ./tdebug.rb:246 ../rdbg.rb:23:in `load' ../rdbg.rb:23:in `runner' From nobody at rubyforge.org Tue Nov 11 09:42:13 2008 From: nobody at rubyforge.org (nobody at rubyforge.org) Date: Tue, 11 Nov 2008 09:42:13 -0500 (EST) Subject: [Ruby-debug-commits] [885] trunk/test/data/raise.right: More line number changes in tdebug Message-ID: <20081111144213.BB075167886B@rubyforge.org> Revision: 885 Author: rockyb Date: 2008-11-11 09:42:13 -0500 (Tue, 11 Nov 2008) Log Message: ----------- More line number changes in tdebug Modified Paths: -------------- trunk/test/data/raise.right Modified: trunk/test/data/raise.right =================================================================== --- trunk/test/data/raise.right 2008-11-11 14:40:35 UTC (rev 884) +++ trunk/test/data/raise.right 2008-11-11 14:42:13 UTC (rev 885) @@ -19,7 +19,7 @@ ./raise.rb:3 ./tdebug.rb:61:in `debug_load' ./tdebug.rb:61:in `debug_program' - ./tdebug.rb:246 + ./tdebug.rb:251 ../rdbg.rb:23:in `load' ../rdbg.rb:23:in `runner' ../rdbg.rb:32 From nobody at rubyforge.org Tue Nov 11 10:33:49 2008 From: nobody at rubyforge.org (nobody at rubyforge.org) Date: Tue, 11 Nov 2008 10:33:49 -0500 (EST) Subject: [Ruby-debug-commits] [886] trunk: Start unit test for command regular expressions. Message-ID: <20081111153350.0B7483C82FD@rubyforge.org> Revision: 886 Author: rockyb Date: 2008-11-11 10:33:49 -0500 (Tue, 11 Nov 2008) Log Message: ----------- Start unit test for command regular expressions. Much more willing out to be done later.... Modified Paths: -------------- trunk/Rakefile trunk/test/cli/commands/catchpoint_test.rb Added Paths: ----------- trunk/test/cli/commands/unit/ trunk/test/cli/commands/unit/regexp.rb Property Changed: ---------------- trunk/ Property changes on: trunk ___________________________________________________________________ Modified: svn:ignore - .cvsignore config.status configure Makefile.in ruby-debug-extra-*.gz config.log INSTALL COPYING NEWS Makefile pkg autom4te.cache elisp-comp aclocal.m4 install-sh missing + Makefile .cvsignore Modified: trunk/Rakefile =================================================================== --- trunk/Rakefile 2008-11-11 14:42:13 UTC (rev 885) +++ trunk/Rakefile 2008-11-11 15:33:49 UTC (rev 886) @@ -20,7 +20,10 @@ 'Rakefile', ] -CLI_TEST_FILE_LIST = FileList['test/test-*.rb', 'test/cli/**/*_test.rb'] +CLI_TEST_FILE_LIST = FileList['test/cli/commands/unit/*.rb', + 'test/cli/commands/*_test.rb', + 'test/cli/**/*_test.rb', + 'test/test-*.rb'] CLI_FILES = COMMON_FILES + FileList[ "cli/**/*", 'ChangeLog', Modified: trunk/test/cli/commands/catchpoint_test.rb =================================================================== --- trunk/test/cli/commands/catchpoint_test.rb 2008-11-11 14:42:13 UTC (rev 885) +++ trunk/test/cli/commands/catchpoint_test.rb 2008-11-11 15:33:49 UTC (rev 886) @@ -2,16 +2,17 @@ require 'test/unit' -BASE_DIR = File.join(File.dirname(__FILE__), '..', '..', '..') - -%w(ext lib cli).each do |dir| - $: << File.join(BASE_DIR, dir) -end - -require File.join(BASE_DIR, 'cli', 'ruby-debug') - class TestCatchCommand < Test::Unit::TestCase + base_dir = File.expand_path(File.join(File.dirname(__FILE__), + '..', '..', '..')) + + %w(ext lib cli).each do |dir| + $: << File.join(base_dir, dir) + end + + require File.join(base_dir, 'cli', 'ruby-debug') + class MockState attr_accessor :message def context; end Added: trunk/test/cli/commands/unit/regexp.rb =================================================================== --- trunk/test/cli/commands/unit/regexp.rb (rev 0) +++ trunk/test/cli/commands/unit/regexp.rb 2008-11-11 15:33:49 UTC (rev 886) @@ -0,0 +1,19 @@ +require 'test/unit' + + +class TestCommandREs < Test::Unit::TestCase + base_dir=File.expand_path(File.join(File.dirname(__FILE__), + '..', '..', '..', '..', + 'cli', 'ruby-debug')) + require File.join(base_dir, 'command') + require File.join(base_dir, 'commands', 'frame') + include Debugger + + def test_up + c = UpCommand.new(nil) + assert c.regexp.match('up') + assert c.regexp.match('up 2') + assert_equal nil, c.regexp.match('ufoo') + end +end + From nobody at rubyforge.org Thu Nov 13 05:29:41 2008 From: nobody at rubyforge.org (nobody at rubyforge.org) Date: Thu, 13 Nov 2008 05:29:41 -0500 (EST) Subject: [Ruby-debug-commits] [887] trunk: Make Debugger.start{block} work if Debugger.started? is false. Message-ID: <20081113102941.D0F4A1858289@rubyforge.org> Revision: 887 Author: rockyb Date: 2008-11-13 05:29:41 -0500 (Thu, 13 Nov 2008) Log Message: ----------- Make Debugger.start{block} work if Debugger.started? is false. Second try. Modified Paths: -------------- trunk/ChangeLog trunk/ext/ruby_debug.c trunk/lib/ChangeLog Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2008-11-11 15:33:49 UTC (rev 886) +++ trunk/ChangeLog 2008-11-13 10:29:41 UTC (rev 887) @@ -1,3 +1,65 @@ +2008-11-11 15:33 Rocky Bernstein + + * ., Rakefile, test/cli/commands/catchpoint_test.rb, + test/cli/commands/unit, test/cli/commands/unit/regexp.rb: Start + unit test for command regular expressions. Much more willing out + to be done later.... + +2008-11-11 14:42 Rocky Bernstein + + * test/data/raise.right: More line number changes in tdebug + +2008-11-11 14:40 Rocky Bernstein + + * test/data/raise.right: tdebug lines have changed + +2008-11-11 02:07 Rocky Bernstein + + * ChangeLog, cli/ruby-debug/commands/frame.rb, lib/ChangeLog, + test/test-dollar-0.rb, test/test-frame.rb, test/trunc-call.rb: + Tweak truncated stack test since Ruby's caller doesn't seem to + include (tail?) recursive calls and we do. Get regression tests + working in light of recent changes. + +2008-11-10 08:47 Kent Sibilev + + * ext/ruby_debug.c: register debug_frame_t->arg_ary with GC + +2008-11-10 02:56 Kent Sibilev + + * bin/rdebug, ext/ruby_debug.c: Trying to fix "if $0 == __FILE__" + ruby's idiom. Apparently setting $0 to + a new value doesn't work correctly. (Ruby's bug?) + + $ cat t3.rb + p $0 + p File.expand_path $0 + $0 = File.expand_path $0 + p $0 + $ ruby t3.rb + "t3.rb" + "/Users/kent/Work/ruby-debug/trunk/t3.rb" + "/Users/ke" + +2008-11-10 01:50 Kent Sibilev + + * ext/ruby_debug.h: added declaration of + check_breakpoints_by_method method to remove compiler warning + +2008-11-10 01:48 Kent Sibilev + + * lib/ruby-debug-base.rb: a little bit more readable + +2008-11-10 01:43 Kent Sibilev + + * ext/ruby_debug.c: running at_exit hooks at the end of the + debug_load method in order to fix test cases a chance to run + +2008-11-10 01:41 Kent Sibilev + + * ext/ruby_debug.c: can't store a copy of the debug_context in the + stack like that, it doesn't play along with garbage collector. + 2008-11-10 01:39 Kent Sibilev * ext/ruby_debug.c: these two methods are unused Modified: trunk/ext/ruby_debug.c =================================================================== --- trunk/ext/ruby_debug.c 2008-11-11 15:33:49 UTC (rev 886) +++ trunk/ext/ruby_debug.c 2008-11-13 10:29:41 UTC (rev 887) @@ -1017,7 +1017,16 @@ } if(rb_block_given_p()) - rb_ensure(rb_yield, self, debug_stop_i, self); + { + VALUE thread, context, return_val; + debug_context_t *debug_context; + thread = rb_thread_current(); + thread_context_lookup(thread, &context, NULL); + Data_Get_Struct(context, debug_context_t, debug_context); + /* Should we allow this to get passed in as a parameter? */ + debug_context->stop_line = 1; + rb_ensure(rb_yield, self, debug_stop_i, self); + } return result; } Modified: trunk/lib/ChangeLog =================================================================== --- trunk/lib/ChangeLog 2008-11-11 15:33:49 UTC (rev 886) +++ trunk/lib/ChangeLog 2008-11-13 10:29:41 UTC (rev 887) @@ -1,3 +1,13 @@ +2008-11-11 02:07 Rocky Bernstein + + * ChangeLog: Tweak truncated stack test since Ruby's caller doesn't + seem to include (tail?) recursive calls and we do. Get regression + tests working in light of recent changes. + +2008-11-10 01:48 Kent Sibilev + + * ruby-debug-base.rb: a little bit more readable + 2008-11-10 01:35 Kent Sibilev * ruby-debug-base.rb: Debugger.start must always call the passed From nobody at rubyforge.org Fri Nov 14 10:32:23 2008 From: nobody at rubyforge.org (nobody at rubyforge.org) Date: Fri, 14 Nov 2008 10:32:23 -0500 (EST) Subject: [Ruby-debug-commits] [888] trunk: Move Debugger#debugger from base to cli. Message-ID: <20081114153223.5A78B18581AE@rubyforge.org> Revision: 888 Author: rockyb Date: 2008-11-14 10:32:22 -0500 (Fri, 14 Nov 2008) Log Message: ----------- Move Debugger#debugger from base to cli. Revert code in ruby_debug.c and block parameter in debugger. cf. -> Compare with. Document Debugger.start better. Modified Paths: -------------- trunk/CHANGES trunk/ChangeLog trunk/cli/ruby-debug/commands/frame.rb trunk/cli/ruby-debug.rb trunk/doc/ruby-debug.texi trunk/ext/ruby_debug.c trunk/lib/ChangeLog trunk/lib/ruby-debug-base.rb Modified: trunk/CHANGES =================================================================== --- trunk/CHANGES 2008-11-13 10:29:41 UTC (rev 887) +++ trunk/CHANGES 2008-11-14 15:32:22 UTC (rev 888) @@ -1,4 +1,13 @@ 0.10.3 + - a backtrace now warns when it thinks the callstack is truncated which it + gets by comparing with caller() + - fix setting $0. + - fix bug in showing variables in post-mortem + - Document how Debugger.start with a block is intended to be used. + - Move Kernel#debugger from ruby-debug-base into ruby-debug + - Get regression tests working again + - Warn and add a "confirmation" when setting a breakpoint on a + file that is not loaded. 0.10.2 - debugger(steps=0) breaks inside of debugger rather than wait for a line event. Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2008-11-13 10:29:41 UTC (rev 887) +++ trunk/ChangeLog 2008-11-14 15:32:22 UTC (rev 888) @@ -1,3 +1,9 @@ +2008-11-13 10:29 Rocky Bernstein + + * ChangeLog, ext/ruby_debug.c, lib/ChangeLog: Make + Debugger.start{block} work if Debugger.started? is false. Second + try. + 2008-11-11 15:33 Rocky Bernstein * ., Rakefile, test/cli/commands/catchpoint_test.rb, Modified: trunk/cli/ruby-debug/commands/frame.rb =================================================================== --- trunk/cli/ruby-debug/commands/frame.rb 2008-11-13 10:29:41 UTC (rev 887) +++ trunk/cli/ruby-debug/commands/frame.rb 2008-11-14 15:32:22 UTC (rev 888) @@ -168,7 +168,7 @@ end if truncated_callstack?(@state.context, Debugger.start_sentinal) - print "Warning: saved frames may be incomplete; cf. caller(0).\n" + print "Warning: saved frames may be incomplete; compare with caller(0).\n" end end Modified: trunk/cli/ruby-debug.rb =================================================================== --- trunk/cli/ruby-debug.rb 2008-11-13 10:29:41 UTC (rev 887) +++ trunk/cli/ruby-debug.rb 2008-11-14 15:32:22 UTC (rev 888) @@ -151,3 +151,26 @@ end end end + +module Kernel + + # Enters the debugger in the current thread after _steps_ line events occur. + # Before entering the debugger startup script is read. + # + # Setting _steps_ to 0 will cause a break in the debugger subroutine + # and not wait for a line event to occur. You will have to go "up 1" + # in order to be back in your debugged program rather than the + # debugger. Settings _steps_ to 0 could be useful you want to stop + # right after the last statement in some scope, because the next + # step will take you out of some scope. + def debugger(steps = 1) + Debugger.start unless Debugger.started? + Debugger.run_init_script(StringIO.new) + if 0 == steps + Debugger.current_context.stop_frame = 0 + else + Debugger.current_context.stop_next = steps + end + end + alias breakpoint debugger unless respond_to?(:breakpoint) +end Modified: trunk/doc/ruby-debug.texi =================================================================== --- trunk/doc/ruby-debug.texi 2008-11-13 10:29:41 UTC (rev 887) +++ trunk/doc/ruby-debug.texi 2008-11-14 15:32:22 UTC (rev 888) @@ -138,6 +138,7 @@ * First Sample Session:: A Simple Sample @code{rdebug} session * Second Sample Session:: Second Session Delving a little deeper @code{rdebug} session * Unit Testing Session:: Using the debugger in unit testing +* Debugger.start with a block:: Using the Debugger.start with a block * Debugging Oddities:: How debugging Ruby may be different... @end menu @@ -743,6 +744,59 @@ 12, that the values of its two parameters were @code{false} and @code{nil}. + at node Debugger.start with a block + at section Using the @code{Debugger.start} with a block + +We saw that @code{Debugger.start} and @code{Debugger.stop} allow +fine-grain control over where the debugger tracking should occur. + +Rather than use an explicit @code{stop}, you can also give + at code{start} a block which causes it to @code{yield} to the block and +when the block is finished a @code{stop} is run. This has a side +benefit of ensuring that in the presence of an uncaught exception + at code{stop} is run, without having to explicitly use + at code{begin} ... @code{ensure Debugger.stop end}. + +For example in Ruby Rails you might want to wrap a control in a start +block. MyController.my_request method with Debugger::start block and I +want to make sure that when this method finishes the debugger is +turned off, proceed with my application on regular +speed. + +Inside the block you will probably want to make a call to the debugger +using @code{debugger}. For example you can do this in @code{irb} + + at smallexample +$ @b{irb} +irb(main):001:0> @b{require 'rubygems'; require 'ruby-debug'} +=> true +irb(main):002:0> @b{def foo} +irb(main):003:1> @b{x=1} +irb(main):004:1> @b{puts 'foo'} +irb(main):005:1> @b{end} +=> nil +irb(main):006:0> @b{Debugger.start@{debugger; foo@}} +(irb):6 +(rdb:1) @b{s} +(irb):3 +(rdb:1) @b{p x} +nil +(rdb:1) @b{s} +(irb):4 +(rdb:1) @b{p x} +1 +(rdb:1) @b{s} +foo +=> true +irb(main):007:0> + at end smallexample + +There is a counter inside of @code{Debugger.start} method to make sure +that this works when another @code{Debugger.start} method is called +inside of outer one. However if you are stopped inside the debugger +issuing another @code{debugger} call will not have any effect even if +it is nested inside another @code{Debugger.start}. + @node Debugging Oddities @section How debugging Ruby may be different than debugging other Languages @@ -3269,10 +3323,10 @@ debugger has already been started @code{Debugger.started?} can tell you. - at emph{Currently broken:} If a block is given, the debugger is started and @code{yields} to block. When the block is finished executing, the debugger stopped with -the @code{Debugger.stop method}. +the @code{Debugger.stop method}. You will probably want to put a call +to @code{debugger} somwhere inside that block But if you want to completely stop debugger, you must call @code{Debugger.stop} as many times as you called Debugger.start Modified: trunk/ext/ruby_debug.c =================================================================== --- trunk/ext/ruby_debug.c 2008-11-13 10:29:41 UTC (rev 887) +++ trunk/ext/ruby_debug.c 2008-11-14 15:32:22 UTC (rev 888) @@ -989,9 +989,17 @@ * Debugger.start (from ruby-debug-base.rb) instead. * * If it's called without a block it returns +true+, unless debugger - * was already started. If a block is given, it starts debugger and - * yields to block. When the block is finished executing it stops - * the debugger with Debugger.stop method. + * was already started. + + * If a block is given, it starts debugger and yields to block. When + * the block is finished executing it stops the debugger with + * Debugger.stop method. Inside the block you will probably want to + * have a call to Debugger.debugger. For example: + * Debugger.start{debugger; foo} # Stop inside of foo + * + * Also, ruby-debug only allows + * one invocation of debugger at a time; nested Debugger.start's + * have no effect and you can't use this inside the debugger itself. * * Note that if you want to stop debugger, you must call * Debugger.stop as many times as you called Debugger.start @@ -1017,16 +1025,7 @@ } if(rb_block_given_p()) - { - VALUE thread, context, return_val; - debug_context_t *debug_context; - thread = rb_thread_current(); - thread_context_lookup(thread, &context, NULL); - Data_Get_Struct(context, debug_context_t, debug_context); - /* Should we allow this to get passed in as a parameter? */ - debug_context->stop_line = 1; - rb_ensure(rb_yield, self, debug_stop_i, self); - } + rb_ensure(rb_yield, self, debug_stop_i, self); return result; } Modified: trunk/lib/ChangeLog =================================================================== --- trunk/lib/ChangeLog 2008-11-13 10:29:41 UTC (rev 887) +++ trunk/lib/ChangeLog 2008-11-14 15:32:22 UTC (rev 888) @@ -1,3 +1,8 @@ +2008-11-13 10:29 Rocky Bernstein + + * ChangeLog: Make Debugger.start{block} work if Debugger.started? + is false. Second try. + 2008-11-11 02:07 Rocky Bernstein * ChangeLog: Tweak truncated stack test since Ruby's caller doesn't Modified: trunk/lib/ruby-debug-base.rb =================================================================== --- trunk/lib/ruby-debug-base.rb 2008-11-13 10:29:41 UTC (rev 887) +++ trunk/lib/ruby-debug-base.rb 2008-11-14 15:32:22 UTC (rev 888) @@ -168,14 +168,22 @@ # Debugger.start(options) -> bool # Debugger.start(options) { ... } -> obj # - # This method is internal and activates the debugger. Use - # Debugger.start (from ruby-debug-base.rb) instead. - # # If it's called without a block it returns +true+, unless debugger # was already started. If a block is given, it starts debugger and # yields to block. When the block is finished executing it stops # the debugger with Debugger.stop method. # + # If a block is given, it starts debugger and yields to block. When + # the block is finished executing it stops the debugger with + # Debugger.stop method. Inside the block you will probably want to + # have a call to Debugger.debugger. For example: + # + # Debugger.start{debugger; foo} # Stop inside of foo + # + # Also, ruby-debug only allows + # one invocation of debugger at a time; nested Debugger.start's + # have no effect and you can't use this inside the debugger itself. + # # Note that if you want to stop debugger, you must call # Debugger.stop as many time as you called Debugger.start # method. From nobody at rubyforge.org Fri Nov 14 14:28:04 2008 From: nobody at rubyforge.org (nobody at rubyforge.org) Date: Fri, 14 Nov 2008 14:28:04 -0500 (EST) Subject: [Ruby-debug-commits] [889] trunk: Go over documentation and revise. Message-ID: <20081114192804.6E29E18581A2@rubyforge.org> Revision: 889 Author: rockyb Date: 2008-11-14 14:28:03 -0500 (Fri, 14 Nov 2008) Log Message: ----------- Go over documentation and revise. Modified Paths: -------------- trunk/README trunk/configure.ac trunk/doc/ruby-debug.texi trunk/lib/ruby-debug-base.rb Modified: trunk/README =================================================================== --- trunk/README 2008-11-14 15:32:22 UTC (rev 888) +++ trunk/README 2008-11-14 19:28:03 UTC (rev 889) @@ -3,7 +3,8 @@ == Overview ruby-debug is a fast implementation of the standard debugger debug.rb. -The faster execution speed is achieved by utilizing a new hook Ruby C API. +The faster execution speed is achieved by utilizing a new hook in the +Ruby C API. == Requirements @@ -28,21 +29,20 @@ This should also pull in ruby-debug-base as a dependency. -(If you install ruby-debug-base explicitly, you can add in the secret ---test option after "install" to have the regression test run before +(If you install ruby-debug-base explicitly, you can add in the --test +option after "install" to have the regression test run before installing.) For Emacs support and the Reference Manual, get ruby-debug-extra. This is not a RubyGem, you'll need a Make program and a POSIX shell. With this installed, run: -
   sh ./configure
   make
   make test # optional, but a good idea
   sudo make install
-
+ ==== Install on MS Windows Compiling under cygwin or mingw works like it does on Unix. @@ -86,20 +86,28 @@ ... end +or + + require 'ruby-debug' ; + Debugger.start do + ... + debugger + end + When Kernel#debugger method is executed, the debugger is activated and you will be able to inspect and step through your code. == Performance -The debug.rb script that comes with the standard Ruby library uses -Kernel#set_trace_func API. Implementing the debugger in pure Ruby has -a negative impact on the speed of your program execution. This is -because the Ruby interpreter creates a Binding object each trace call, -even though it is not being used most of the time. ruby-debug moves -most of the functionality for Binding access and for breakpoint -testing to a native extension. Because this code is in C and because -and can be selectively enabled or disabled, the overhead in running -your program can be minimized. +The debug.rb script that comes with the standard Ruby library +uses Kernel#set_trace_func API. Implementing the debugger in +pure Ruby has a negative impact on the speed of your program +execution. This is because the Ruby interpreter creates a Binding +object each trace call, even though it is not being used most of the +time. ruby-debug moves most of the functionality for Binding access +and for breakpoint testing to a native extension. Because this code is +in C and because and can be selectively enabled or disabled, the +overhead in running your program can be minimized. == License Modified: trunk/configure.ac =================================================================== --- trunk/configure.ac 2008-11-14 15:32:22 UTC (rev 888) +++ trunk/configure.ac 2008-11-14 19:28:03 UTC (rev 889) @@ -1,4 +1,4 @@ -AC_INIT(ruby-debug-extra, 0.10.1,) +AC_INIT(ruby-debug-extra, 0.10.3,) AC_CONFIG_SRCDIR(doc/ruby-debug.texi) AM_INIT_AUTOMAKE Modified: trunk/doc/ruby-debug.texi =================================================================== --- trunk/doc/ruby-debug.texi 2008-11-14 15:32:22 UTC (rev 888) +++ trunk/doc/ruby-debug.texi 2008-11-14 19:28:03 UTC (rev 889) @@ -11,7 +11,7 @@ @c See the "Inserting Quote Characters" node in the Texinfo manual @set txicodequoteundirected @set txicodequotebacktick - at set RDEBUG_VERSION 0.10.2 + at set RDEBUG_VERSION 0.10.3 @macro Example {} @iftex @@ -58,7 +58,7 @@ @end direntry @titlepage - at title Debugging with @code{ruby-debug} Version @value{RDEBUG_VERSION} + at title Debugging with @code{ruby-debug} @sp 1 @subtitle @value{EDITION} Edition @subtitle @value{UPDATED-MONTH} @@ -636,10 +636,11 @@ If you run it will work. However if you run @code{rdebug} initially, you will not get into the test, because @code{test/unit} wants to be the main program. So here is a situation where one may need to modify -the program to add an explicit call to the debugger. at footnote{For some -versions of rake and @code{rdebug} you can in fact set a breakpoint -after running @code{rdebug} initially. Personally though I find it -much simpler and more reliable to modify the code as shown here.} +the program to add an explicit @emph{entry} into the +debugger. at footnote{For some versions of rake and @code{rdebug} you can +in fact set a breakpoint after running @code{rdebug} +initially. Personally though I find it much simpler and more reliable +to modify the code as shown here.} One way to do this is to add the following before the place you want to stop: @@ -747,24 +748,28 @@ @node Debugger.start with a block @section Using the @code{Debugger.start} with a block -We saw that @code{Debugger.start} and @code{Debugger.stop} allow +We saw that @code{Debugger.start()} and @code{Debugger.stop()} allow fine-grain control over where the debugger tracking should occur. -Rather than use an explicit @code{stop}, you can also give - at code{start} a block which causes it to @code{yield} to the block and -when the block is finished a @code{stop} is run. This has a side -benefit of ensuring that in the presence of an uncaught exception - at code{stop} is run, without having to explicitly use - at code{begin} ... @code{ensure Debugger.stop end}. +Rather than use an explicit @code{stop()}, you can also pass a block +to the @code{start()} method. This causes @code{start()} to run and +then @code{yield} to that block. When the block is finished, + at code{stop()} is run. In other words, this wraps a + at code{Debugger.start()} and @code{Debugger.stop()} around the block of +code. But it also has a side benefit of ensuring that in the presence +of an uncaught exception @code{stop} is run, without having to +explicitly use @code{begin} ... @code{ensure Debugger.stop() end}. -For example in Ruby Rails you might want to wrap a control in a start -block. MyController.my_request method with Debugger::start block and I -want to make sure that when this method finishes the debugger is -turned off, proceed with my application on regular -speed. +For example, in Ruby Rails you might want to debug code in one of the +controllers without causing any slowdown to any other code. And +this can be done by wrapping the controller in a @code{start()} with a +block; when the method wrapped this way finishes the debugger is +turned off, and the application proceeds at regular speed. -Inside the block you will probably want to make a call to the debugger -using @code{debugger}. For example you can do this in @code{irb} +Of course, inside the block you will probably want to enter the +debugger using @code{Debugger.debugger()}, otherwise there would +little point in using the @code{start}. For example, you can do this +in @code{irb}: @smallexample $ @b{irb} @@ -793,7 +798,7 @@ There is a counter inside of @code{Debugger.start} method to make sure that this works when another @code{Debugger.start} method is called -inside of outer one. However if you are stopped inside the debugger +inside of outer one. However if you are stopped inside the debugger, issuing another @code{debugger} call will not have any effect even if it is nested inside another @code{Debugger.start}. Modified: trunk/lib/ruby-debug-base.rb =================================================================== --- trunk/lib/ruby-debug-base.rb 2008-11-14 15:32:22 UTC (rev 888) +++ trunk/lib/ruby-debug-base.rb 2008-11-14 19:28:03 UTC (rev 889) @@ -165,28 +165,28 @@ class ThreadsTable # :nodoc: end - # Debugger.start(options) -> bool - # Debugger.start(options) { ... } -> obj + # Debugger.start(options) -> bool + # Debugger.start(options) { ... } -> obj # - # If it's called without a block it returns +true+, unless debugger - # was already started. If a block is given, it starts debugger and - # yields to block. When the block is finished executing it stops - # the debugger with Debugger.stop method. + # If it's called without a block it returns +true+, unless debugger + # was already started. If a block is given, it starts debugger and + # yields to block. When the block is finished executing it stops + # the debugger with Debugger.stop method. # - # If a block is given, it starts debugger and yields to block. When - # the block is finished executing it stops the debugger with - # Debugger.stop method. Inside the block you will probably want to - # have a call to Debugger.debugger. For example: + # If a block is given, it starts debugger and yields to block. When + # the block is finished executing it stops the debugger with + # Debugger.stop method. Inside the block you will probably want to + # have a call to Debugger.debugger. For example: # # Debugger.start{debugger; foo} # Stop inside of foo # # Also, ruby-debug only allows - # one invocation of debugger at a time; nested Debugger.start's - # have no effect and you can't use this inside the debugger itself. + # one invocation of debugger at a time; nested Debugger.start's + # have no effect and you can't use this inside the debugger itself. # - # Note that if you want to stop debugger, you must call - # Debugger.stop as many time as you called Debugger.start - # method. + # Note that if you want to stop debugger, you must call + # Debugger.stop as many time as you called Debugger.start + # method. # # +options+ is a hash used to set various debugging options. # Set :init true if you want to save ARGV and some variables which From nobody at rubyforge.org Fri Nov 14 14:37:28 2008 From: nobody at rubyforge.org (nobody at rubyforge.org) Date: Fri, 14 Nov 2008 14:37:28 -0500 (EST) Subject: [Ruby-debug-commits] [890] trunk: Go over documentation for 0.10.3 release. Message-ID: <20081114193728.38DDB18581AD@rubyforge.org> Revision: 890 Author: rockyb Date: 2008-11-14 14:37:27 -0500 (Fri, 14 Nov 2008) Log Message: ----------- Go over documentation for 0.10.3 release. rdoc creates files in doc/rdoc. Modified Paths: -------------- trunk/README trunk/Rakefile trunk/doc/.cvsignore Property Changed: ---------------- trunk/ trunk/doc/ Property changes on: trunk ___________________________________________________________________ Modified: svn:ignore - Makefile .cvsignore + .cvsignore COPYING INSTALL Makefile Makefile.in NEWS aclocal.m4 autom4te.cache config.log config.status confugure elisp-comp install-sh pkg ruby-debug-*.tar.gz Modified: trunk/README =================================================================== --- trunk/README 2008-11-14 19:28:03 UTC (rev 889) +++ trunk/README 2008-11-14 19:37:27 UTC (rev 890) @@ -99,15 +99,15 @@ == Performance -The debug.rb script that comes with the standard Ruby library -uses Kernel#set_trace_func API. Implementing the debugger in -pure Ruby has a negative impact on the speed of your program -execution. This is because the Ruby interpreter creates a Binding -object each trace call, even though it is not being used most of the -time. ruby-debug moves most of the functionality for Binding access -and for breakpoint testing to a native extension. Because this code is -in C and because and can be selectively enabled or disabled, the -overhead in running your program can be minimized. +The debug.rb script that comes with the standard Ruby library uses +Kernel#set_trace_func API. Implementing the debugger in pure Ruby has +a negative impact on the speed of your program execution. This is +because the Ruby interpreter creates a Binding object each trace call, +even though it is not being used most of the time. ruby-debug moves +most of the functionality for Binding access and for breakpoint +testing to a native extension. Because this code is in C and because +and can be selectively enabled or disabled, the overhead in running +your program can be minimized. == License Modified: trunk/Rakefile =================================================================== --- trunk/Rakefile 2008-11-14 19:28:03 UTC (rev 889) +++ trunk/Rakefile 2008-11-14 19:37:27 UTC (rev 890) @@ -220,7 +220,7 @@ # --------- RDoc Documentation ------ desc "Generate rdoc documentation" Rake::RDocTask.new("rdoc") do |rdoc| - rdoc.rdoc_dir = 'doc' + rdoc.rdoc_dir = 'doc/rdoc' rdoc.title = "ruby-debug" # Show source inline with line numbers rdoc.options << "--inline-source" << "--line-numbers" Property changes on: trunk/doc ___________________________________________________________________ Modified: svn:ignore - Makefile Makefile.in mdate-sh missing rdebug-emacs.aux rdebug-emacs.cp rdebug-emacs.cps rdebug-emacs.fn rdebug-emacs.fns rdebug-emacs.html rdebug-emacs.info rdebug-emacs.ky rdebug-emacs.log rdebug-emacs.pdf rdebug-emacs.pg rdebug-emacs.pgs rdebug-emacs.toc rdebug-emacs.tp rdebug-emacs.vr ruby-debug.aux ruby-debug.cp ruby-debug.cps ruby-debug.fn ruby-debug.fns ruby-debug.html ruby-debug.info ruby-debug.ky ruby-debug.kys ruby-debug.log ruby-debug.pdf ruby-debug.pg ruby-debug.pgs ruby-debug.toc ruby-debug.tp ruby-debug.vr ruby-debug.vrs stamp-vti texinfo.tex version-rdebug-emacs.texi version.texi + Makefile Makefile.in mdate-sh missing rdebug-emacs.aux rdebug-emacs.cp rdebug-emacs.cps rdebug-emacs.fn rdebug-emacs.fns rdebug-emacs.html rdebug-emacs.info rdebug-emacs.ky rdebug-emacs.log rdebug-emacs.pdf rdebug-emacs.pg rdebug-emacs.pgs rdebug-emacs.toc rdebug-emacs.tp rdebug-emacs.vr rdoc ruby-debug.aux ruby-debug.cp ruby-debug.cps ruby-debug.fn ruby-debug.fns ruby-debug.html ruby-debug.info ruby-debug.ky ruby-debug.kys ruby-debug.log ruby-debug.pdf ruby-debug.pg ruby-debug.pgs ruby-debug.toc ruby-debug.tp ruby-debug.vr ruby-debug.vrs stamp-1 stamp-vti texinfo.tex version-rdebug-emacs.texi version.texi Modified: trunk/doc/.cvsignore =================================================================== --- trunk/doc/.cvsignore 2008-11-14 19:28:03 UTC (rev 889) +++ trunk/doc/.cvsignore 2008-11-14 19:37:27 UTC (rev 890) @@ -17,6 +17,7 @@ rdebug-emacs.toc rdebug-emacs.tp rdebug-emacs.vr +rdoc ruby-debug.aux ruby-debug.cp ruby-debug.cps @@ -34,6 +35,7 @@ ruby-debug.tp ruby-debug.vr ruby-debug.vrs +stamp-1 stamp-vti texinfo.tex version-rdebug-emacs.texi From nobody at rubyforge.org Fri Nov 14 14:38:02 2008 From: nobody at rubyforge.org (nobody at rubyforge.org) Date: Fri, 14 Nov 2008 14:38:02 -0500 (EST) Subject: [Ruby-debug-commits] [891] trunk/.cvsignore: Administrivia Message-ID: <20081114193802.149CF18581AD@rubyforge.org> Revision: 891 Author: rockyb Date: 2008-11-14 14:38:01 -0500 (Fri, 14 Nov 2008) Log Message: ----------- Administrivia Added Paths: ----------- trunk/.cvsignore Added: trunk/.cvsignore =================================================================== --- trunk/.cvsignore (rev 0) +++ trunk/.cvsignore 2008-11-14 19:38:01 UTC (rev 891) @@ -0,0 +1,14 @@ +COPYING +INSTALL +Makefile +Makefile.in +NEWS +aclocal.m4 +autom4te.cache +config.log +config.status +confugure +elisp-comp +install-sh +pkg +ruby-debug-*.tar.gz From nobody at rubyforge.org Fri Nov 14 14:39:46 2008 From: nobody at rubyforge.org (nobody at rubyforge.org) Date: Fri, 14 Nov 2008 14:39:46 -0500 (EST) Subject: [Ruby-debug-commits] [892] trunk: More administrivia Message-ID: <20081114193946.D8FE318581AD@rubyforge.org> Revision: 892 Author: rockyb Date: 2008-11-14 14:39:46 -0500 (Fri, 14 Nov 2008) Log Message: ----------- More administrivia Modified Paths: -------------- trunk/.cvsignore Property Changed: ---------------- trunk/ Property changes on: trunk ___________________________________________________________________ Modified: svn:ignore - .cvsignore COPYING INSTALL Makefile Makefile.in NEWS aclocal.m4 autom4te.cache config.log config.status confugure elisp-comp install-sh pkg ruby-debug-*.tar.gz + COPYING INSTALL Makefile Makefile.in NEWS aclocal.m4 autom4te.cache config.log config.status configure elisp-comp install-sh pkg ruby-debug-*.tar.gz Modified: trunk/.cvsignore =================================================================== --- trunk/.cvsignore 2008-11-14 19:38:01 UTC (rev 891) +++ trunk/.cvsignore 2008-11-14 19:39:46 UTC (rev 892) @@ -7,7 +7,7 @@ autom4te.cache config.log config.status -confugure +configure elisp-comp install-sh pkg From nobody at rubyforge.org Fri Nov 14 21:18:48 2008 From: nobody at rubyforge.org (nobody at rubyforge.org) Date: Fri, 14 Nov 2008 21:18:48 -0500 (EST) Subject: [Ruby-debug-commits] [893] trunk: More administrivia Message-ID: <20081115021848.8B55218581BB@rubyforge.org> Revision: 893 Author: rockyb Date: 2008-11-14 21:18:48 -0500 (Fri, 14 Nov 2008) Log Message: ----------- More administrivia Modified Paths: -------------- trunk/.cvsignore Property Changed: ---------------- trunk/ Property changes on: trunk ___________________________________________________________________ Modified: svn:ignore - COPYING INSTALL Makefile Makefile.in NEWS aclocal.m4 autom4te.cache config.log config.status configure elisp-comp install-sh pkg ruby-debug-*.tar.gz + COPYING INSTALL Makefile Makefile.in NEWS aclocal.m4 autom4te.cache config.log config.status configure elisp-comp install-sh missing pkg ruby-debug-*.tar.gz Modified: trunk/.cvsignore =================================================================== --- trunk/.cvsignore 2008-11-14 19:39:46 UTC (rev 892) +++ trunk/.cvsignore 2008-11-15 02:18:48 UTC (rev 893) @@ -10,5 +10,6 @@ configure elisp-comp install-sh +missing pkg ruby-debug-*.tar.gz From nobody at rubyforge.org Fri Nov 14 21:20:46 2008 From: nobody at rubyforge.org (nobody at rubyforge.org) Date: Fri, 14 Nov 2008 21:20:46 -0500 (EST) Subject: [Ruby-debug-commits] [894] trunk/ext/win32/: More administrivia Message-ID: <20081115022046.2225418581BB@rubyforge.org> Revision: 894 Author: rockyb Date: 2008-11-14 21:20:45 -0500 (Fri, 14 Nov 2008) Log Message: ----------- More administrivia Property Changed: ---------------- trunk/ext/win32/ Property changes on: trunk/ext/win32 ___________________________________________________________________ Modified: svn:ignore - ruby_debug.so + *.o *.so Makefile From nobody at rubyforge.org Fri Nov 14 21:21:04 2008 From: nobody at rubyforge.org (nobody at rubyforge.org) Date: Fri, 14 Nov 2008 21:21:04 -0500 (EST) Subject: [Ruby-debug-commits] [895] trunk/ext/win32/.cvsignore: More administrivia Message-ID: <20081115022104.6CE8416780DB@rubyforge.org> Revision: 895 Author: rockyb Date: 2008-11-14 21:21:04 -0500 (Fri, 14 Nov 2008) Log Message: ----------- More administrivia Added Paths: ----------- trunk/ext/win32/.cvsignore Added: trunk/ext/win32/.cvsignore =================================================================== --- trunk/ext/win32/.cvsignore (rev 0) +++ trunk/ext/win32/.cvsignore 2008-11-15 02:21:04 UTC (rev 895) @@ -0,0 +1,3 @@ +*.o +*.so +Makefile From nobody at rubyforge.org Sat Nov 15 16:23:06 2008 From: nobody at rubyforge.org (nobody at rubyforge.org) Date: Sat, 15 Nov 2008 16:23:06 -0500 (EST) Subject: [Ruby-debug-commits] [896] trunk/doc/ruby-debug.texi: Remove hard-coded version number in example output Message-ID: <20081115212306.DDC1318581A2@rubyforge.org> Revision: 896 Author: rockyb Date: 2008-11-15 16:23:06 -0500 (Sat, 15 Nov 2008) Log Message: ----------- Remove hard-coded version number in example output Modified Paths: -------------- trunk/doc/ruby-debug.texi Modified: trunk/doc/ruby-debug.texi =================================================================== --- trunk/doc/ruby-debug.texi 2008-11-15 02:21:04 UTC (rev 895) +++ trunk/doc/ruby-debug.texi 2008-11-15 21:23:06 UTC (rev 896) @@ -1193,7 +1193,7 @@ @smallexample $ @b{rdebug --help} -rdebug 0.10.1 +rdebug @value{RDEBUG_VERSION} Usage: rdebug [options] -- Options: @@ -1698,7 +1698,7 @@ @flushleft @smallexample (rdb:1) @b{help} -ruby-debug help v0.10.1 +ruby-debug help v at value{RDEBUG_VERSION} Type 'help ' for help on a specific command Available commands: @@ -1720,7 +1720,7 @@ @smallexample (rdb:1) @b{help list} -ruby-debug help v0.10.0 +ruby-debug help v at value{RDEBUG_VERSION} l[ist] list forward l[ist] - list backward l[ist] = list current line From nobody at rubyforge.org Sat Nov 15 16:51:06 2008 From: nobody at rubyforge.org (nobody at rubyforge.org) Date: Sat, 15 Nov 2008 16:51:06 -0500 (EST) Subject: [Ruby-debug-commits] [897] trunk/doc/ruby-debug.texi: Add one more reference to start with a block Message-ID: <20081115215106.362B918581A2@rubyforge.org> Revision: 897 Author: rockyb Date: 2008-11-15 16:51:05 -0500 (Sat, 15 Nov 2008) Log Message: ----------- Add one more reference to start with a block Modified Paths: -------------- trunk/doc/ruby-debug.texi Modified: trunk/doc/ruby-debug.texi =================================================================== --- trunk/doc/ruby-debug.texi 2008-11-15 21:23:06 UTC (rev 896) +++ trunk/doc/ruby-debug.texi 2008-11-15 21:51:05 UTC (rev 897) @@ -1552,7 +1552,11 @@ There is also a @code{Debugger.stop} to turn off debugger tracking. If speed is crucial, you may want to start and stop this around certain -sections of code. +sections of code. Alternatively, instead of issuing an explicit + at code{Debugger.stop} you can add a block to the @code{Debugger.start} +and debugging is turned on for that block. If the block of code raises +an uncaught exception that would cause the block to terminate, the + at code{stop} will occur. See @ref{Debugger.start with a block}. And finally to enter the debugger: @@ -1568,7 +1572,7 @@ @code{debugger} is just a method call it's possible enclose it in a conditional expression, for example: @smallexample -debugger if foo='bar' and iter_count = 20 +debugger if 'bar' == foo and 20 == iter_count @end smallexample Although each step does a very specific thing which offers great From nobody at rubyforge.org Sat Nov 15 17:13:42 2008 From: nobody at rubyforge.org (nobody at rubyforge.org) Date: Sat, 15 Nov 2008 17:13:42 -0500 (EST) Subject: [Ruby-debug-commits] [898] trunk: Go over RDOC documentation. Message-ID: <20081115221342.E396B18581AE@rubyforge.org> Revision: 898 Author: rockyb Date: 2008-11-15 17:13:42 -0500 (Sat, 15 Nov 2008) Log Message: ----------- Go over RDOC documentation. Modified Paths: -------------- trunk/Rakefile trunk/ext/ruby_debug.c Modified: trunk/Rakefile =================================================================== --- trunk/Rakefile 2008-11-15 21:51:05 UTC (rev 897) +++ trunk/Rakefile 2008-11-15 22:13:42 UTC (rev 898) @@ -227,6 +227,7 @@ # Make the readme file the start page for the generated html rdoc.options << '--main' << 'README' rdoc.rdoc_files.include('bin/**/*', + 'cli/ruby-debug/commands/*.rb', 'lib/**/*.rb', 'ext/**/ruby_debug.c', 'README', Modified: trunk/ext/ruby_debug.c =================================================================== --- trunk/ext/ruby_debug.c 2008-11-15 21:51:05 UTC (rev 897) +++ trunk/ext/ruby_debug.c 2008-11-15 22:13:42 UTC (rev 898) @@ -983,13 +983,14 @@ /* * call-seq: * Debugger.start_ -> bool - * Debugger.start_ { ... } -> obj + * Debugger.start_ { ... } -> bool * * This method is internal and activates the debugger. Use - * Debugger.start (from ruby-debug-base.rb) instead. + * Debugger.start (from lib/ruby-debug-base.rb) instead. * - * If it's called without a block it returns +true+, unless debugger - * was already started. + * The return value is the value of !Debugger.started? before + * issuing the +start+; That is, +true+ is returned, unless debugger + * was previously started. * If a block is given, it starts debugger and yields to block. When * the block is finished executing it stops the debugger with @@ -1001,9 +1002,9 @@ * one invocation of debugger at a time; nested Debugger.start's * have no effect and you can't use this inside the debugger itself. * - * Note that if you want to stop debugger, you must call - * Debugger.stop as many times as you called Debugger.start - * method. + * Note that if you want to completely remove the debugger hook, + * you must call Debugger.stop as many times as you called + * Debugger.start method. */ static VALUE debug_start(VALUE self) @@ -1037,9 +1038,9 @@ * This method disables the debugger. It returns +true+ if the debugger is disabled, * otherwise it returns +false+. * - * Note that if you want to stop debugger, you must call - * Debugger.stop as many times as you called Debugger.start - * method. + * Note that if you want to complete remove the debugger hook, + * you must call Debugger.stop as many times as you called + * Debugger.start method. */ static VALUE debug_stop(VALUE self) From nobody at rubyforge.org Sat Nov 15 19:14:19 2008 From: nobody at rubyforge.org (nobody at rubyforge.org) Date: Sat, 15 Nov 2008 19:14:19 -0500 (EST) Subject: [Ruby-debug-commits] [899] trunk: Add rdoc for rdebug script. Message-ID: <20081116001420.065061858197@rubyforge.org> Revision: 899 Author: rockyb Date: 2008-11-15 19:14:19 -0500 (Sat, 15 Nov 2008) Log Message: ----------- Add rdoc for rdebug script. Modified Paths: -------------- trunk/ChangeLog trunk/bin/rdebug trunk/lib/ChangeLog Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2008-11-15 22:13:42 UTC (rev 898) +++ trunk/ChangeLog 2008-11-16 00:14:19 UTC (rev 899) @@ -1,3 +1,55 @@ +2008-11-15 22:13 Rocky Bernstein + + * Rakefile, ext/ruby_debug.c: Go over RDOC documentation. + +2008-11-15 21:51 Rocky Bernstein + + * doc/ruby-debug.texi: Add one more reference to start with a block + +2008-11-15 21:23 Rocky Bernstein + + * doc/ruby-debug.texi: Remove hard-coded version number in example + output + +2008-11-15 02:21 Rocky Bernstein + + * ext/win32/.cvsignore: More administrivia + +2008-11-15 02:20 Rocky Bernstein + + * ext/win32: More administrivia + +2008-11-15 02:18 Rocky Bernstein + + * ., .cvsignore: More administrivia + +2008-11-14 19:39 Rocky Bernstein + + * ., .cvsignore: More administrivia + +2008-11-14 19:38 Rocky Bernstein + + * .cvsignore: Administrivia + +2008-11-14 19:37 Rocky Bernstein + + * ., README, Rakefile, doc, doc/.cvsignore: Go over documentation + for 0.10.3 release. rdoc creates files in doc/rdoc. + +2008-11-14 19:28 Rocky Bernstein + + * README, configure.ac, doc/ruby-debug.texi, + lib/ruby-debug-base.rb: Go over documentation and revise. + +2008-11-14 15:32 Rocky Bernstein + + * CHANGES, ChangeLog, cli/ruby-debug.rb, + cli/ruby-debug/commands/frame.rb, doc/ruby-debug.texi, + ext/ruby_debug.c, lib/ChangeLog, lib/ruby-debug-base.rb: Move + Debugger#debugger from base to cli. Revert code in ruby_debug.c + and block parameter in debugger. cf. -> Compare with. Document + Debugger.start better. + 2008-11-13 10:29 Rocky Bernstein * ChangeLog, ext/ruby_debug.c, lib/ChangeLog: Make Modified: trunk/bin/rdebug =================================================================== --- trunk/bin/rdebug 2008-11-15 22:13:42 UTC (rev 898) +++ trunk/bin/rdebug 2008-11-16 00:14:19 UTC (rev 899) @@ -1,6 +1,107 @@ #!/usr/bin/env ruby -# -*- Ruby -*- +#=== Summary +# +#A command-line front-end to the Ruby debugger, ruby-debug, the +#Fast Ruby Debugger. +# +#Command invocation: +# +# rdebug [options] [--] [script-options] ruby-script-to-debug +# rdebug [options] [script-options] [--client] +# rdebug [--version | --help] +# +#=== Options +# +#-A | --annotate level:: +# Set gdb-style annotation to level, a number. Additional +# information is output automatically when program state is +# changed. This can be used by front-ends such as GNU Emacs to post +# this updated information without having to poll for it. +# +#--client:: +# Connect to a remote debugger. Used with another rdebug invocation +# using --server. See also --host and +# --cport options +# +#--cport=port:: +# Use port port for access to debugger control. +# +#-d | --debug:: +# Set $DEBUG true. +# +#--emacs:: +# Activates full GNU Emacs mode. Is the equivalent of setting the +# options --emacs-basic --annotate=3 --no-stop --no-control +# --post-mortem. +# +#--emacs-basic:: +# Activates GNU Emacs mode. Debugger prompts are prefaced with two +# octal 032 characters. +# +#-h | --host=host:: +# Use host name host for remote debugging. +# +#-I | --include path +# Add path to $LOAD_PATH +# +#-m | --post-mortem:: +# Activate post-mortem mode. +# +#--no-control:: +# Do not automatically start control thread. +# +#--no-stop:: +# Do not stop when script is loaded. +# +#-p | --port=PORT:: +# Host name used for remote debugging. +# +#-r | --requirescript:: +# Require the library, before executing your script. +# +#--script file:: +# Run debugger script file file +# +#-x | --trace:: +# Show lines before executing them. +# +#--no-quit:: +# Do not quit when script terminates. Instead rerun the +# program. +# +#--version:: +# Show the version number and exit. +# +#--verbose:: +# Turn on verbose mode. +# +#--v:: +# Print the version number, then turn on verbose mode if +# a script name is given. If no script name is given +# just exit after printing the version number. +# +#--nx:: +# Don?t execute commands found in any initialization +# files, e.g. .rdebugrc. +# +#--keep-frame-binding:: +# Keep frame bindings. +# +#--script=file:: +# Name of the script file to run +# +#-s | --server:: +# Listen for remote connections. Another rdebug session +# accesses using the --client option. See also the +# --host, --port and --cport options +# +#-w | --wait:: +# Wait for a client connection; implies -s option. +# +#--help:: +# Show invocation help and exit. + require 'rubygems' require 'optparse' require 'ostruct' Modified: trunk/lib/ChangeLog =================================================================== --- trunk/lib/ChangeLog 2008-11-15 22:13:42 UTC (rev 898) +++ trunk/lib/ChangeLog 2008-11-16 00:14:19 UTC (rev 899) @@ -1,3 +1,13 @@ +2008-11-14 19:28 Rocky Bernstein + + * ruby-debug-base.rb: Go over documentation and revise. + +2008-11-14 15:32 Rocky Bernstein + + * ChangeLog, ruby-debug-base.rb: Move Debugger#debugger from base + to cli. Revert code in ruby_debug.c and block parameter in + debugger. cf. -> Compare with. Document Debugger.start better. + 2008-11-13 10:29 Rocky Bernstein * ChangeLog: Make Debugger.start{block} work if Debugger.started? From nobody at rubyforge.org Mon Nov 17 02:34:18 2008 From: nobody at rubyforge.org (nobody at rubyforge.org) Date: Mon, 17 Nov 2008 02:34:18 -0500 (EST) Subject: [Ruby-debug-commits] [900] trunk/CHANGES: Last commit before release. Message-ID: <20081117073418.519CE16780DB@rubyforge.org> Revision: 900 Author: rockyb Date: 2008-11-17 02:34:17 -0500 (Mon, 17 Nov 2008) Log Message: ----------- Last commit before release. Modified Paths: -------------- trunk/CHANGES Modified: trunk/CHANGES =================================================================== --- trunk/CHANGES 2008-11-16 00:14:19 UTC (rev 899) +++ trunk/CHANGES 2008-11-17 07:34:17 UTC (rev 900) @@ -1,4 +1,6 @@ 0.10.3 +11/17/08 + - a backtrace now warns when it thinks the callstack is truncated which it gets by comparing with caller() - fix setting $0. From nobody at rubyforge.org Mon Nov 17 02:52:49 2008 From: nobody at rubyforge.org (nobody at rubyforge.org) Date: Mon, 17 Nov 2008 02:52:49 -0500 (EST) Subject: [Ruby-debug-commits] [901] ruby-debug-0.10.3/: Tag the 0.10.3 release. Message-ID: <20081117075249.C090516780DB@rubyforge.org> Revision: 901 Author: rockyb Date: 2008-11-17 02:52:49 -0500 (Mon, 17 Nov 2008) Log Message: ----------- Tag the 0.10.3 release. Added Paths: ----------- ruby-debug-0.10.3/ From nobody at rubyforge.org Mon Nov 17 02:54:00 2008 From: nobody at rubyforge.org (nobody at rubyforge.org) Date: Mon, 17 Nov 2008 02:54:00 -0500 (EST) Subject: [Ruby-debug-commits] [902] tags/ruby-debug-0.10.3/: Tag the 0.10.3 release. Message-ID: <20081117075400.8D35018581A2@rubyforge.org> Revision: 902 Author: rockyb Date: 2008-11-17 02:54:00 -0500 (Mon, 17 Nov 2008) Log Message: ----------- Tag the 0.10.3 release. Added Paths: ----------- tags/ruby-debug-0.10.3/ From nobody at rubyforge.org Mon Nov 24 21:43:49 2008 From: nobody at rubyforge.org (nobody at rubyforge.org) Date: Mon, 24 Nov 2008 21:43:49 -0500 (EST) Subject: [Ruby-debug-commits] [903] trunk: Frame without a frame number means frame 0, same as gdb. Message-ID: <20081125024349.5BEC118585C0@rubyforge.org> Revision: 903 Author: rockyb Date: 2008-11-24 21:43:48 -0500 (Mon, 24 Nov 2008) Log Message: ----------- Frame without a frame number means frame 0, same as gdb. We are now in 0.10.4 territory now. Modified Paths: -------------- trunk/ChangeLog trunk/cli/ruby-debug/commands/frame.rb trunk/configure.ac trunk/doc/ruby-debug.texi trunk/ext/ruby_debug.c trunk/lib/ChangeLog trunk/test/data/frame.cmd trunk/test/data/frame.right Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2008-11-17 07:54:00 UTC (rev 902) +++ trunk/ChangeLog 2008-11-25 02:43:48 UTC (rev 903) @@ -1,3 +1,11 @@ +2008-11-17 07:34 Rocky Bernstein + + * CHANGES: Last commit before release. + +2008-11-16 00:14 Rocky Bernstein + + * ChangeLog, bin/rdebug, lib/ChangeLog: Add rdoc for rdebug script. + 2008-11-15 22:13 Rocky Bernstein * Rakefile, ext/ruby_debug.c: Go over RDOC documentation. Modified: trunk/cli/ruby-debug/commands/frame.rb =================================================================== --- trunk/cli/ruby-debug/commands/frame.rb 2008-11-17 07:54:00 UTC (rev 902) +++ trunk/cli/ruby-debug/commands/frame.rb 2008-11-25 02:43:48 UTC (rev 903) @@ -255,8 +255,7 @@ def execute if not @match[1] - errmsg "Missing a frame number argument.\n" - return + pos = 0 else pos = get_int(@match[1], "Frame") return unless pos @@ -280,8 +279,9 @@ def help(cmd) %{ - f[rame] frame-number [thread thread-number] - Move the current frame to the specified frame number. + f[rame] [frame-number [thread thread-number]] + Move the current frame to the specified frame number, or the + 0 if no frame-number has been given. A negative number indicates position from the other end. So 'frame -1' moves to the oldest frame, and 'frame 0' moves to Modified: trunk/configure.ac =================================================================== --- trunk/configure.ac 2008-11-17 07:54:00 UTC (rev 902) +++ trunk/configure.ac 2008-11-25 02:43:48 UTC (rev 903) @@ -1,4 +1,4 @@ -AC_INIT(ruby-debug-extra, 0.10.3,) +AC_INIT(ruby-debug-extra, 0.10.4vc,) AC_CONFIG_SRCDIR(doc/ruby-debug.texi) AM_INIT_AUTOMAKE Modified: trunk/doc/ruby-debug.texi =================================================================== --- trunk/doc/ruby-debug.texi 2008-11-17 07:54:00 UTC (rev 902) +++ trunk/doc/ruby-debug.texi 2008-11-25 02:43:48 UTC (rev 903) @@ -2389,13 +2389,13 @@ @end table @table @code - at kindex frame @ovar{n} @r{[}thread @var{thread-num}@r{]} + at kindex frame @r{[}@ovar{n} @r{[}thread @var{thread-num}@r{]}@r{]} @cindex current stack frame @item frame @ovar{n} @r{[}thread @var{thread-num}@r{]} The @code{frame} command allows you to move from one stack frame to -another, and to print the stack frame you select. @var{n} is the -the stack frame number; @code{frame 0} then will always show the -current and most recent stack frame. +another, and to print the stack frame you select. @var{n} is the the +stack frame number or 0 if no frame number is given; @code{frame 0} +then will always show the current and most recent stack frame. If a negative number is given, counting is from the other end of the stack frame, so @code{frame -1} shows the least-recent, outermost or Modified: trunk/ext/ruby_debug.c =================================================================== --- trunk/ext/ruby_debug.c 2008-11-17 07:54:00 UTC (rev 902) +++ trunk/ext/ruby_debug.c 2008-11-25 02:43:48 UTC (rev 903) @@ -6,7 +6,7 @@ #include #include -#define DEBUG_VERSION "0.10.3" +#define DEBUG_VERSION "0.10.4" #ifdef _WIN32 Modified: trunk/lib/ChangeLog =================================================================== --- trunk/lib/ChangeLog 2008-11-17 07:54:00 UTC (rev 902) +++ trunk/lib/ChangeLog 2008-11-25 02:43:48 UTC (rev 903) @@ -1,3 +1,7 @@ +2008-11-16 00:14 Rocky Bernstein + + * ChangeLog: Add rdoc for rdebug script. + 2008-11-14 19:28 Rocky Bernstein * ruby-debug-base.rb: Go over documentation and revise. Modified: trunk/test/data/frame.cmd =================================================================== --- trunk/test/data/frame.cmd 2008-11-17 07:54:00 UTC (rev 902) +++ trunk/test/data/frame.cmd 2008-11-25 02:43:48 UTC (rev 903) @@ -12,7 +12,7 @@ where down where -frame 0 +frame where frame -1 where Modified: trunk/test/data/frame.right =================================================================== --- trunk/test/data/frame.right 2008-11-17 07:54:00 UTC (rev 902) +++ trunk/test/data/frame.right 2008-11-25 02:43:48 UTC (rev 903) @@ -27,7 +27,7 @@ # where --> #0 Object.gcd(a#Fixnum, b#Fixnum) at line gcd.rb:6 #1 at line gcd.rb:18 -# frame 0 +# frame #0 Object.gcd(a#Fixnum, b#Fixnum) at line gcd.rb:6 # where --> #0 Object.gcd(a#Fixnum, b#Fixnum) at line gcd.rb:6