lilypond-devel
[Top][All Lists]
Advanced

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

Re: how to build lilypond in debug mode?


From: Ian Hulin
Subject: Re: how to build lilypond in debug mode?
Date: Sun, 28 Jul 2013 01:31:55 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130623 Thunderbird/17.0.7

Hi Frédéric,
I think David K's already said it's a gdb "featurette", aka bug,
reported as gdb bug 15415.  If you're feeling brave, you could
download the gdb 7.6 sources and re-build gdb with the following patch
submitted by Florian Baumert:

diff -uNr gdb-7.6.original/gdb/utils.c gdb-7.6.patched/gdb/utils.c
--- gdb-7.6.original/gdb/utils.c        2013-03-22 21:41:45.000000000 +0100
+++ gdb-7.6.patched/gdb/utils.c 2013-07-17 14:12:05.000000000 +0200
@@ -3208,7 +3208,15 @@
 #  define USE_REALPATH
 # endif
 # if defined (USE_REALPATH)
-    const char *rp = realpath (filename, buf);
+    const char *rp;
+
+    if (readlink(filename, buf, sizeof(buf)) > 0)
+    {
+        return xstrdup(filename);
+    }
+
+
+    rp = realpath (filename, buf);

     if (rp == NULL)
       rp = filename;

-------------------------------------------------------

configure gdb, make the above changes to utils.c in the gdb sources,
use make to rebuild and install gdb.

Otherwise work round the gdb bug by using something like this when
debugging a lilypond image with gdb:

(gdb) break parse_argv
(gdb) commands
> print
argv[0]="home/fred/lilypond/build-2013-07-25_11-30/out/bin/lilypond"
> continue end
(gdb) run toto2.ly

Cheers,
Ian

On 26/07/13 06:33, Frédéric Bron wrote:
> Hi, I would like to run lilypond in gdb to understand what happens
> when using ties. How can I build lilypond for that? When I run
> configure --help, it says it is built with debug info by default: 
> "--enable-debugging      compile with debugging info. Default: on" 
> But when I run gdb, I get some strange errors (see below). 
> Fr�d�ric
> 
> gdb) run toto2.ly Starting program: 
> /home/fred/lilypond/build-2013-07-25_11-30/lily/out/lilypond
> toto2.ly Traceback (most recent call last): File
> "/usr/share/gdb/auto-load/usr/lib64/libgobject-2.0.so.0.3600.3-gdb.py",
>
> 
line 9, in <module>
> from gobject import register File
> "/usr/share/glib-2.0/gdb/gobject.py", line 3, in <module> import
> gdb.backtrace ImportError: No module named backtrace Traceback
> (most recent call last): File
> "/usr/share/gdb/auto-load/usr/lib64/libgobject-2.0.so.0.3600.3-gdb.py",
>
> 
line 9, in <module>
> from gobject import register File
> "/usr/share/glib-2.0/gdb/gobject.py", line 3, in <module> import
> gdb.backtrace ImportError: No module named backtrace [Thread
> debugging using libthread_db enabled] Using host libthread_db
> library "/lib64/libthread_db.so.1". Missing separate debuginfo for
> /lib64/libgraphite2.so.3 Try: yum --disablerepo='*'
> --enablerepo='*debug*' install 
> /usr/lib/debug/.build-id/a1/aa32c91bc181cb69ebc81bbfd03a1349ea4e33.debug
>
> 
GNU LilyPond 2.17.23
> warning: not relocating, no 2.17.23/ or current/ found under 
> /home/fred/lilypond/build-2013-07-25_11-30/lily/share/lilypond/ 
> ERROR: In procedure primitive-load-path: ERROR: Unable to find file
> "lily.scm" in load path [Inferior 1 (process 9056) exited with code
> 01]
<snip>






reply via email to

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