Created
August 16, 2012 23:47
-
-
Save zhaocai/3374587 to your computer and use it in GitHub Desktop.
vdebug patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/rubylib/rdbgp/commands/context.rb b/rubylib/rdbgp/commands/context.rb | |
index 000869c..7a28b45 100644 | |
--- a/rubylib/rdbgp/commands/context.rb | |
+++ b/rubylib/rdbgp/commands/context.rb | |
@@ -41,6 +41,7 @@ module Debugger | |
sc = @state.context | |
propInfo = processor.propInfo | |
stackDepth = get_adjusted_stack_depth(processor, stackDepth) | |
+ processor.logger.debug("Adjusted stack depth: " + stackDepth.to_s) | |
the_binding = sc.frame_binding(stackDepth) | |
sorted = false | |
vars = {} | |
@@ -85,12 +86,16 @@ module Debugger | |
namesAndValues = [] | |
names.sort! unless sorted | |
names.each {|name| | |
- val = eval(name, the_binding) | |
+ s_name = name.inspect | |
+ if s_name[0] == ":" | |
+ s_name = s_name[1..-1] | |
+ end | |
+ val = eval(s_name, the_binding) | |
#XXX Use debug_log_eval | |
#val = debug_log_eval(name, the_binding) | |
if !val.nil? && (val.to_s.length > 0 || | |
val.instance_variables.length > 0) | |
- namesAndValues << [name, val] | |
+ namesAndValues << [s_name, val] | |
end | |
} | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment