| 1 |
# |
| 2 |
# Recommended settings for debuggin either ecl_min or ecl. |
| 3 |
# |
| 4 |
delete break |
| 5 |
break cl_cos |
| 6 |
break cl_error |
| 7 |
break cl_cerror |
| 8 |
break CEerror |
| 9 |
break FEerror |
| 10 |
break FEunbound_variable |
| 11 |
break FEundefined_function |
| 12 |
break FEwrong_type_argument |
| 13 |
break FEinvalid_function |
| 14 |
set confirm off |
| 15 |
set print thread-events off |
| 16 |
handle SIGBUS nostop |
| 17 |
handle SIGPWR nostop pass noprint |
| 18 |
handle SIGXCPU nostop pass noprint |
| 19 |
handle EXC_BAD_ACCESS nostop pass noprint |
| 20 |
|
| 21 |
|
| 22 |
macro define NIL (cl_symbols) |
| 23 |
macro define T (cl_symbols+1) |
| 24 |
|
| 25 |
define ecl_print |
| 26 |
set $cl_debug_arg = (long)($arg0) |
| 27 |
print $cl_debug_arg |
| 28 |
set $cl_debug_stream = ecl_make_string_output_stream(4096, 0) |
| 29 |
|
| 30 |
set $cl_debug_imm = 3 & $cl_debug_arg |
| 31 |
set $cl_debug_type = ($cl_debug_imm ? $cl_debug_imm : ((cl_object)$cl_debug_arg)->d.t) |
| 32 |
print (cl_type) $cl_debug_type |
| 33 |
|
| 34 |
# not safe for printing |
| 35 |
if $cl_debug_type > 0 |
| 36 |
set $cl_debug_void = si_write_ugly_object( $cl_debug_arg, $cl_debug_stream) |
| 37 |
print $cl_debug_stream->stream.object0->base_string.self |
| 38 |
|
| 39 |
set $cl_debug_stream->stream.object0->base_string.fillp = 0 |
| 40 |
set $cl_debug_void = ecl_princ( $cl_debug_arg, $cl_debug_stream) |
| 41 |
# ensure string is terminated |
| 42 |
set $cl_debug_stream->stream.object0->base_string.self[$cl_debug_stream->stream.object0->base_string.fillp] = 0 |
| 43 |
print $cl_debug_stream->stream.object0->base_string.self |
| 44 |
end |
| 45 |
end |
| 46 |
|
| 47 |
|
| 48 |
define ecl_eval |
| 49 |
set $cl_debug_str = ecl_make_simple_base_string( $arg0, -1) |
| 50 |
set $cl_debug_stream = ecl_make_string_input_stream( $cl_debug_str, 0, ((struct ecl_base_string*)$cl_debug_str)->fillp) |
| 51 |
set $cl_debug_form = cl_read(1, $cl_debug_stream) |
| 52 |
disable breakpoints |
| 53 |
ecl_print cl_eval($cl_debug_form) |
| 54 |
enable breakpoints |
| 55 |
end |