[cairo] Re: Using --sync and gdb to debug X protocol errors in GTK+-based programs

Kristian Høgsberg krh at bitplanet.net
Thu Jun 23 11:58:16 PDT 2005


Carl Worth wrote:
> On Thu, 23 Jun 2005 13:39:54 +1000, Nigel Tao wrote:
> 
>>For the record, (I think that) the --sync is given to the run, not the
>>gdb.
> 
> 
> Drat. You're right. And now I've gone and archived the wrong
> instructions. At least gdb now has the nifty:
> 
> 	Make breakpoint pending on future shared library load? (y or [n]) y
> 
> thing.

These days gdb also has the nifty --args argument which specifies that
the arguments given to gdb after the program filename are arguments for
the program being debugged, not gdb.  For example:

	gdb --args /bin/ls -l
	(gdb) run
	...
	total 2384
	-rw-rw-r--  1 krh krh   1525 Jan 27 14:35 acinclude.m4
	-rw-rw-r--  1 krh krh 252975 Jun 21 18:51 aclocal.m4

Kristian




More information about the cairo mailing list