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


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'.


---------------------------+--------------------------------------------------
Christian Lynbech          | Telebit Communications A/S                       
Fax:   +45 8628 8186       | Fabrik 11, DK-8260 Viby J
Phone: +45 8628 8177 + 28  | email: chl@tbit.dk --- URL: http://www.telebit.dk
---------------------------+--------------------------------------------------
Hit the philistines three times over the head with the Elisp reference manual.
                                        - petonic@hal.com (Michael A. Petonic)