new trepanning releases

9 views
Skip to first unread message

Rocky Bernstein

unread,
Jun 12, 2011, 10:09:41 AM6/12/11
to Ruby Debugger
Just to let people know that there have been new releases of the trepanning series of debuggers and gems have been cut on gemcutter.org

In this flurry,  new is a backport to MRI 1.8.7 using ruby-debug-base and MRI 1.9 using ruby-debug-base19. The new gem is called rb8-trepanning.
I had a little bit of problem with the dependencies and gem naming. I may need to do future releases after I totally figure out how automatic gem selection works seemed to work a little different on the different Ruby platforms and versions of rubygems. 

Changes to rb-trepanning and rbx-trepanning:

- Add debugger commands:
  * tbreak          (is in gdb)
  * info globals    (is in ruby-debug)
  * info locals     (is in gdb)
  * info source     (is in gdb)
  * info stack      (is in gdb, same as backtrace)
  * info macro      (in in gdb; remove show macro)
  * show timer      (set timer was already there)
  * parsetree
  * pp              (is in ruby-debug)
  * set/show reload (is in ruby-debug)

- Add options from ruby-debug:
  * --cd
  * --include
  * --require 
  * --debug
- fix bugs, and improve help

The new gem rb8-trepanning compared to ruby-debug: 

New features
 - Syntax highlighting (if coderay, term-ansicolor and newer linecache)
 - tab completion (more complete on MRI 1.8.7 rb-readline gem used)
 - parsetree (if ParseTree installed)

New commands from trepanning: 
 - gdb-like "confirm" to turn on/off prompting of dangerous commands
- "eval" and "eval?" without args to run parts of the current source line
- macros
- aliases
- new help system
- unique command abbrev (or not if "set abbrev off")
- new "!" suffix on "quit" and "kill" command, e.g. "q!", to avoid prompting.

Incompatibilities: 
- autoeval is on by default
- ";;" separates debugger commands so you can use ";" in eval
- some possibliy lesser-used commands have been dropped. If people notice,
  they can be reinstated.
- p is now pr to avoid eval confusion with Ruby's "p" method
- dropped support for annotations and ruby-debug emacs. Use newer emacs-dbgr
- some commands have been moved to closer match gdb: 
   * threads -> info threads
   * reload  -> set reload 
   * trace   -> set trace






Updating trepanning also means that there are a number of dependent gems that 

Charles Oliver Nutter

unread,
Jun 12, 2011, 9:12:08 PM6/12/11
to ruby-d...@googlegroups.com
Since the work you are doing is based on ruby-debug-base, does that mean it will work out of the box on JRuby?

- Charlie (mobile)

Rocky Bernstein

unread,
Jun 12, 2011, 9:42:43 PM6/12/11
to ruby-d...@googlegroups.com
On Sun, Jun 12, 2011 at 9:12 PM, Charles Oliver Nutter <hea...@headius.com> wrote:
Since the work you are doing is based on ruby-debug-base, does that mean it will work out of the box on JRuby?

In theory, yes!   

You'll need to adjust rbx-require-relative to understand what to do for JRuby. It is either do a no-op (use the bultin require_relative) or do inside that gem the not-totally-reliable thing that's done on 1.8.7: File.path_expand(File.join(File.dirname(__FILE__)... )

Over time, I have been trying to get the code bases of the debuggers for Rubinius and YARV closer together. And leading into this release, I've decided to pull in MRI 1.8. It is hard to believe JRuby isn't like the common parts of MRI 1.8, YARV and Rubinius. So that I hope is the good news for the code base of rb8-trepanning. The bad news is that it has to have some legacy machinations. I really have grown to dislike Debugger.start for example.

The day before the release (June 12th is my sister's birthday and I do releases on birthdays), I tried for the first time to see if rb8-trepanning would work with and unpatched MRI 1.9.2. I was kind of surprised that it worked as well as it did. Honestly, I hadn't used ruby-debug for 1.9.2 before June 11th. 

There was some simple stupid stuff like Class#get_const returning symbols versus character string. I largely took care of that in rb8-trepanning. Some things for unpatched 1.9.2 I just punted on.  So running debugger commands in an irb session that was entered from the debugger is broken on an unpatched YARV 1.9.2. (If you don't understand what this means, don't worry about it. I often find that years can go by before someone else reports a problem I have noticed, so why address beforehand?)

Does JRuby use the same linecache gem as well? If so the newer linecache is preferred for syntax highlighting.

With respect to rb8-trepanning prerequisites, I tried to use minimum requirements. So the older linecache will work even though the newer one is needed syntax highlighting. LIkewise, coderay is not required. I should have added a prerequisite for ruby-debug-base or ruby-debug-base19, but I forgot.

For tab completion you may need a new enough Readline. MRI 1.8.7's is not new enough to support tab completion. So there is the Pure Ruby rb-readline gem, version 0.40,  which has some of the needed fixes. 

Sorry this is long. I hope I answered your question in this jumble. If not, ask again.
Reply all
Reply to author
Forward
0 new messages