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


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


---------------------------+--------------------------------------------------
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)