lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Debugging hints


From: Han-Wen Nienhuys
Subject: Re: Debugging hints
Date: Fri, 25 Nov 2005 22:03:05 +0100
User-agent: Mozilla Thunderbird 1.0.7-1.1.fc4 (X11/20050929)

Michael Welsh Duggan wrote:
I am curious as to what techniques people reading this list use for
debugging lilypond.  It can be quite tricky, since data objects are
often intricate mixes between c++ and Guile objects.  I have been
debugging mostly in gdb, and extensively using ly_display_scm to peer
into the Guile objects.  Any suggestions, tips, tricks, war stories,
or gdbinit files from any other LilyPond debuggers?

I use ly_display_scm in gdb mostly. another nicety is that you can call operator[]() directly for Array and Link_array templates. The other general principle is to reduce any .ly file really down to the bare bones. LilyPond is written so generically that most code is passed over many times unless you completely strip a file.

Here is my .gdbinit

file lily/out/lilypond
b scm_error
b programming_error
b Grob::programming_error

define ps
  print ly_display_scm($arg0)
end
define pgrob
  print ly_display_scm($arg0->self_scm_)
  print ly_display_scm($arg0->mutable_property_alist_)
  print ly_display_scm($arg0->immutable_property_alist_)
  print ly_display_scm($arg0->object_alist_)
end
define pmusic
  print ly_display_scm($arg0->self_scm_)
  print ly_display_scm($arg0->mutable_property_alist_)
  print ly_display_scm($arg0->immutable_property_alist_)
end


--
 Han-Wen Nienhuys - address@hidden - http://www.xs4all.nl/~hanwen




reply via email to

[Prev in Thread] Current Thread [Next in Thread]