gluster-devel
[Top][All Lists]
Advanced

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

Re: [Gluster-devel] Embedding debug symbols in glusterfsd


From: Lluís Pàmies i Juárez
Subject: Re: [Gluster-devel] Embedding debug symbols in glusterfsd
Date: Tue, 4 Feb 2014 15:29:00 -0800

Jeff,

Unfortunately, even with the "--enable-debug=yes", "make install" does not include the debugging symbols for neither libraries (xlators) nor binaries. I realized that the problem is with the "install" command that strips both binaries and libraries even when the flag "-s" is not set. At least this is the behavior in my Arch Linux setting.

I found a solution which is to define my own PKGBUILD file (to build arch linux installation packages), with "options=(debug !stripe)". Somehow the "!stripe" must be setting some environment variable to force the "install" command to not stripe things. After installing the generated package with "pacman -U" I have binaries and libraries with their own debugging symbols ;). In your case you might be able to do the same with the rpmbuild [1].

[1] https://groups.google.com/forum/#!topic/linux.redhat.rpm/TKz6JZHK0ck

Thank you,





On Tue, Feb 4, 2014 at 2:44 PM, Jeff Darcy <address@hidden> wrote:

I also tried with "export enable_debug=yes" as suggested in [1] without success.

At the end of ./configure it indeed says "Enable Debug: yes", and when doing "make -n" I can see that the correct flags "-g -O0" are passed to gcc. My guess is that at some point of "make install" the debug symbols are striped, but I don't see where.

Can anyone guide me on how to embed the debug symbols in the gluster daemon?

As the cited email mentions, executables seem to get stripped even with
enable_debug set, but libraries (including translators) should be fine. I've
been building that way (using rpmbuild) and successfully debugging translators
all day today. On the very rare occasions that I want to debug the
gluster{d,fs,fsd,shd} executable itself, I grab the unstripped version from
here:

/rpmbuild/BUILD/glusterfs-3git/glusterfsd/src/.libs/glusterfsd

In the past I've used some other tricks to disable the stripping phase of
rpmbuild, but it seems like those wouldn't apply if you're just doing "make
install" instead. In fact, I'm not even sure why things would get stripped
that way, but our build process is so screwy I only look at it when something
breaks.




--
Lluís Pàmies i Juárez
http://lluis.pamies.cat

reply via email to

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