This is the mail archive of the guile@cygnus.com mailing list for the guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Module editing; debugging with gdb


Christian Lynbech <chl@tbit.dk> writes:

> >>>>> "Greg" == Greg Badros <gjb@cs.washington.edu> writes:
> 
> Greg> 2) Debugging scheme objects from within GDB is pretty painful.  I see
> Greg> the gdbint files under libguile, but am not sure how to use them.  Could 
> Greg> someone with experience debugging Scheme objects under GDB explain their 
> Greg> setup, techniques, and maybe post example interactions?
> 
> I too had problems with the example gdbinit, but here is one thing I
> got out of it:
> 
> 	define dp
> 	set $gp=gdb_print($arg0)
> 	output gdb_output
> 	echo \n
> 	end
> 	document dp
> 	Executes (display $arg0) to stdout.
> 	end
> 
> I have also found it handy to preprocess a C file (with gcc -E) to get
> the macros unpacked, when I needed to understand or replay some of the
> type/tag bit extraction stuff. When having the expanded form, you may
> give i directly to `print' to see the result.

Thanks (yet again!) -- I'll have to try this and look at the gdbint
files more carefully.

Greg