libunwind-devel
[Top][All Lists]
Advanced

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

Re: [libunwind] Basic use of dynamic features?


From: Tommy Hoffner
Subject: Re: [libunwind] Basic use of dynamic features?
Date: Thu, 16 Dec 2004 11:26:19 +0100
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7b) Gecko/20040421

David Mosberger wrote:

On Tue, 14 Dec 2004 17:15:23 +0100, Tommy Hoffner

<address@hidden> said:

  Tommy> Ok, I tried 0.98.3 from debian. Now the UNW_LOCAL_ONLY
  Tommy> doesn't work either :-)

It's good you mentioned Debian!  Your problem is due to a Debian
packaging issue: /usr/lib/libunwind.so.7 is currently being provided
by the libunwind from GCC-3.4, which doesn't support dynamic unwinding
at all.
Hm, I looked around the debian packages, lets see if I got it.
/lib/libunwind.so.7 is provided by the libgcc package (I assume this is
what you mean by "from GCC 3.4"), the libunwind7 package only provides
platformspecific support (i.e. /usr/lib/libunwind-ia64.s0.7) but no
support for dynamic unwindinding.
The libunwind7-dev packages contains libunwind.a which does support
dynamic unwinding (in the sence that it contains _U_dyn_register) but
since there is no way of telling gcc-3.4 not to use /lib/libunwind.so.7
(i.e only link with libunwind.a), the extra functionality in that
library is broken.

So the only way to get support for dynamic unwinding right now is to
force gcc (i.e. libgcc?) to use another libunwind.so.7 that supports
both gcc's "internal" needs as well as mine?


I shall see if we can change this given that it's already causing
grief.
The current dedian packaging mean that the libunwind.a in libunwind7-dev
is fairly uselss (unless you rebuild gcc without the -lunwind in gcc.c
or you avoid using gcc to invoke the linker)


Assuming the libunwind package has been built in /tmp/libunwind, this
works for me:

 $ g++-3.4 -L/tmp/u/src/.libs jitunw.C flush-cache.s -lunwind -o jitunw
 $ LD_LIBRARY_PATH=/tmp/u/src/.libs jitunw
 pagesize 16384
 SUCCESS! (Caught Throw)
Ok, works for me as well.

Of course, the other option is to install the libunwind from the
package.  The only caveat is that you need to make sure it gets
I'm not sure understand. The only package I found that contains
libunwind.so.7 is libgcc1, and that is the crippled one. If you mean
installing one I build myself from source, then ok, that will work.
installed in /lib (with a symlink to /usr/lib).  I'll see about making
this the default.
I was hoping to use debian packages to setup as much as possible of our
environment. Staying with 0.97 (gcc 3.4.2/libgcc1 3.4.2) might be an
option for us for now :-(

/Tommy

        --david


reply via email to

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