Fix ecl_eval to not have quotes by default.
authorPhilipp Marek <philipp@marek.priv.at>
Thu, 27 Feb 2014 19:33:11 +0000 (20:33 +0100)
committerPhilipp Marek <philipp@marek.priv.at>
Thu, 27 Feb 2014 19:33:11 +0000 (20:33 +0100)
When "$arg0 $arg1 ..." is specified, GDB requires that many arguments;
and with "$arg0" it's not possible to give expressions that include
spaces, because they get cut _before_ ecl_eval sees them.
(And having "$arg0" _and_ giving quotes doesn't work as we'd like to, too.)

README.1st
src/util/gdbinit

index 0f6094e..4219766 100644 (file)
@@ -13,6 +13,16 @@ This is a GDB function that prints a 'cl_object' human-readably:
     $39 = t_fixnum
     $40 = (ecl_base_char *) 0x42b4000 "10652336"
 
+And another that helps to see a thread state:
+
+    (gdb) ecl_eval "cl:*package*"
+
+Please note that double quotes have to be escaped:
+
+    (gdb) ecl_eval "(concatenate 'string \"a\" \"b\")"
+
+Both will give a string with "readable" content, and a pretty-printed one.
+
 
 
 Using VIM:
index 58e259d..668c8a6 100644 (file)
@@ -43,7 +43,7 @@ end
 
 
 define ecl_eval
-       set $cl_debug_str = ecl_make_simple_base_string( "$arg0", -1)
+       set $cl_debug_str = ecl_make_simple_base_string( $arg0, -1)
        set $cl_debug_stream = ecl_make_string_input_stream( $cl_debug_str, 0, ((struct ecl_base_string*)$cl_debug_str)->fillp)
        set $cl_debug_form = cl_read(1, $cl_debug_stream)
        disable breakpoints