Merge: Robust debug
authorJean Privat <jean@pryen.org>
Fri, 17 Oct 2014 00:21:34 +0000 (20:21 -0400)
committerJean Privat <jean@pryen.org>
Fri, 17 Oct 2014 00:21:34 +0000 (20:21 -0400)
First pass on the debugger, simple cleanup/fixes that might be helpful for the end-user.

Addresses some of the issues mentioned in #742.

Pull-Request: #822
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>
Reviewed-by: Jean Privat <jean@pryen.org>

1  2 
src/interpreter/debugger.nit

@@@ -570,11 -630,17 +617,15 @@@ class Debugge
        # Prints the demanded variable in the command
        #
        # The name of the variable in in position 1 of the array 'parts_of_command'
-       fun print_command(parts_of_command: Array[String])
+       fun print_command(parts: Array[String])
        do
-               if parts_of_command[1] == "*" then
+               if parts.length != 2 then
+                       bad_command(parts.join(" "))
+                       return
+               end
+               if parts[1] == "*" then
                        var map_of_instances = frame.map
  
 -                      var keys = map_of_instances.iterator
 -
                        var self_var = seek_variable("self", frame)
                        print "self: {self_var.to_s}"