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:

> You may want to look into libguile/gdb_interface.h which is where I
> found out about gdb_print. It contains some usefull comments.
> 
> I changed the other functions of the example gdbinit as well, to do
> explicit argument handling, as I did not entirely understand how the
> originals worked. So mine now looks as:
> 
> 	define xcar
> 	set $last=((scm_cell*) $arg0)->car
> 	output $last
> 	echo \n
> 	end
> 	document xcar
> 	Print the CAR of $.
> 	end
> 
> which will return the CAR of an SCM value, saving it in the (gdb)
> variable `last'.

Cool.  Your other snippet has turned out to be incredibly useful, too.
Where, though is the example gdbinit? I can't seem to find it in the
late June snapshot I've been using since then.

Thanks,
Greg