Mario Scalas wrote:

HI Markus, Matthias
My patch command says that the patch is malformed at line 10 :S
It seems as if two lines got joined accidently. I've created the patch on eclipseDebug.rb with Team->create patch..., copy to clipboard and then unchecked the two options und used unified format. Therefore you should be able to apply it with Team->apply patch on the same file. OK, you don't have to use Eclipse necessarily, command line patch should work, too.

What I've done - I've replaced Matthias-patched eclipseDebug.rb - I've hand performed the patching (just replaced the statements with the new one by copy-n-paste)
- Run the usual test program and tried to ispect the variable

Result:
- No way :( I enabled debug logging on console and I got this: http://cdg.di.uniba.it/~mscalas/eclipse_ruby_inspect.png . Perhaps those ".." in objectId="0x..fdbec800c" matter?
With the + option for %x negative and positive values should be rendered correctly.


Index: eclipseDebug.rb
===================================================================
RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.launching/ruby/eclipseDebug.rb,v
retrieving revision 1.17
diff -u -r1.17 eclipseDebug.rb
--- eclipseDebug.rb    13 Oct 2005 19:43:30 -0000    1.17
+++ eclipseDebug.rb    8 Jan 2006 15:05:43 -0000
@@ -72,7 +72,7 @@
        valueString.slice!(1..(valueString.length)-2)
end end - out("<variable name=\"%s\" kind=\"%s\" value=\"%s\" type=\"%s\" hasChildren=\"%s\" objectId=\"%s\"/>", CGI.escapeHTML(name), kind, CGI.escapeHTML(valueString), value.class(), hasChildren, value.respond_to?(:object_id) ? value.object_id : value.id) + out("<variable name=\"%s\" kind=\"%s\" value=\"%s\" type=\"%s\" hasChildren=\"%s\" objectId=\"%#+x\"/>", CGI.escapeHTML(name), kind, CGI.escapeHTML(valueString), value.class(), hasChildren, value.respond_to?(:object_id) ? value.object_id : value.id)
  end

  def printBreakpoint(n, debugFuncName, file, pos)
@@ -395,7 +395,7 @@
          var_list([], binding, 'local')
end - when /^\s*i(?:nstance)?\s*(\d+)?\s+(\d+)?/ + when /^\s*i(?:nstance)?\s*(\d+)?\s+((?:[\\+-]0x)?[\dabcdef]+)?/ new_binding = getBinding($1)
        if new_binding then
          binding = new_binding
@@ -403,7 +403,7 @@
        begin
          @printer.printXml("<variables>")
          if $2 then
-            obj = ObjectSpace._id2ref($2.to_i)
+            obj = ObjectSpace._id2ref($2.hex)
            if (!obj) then
              @printer.debug("unknown object id : %s", $2)
            end



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Rubyeclipse-development mailing list
Rubyeclipse-development@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rubyeclipse-development

Reply via email to