Convenience function for printing "cl_object"s from GDB.
authorPhilipp Marek <philipp@marek.priv.at>
Wed, 26 Feb 2014 20:15:05 +0000 (21:15 +0100)
committerPhilipp Marek <philipp@marek.priv.at>
Wed, 26 Feb 2014 20:15:05 +0000 (21:15 +0100)
src/util/gdbinit

index 2f31827..5233a8a 100644 (file)
@@ -14,3 +14,21 @@ break FEinvalid_function
 set confirm off
 handle SIGBUS nostop
 handle EXC_BAD_ACCESS nostop pass noprint
+
+
+macro define NIL (cl_symbols)
+macro define T (cl_symbols+1)
+
+define ecl_print
+       set $cl_debug_stream = ecl_make_string_output_stream(4096, 0)
+
+       #set $cl_debug_void = ecl_princ( $arg0, $cl_debug_stream)
+       #print $cl_debug_stream->stream.object0->base_string.self
+       #set $cl_debug_stream->stream.object0->base_string.fillp = 0
+
+       set $cl_debug_imm = 3 & (long)x
+       print (cl_type)($cl_debug_imm ? $cl_debug_imm : x->d.t)
+
+       set $cl_debug_void = si_write_ugly_object( $arg0, $cl_debug_stream)
+       print $cl_debug_stream->stream.object0->base_string.self
+end