Fix ecl_eval to not have quotes by default.

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.)
This commit is contained in:
Philipp Marek 2014-02-27 20:33:11 +01:00
parent 3afe5932f4
commit 1e2fc6ed3b
2 changed files with 11 additions and 1 deletions

View 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:

View 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