blob: 180edd27277604cd9ab516137d98badf8de7f56d [file] [log] [blame]
mostang.com!davidm594e7eb2003-03-28 07:43:22 +00001-*- mode: Outline -*-
mostang.com!davidm7fbfe0a2002-02-15 23:22:05 +00002
hp.com!davidmdef37e72005-05-03 09:13:17 +00003This is version 0.99 of the unwind library. This library supports
4several architecture/operating-system combinations:
mostang.com!davidm7fbfe0a2002-02-15 23:22:05 +00005
hp.com!davidmdef37e72005-05-03 09:13:17 +00006 Linux/IA-64: Fully tested and supported.
7 Linux/x86-64: Works well.
8 Linux/x86: Works well, but C library is missing some unwind-info.
9 Linux/PARISC: Works well, but C library missing unwind-info.
10 HP-UX/IA-64: Mostly works but known to have some serious limitations.
David Mosberger-Tang955d1272007-08-06 20:26:50 -060011 Linux/PPC64: Newly added.
(none)!davidme9892bb2004-04-23 01:32:43 +000012
(none)!davidme9892bb2004-04-23 01:32:43 +000013
mostang.com!davidm594e7eb2003-03-28 07:43:22 +000014* General Build Instructions
15
16In general, this library can be built and installed with the following
17commands:
mostang.com!davidm7fbfe0a2002-02-15 23:22:05 +000018
mostang.com!davidm354f1c72002-02-23 20:27:03 +000019 $ ./configure
mostang.com!davidm7fbfe0a2002-02-15 23:22:05 +000020 $ make
21 $ make install prefix=PREFIX
22
mostang.com!davidm354f1c72002-02-23 20:27:03 +000023where PREFIX is the installation prefix. By default, a prefix of
24/usr/local is used, such that libunwind.a is installed in
25/usr/local/lib and unwind.h is installed in /usr/local/include. For
26testing, you may want to use a prefix of /usr/local instead.
mostang.com!davidm7fbfe0a2002-02-15 23:22:05 +000027
hp.com!davidm3f9c0bc2003-09-24 21:51:53 +000028
hp.com!davidmef00f952003-11-27 07:17:47 +000029* Building with Intel compiler
30
hp.com!davidm75b67192004-10-15 13:37:27 +000031** Version 8 and later
32
33Starting with version 8, the preferred name for the IA-64 Intel
34compiler is "icc" (same name as on x86). Thus, the configure-line
35should look like this:
36
37 $ ./configure CC=icc CFLAGS="-g -O3 -ip" CXX=icc CCAS=gcc CCASFLAGS=-g \
38 LDFLAGS="-L$PWD/src/.libs"
39
hp.com!davidmdef37e72005-05-03 09:13:17 +000040
mostang.com!davidm8d057cb2003-04-03 07:59:15 +000041* Building on HP-UX
42
43For the time being, libunwind must be built with GCC on HP-UX.
mostang.com!davidmf2b40602004-05-04 22:24:50 +000044
45libunwind should be configured and installed on HP-UX like this:
46
47 $ ./configure CFLAGS="-g -O2 -mlp64" CXXFLAGS="-g -O2 -mlp64"
48
49Caveat: Unwinding of 32-bit (ILP32) binaries is not supported
50 at the moment.
51
52** Workaround for older versions of GCC
53
54GCC v3.0 and GCC v3.2 ship with a bad version of sys/types.h. The
55workaround is to issue the following commands before running
56"configure":
mostang.com!davidm8d057cb2003-04-03 07:59:15 +000057
58 $ mkdir $top_dir/include/sys
59 $ cp /usr/include/sys/types.h $top_dir/include/sys
60
mostang.com!davidmf2b40602004-05-04 22:24:50 +000061GCC v3.3.2 or later have been fixed and do not require this
62workaround.
hp.com!davidmef00f952003-11-27 07:17:47 +000063
Jose Flavio Aguilar Paulino3e245812007-08-24 10:54:00 -060064* Building for PowerPC64 / Linux
65
66For building for power64 you should use:
67
68 $ ./configure CFLAGS="-g -O2 -m64" CXXFLAGS="-g -O2 -m64"
69
70If your power support altivec registers:
71 $ ./configure CFLAGS="-g -O2 -m64 -maltivec" CXXFLAGS="-g -O2 -m64 -maltivec"
72
73To check if your processor has support for vector registers (altivec):
74 cat /proc/cpuinfo | grep altivec
75and should have something like this:
76 cpu : PPC970, altivec supported
77
78If libunwind seems to not work (backtracing failing), try to compile
79it with -O0, without optimizations. There are some compiler problems
80depending on the version of your gcc.
81
hp.com!davidmdef37e72005-05-03 09:13:17 +000082
mostang.com!davidm594e7eb2003-03-28 07:43:22 +000083* Regression Testing
84
85After building the library, you can run a set of regression tests with:
86
87 $ make check
88
hp.com!davidmef00f952003-11-27 07:17:47 +000089** Expected results on IA-64 Linux
90
hp.com!davidmb8e952c2003-11-19 23:15:58 +000091Unless you have a very recent C library and compiler installed, it is
hp.com!davidmef00f952003-11-27 07:17:47 +000092currently expected to have the following tests fail on IA-64 Linux:
mostang.com!davidm594e7eb2003-03-28 07:43:22 +000093
hp.com!davidmb8e952c2003-11-19 23:15:58 +000094 Gtest-init (should pass starting with glibc-2.3.x/gcc-3.4)
95 Ltest-init (should pass starting with glibc-2.3.x/gcc-3.4)
96 test-ptrace (should pass starting with glibc-2.3.x/gcc-3.4)
97 run-ia64-test-dyn1 (should pass starting with glibc-2.3.x)
98
99This does not mean that libunwind cannot be used with older compilers
100or C libraries, it just means that for certain corner cases, unwinding
101will fail. Since they're corner cases, it is not likely for
102applications to trigger them.
mostang.com!davidm594e7eb2003-03-28 07:43:22 +0000103
hp.com!davidm75b67192004-10-15 13:37:27 +0000104Note: If you get lots of errors in Gia64-test-nat and Lia64-test-nat, it's
105 almost certainly a sign of an old assembler. The GNU assembler used
106 to encode previous-stack-pointer-relative offsets incorrectly.
107 This bug was fixed on 21-Sep-2004 so any later assembler will be
108 fine.
109
hp.com!davidmef00f952003-11-27 07:17:47 +0000110** Expected results on x86 Linux
111
112The following tests are expected to fail on x86 Linux:
113
David Mosberger-Tang955d1272007-08-06 20:26:50 -0600114 Gtest-resume-sig (fails to get SIGUSR2)
115 Ltest-resume-sig (likewise)
hp.com!davidmdef37e72005-05-03 09:13:17 +0000116 Gtest-dyn1 (no dynamic unwind info support yet)
117 Ltest-dyn1 (no dynamic unwind info support yet)
118 test-setjmp (longjmp() not implemented yet)
119 run-check-namespace (no _Ux86_getcontext yet)
David Mosberger-Tang955d1272007-08-06 20:26:50 -0600120 test-ptrace
hp.com!davidmdef37e72005-05-03 09:13:17 +0000121
122** Expected results on x86-64 Linux
123
124The following tests are expected to fail on x86-64 Linux:
125
126 Gtest-dyn1 (no dynamic unwind info support yet)
127 Ltest-dyn1 (no dynamic unwind info support yet)
128 Gtest-init (see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18743)
129 Ltest-init (likewise)
130 test-async-sig (crashes due to bad unwind-info?)
131 test-setjmp (longjmp() not implemented yet)
132 run-check-namespace (no _Ux86_64_getcontext yet)
133 run-ptrace-mapper (??? investigate)
134 run-ptrace-misc (see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18748
135 and http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18749)
136
137** Expected results on PARISC Linux
138
139Caveat: GCC v3.4 or newer is needed on PA-RISC Linux. Earlier
140versions of the compiler failed to generate the exception-handling
141program header (GNU_EH_FRAME) needed for unwinding.
142
143The following tests are expected to fail on x86-64 Linux:
144
145 Gtest-bt (backtrace truncated at kill() due to lack of unwind-info)
146 Ltest-bt (likewise)
147 Gtest-resume-sig (Gresume.c:my_rt_sigreturn() is wrong somehow)
148 Ltest-resume-sig (likewise)
149 Gtest-init (likewise)
150 Ltest-init (likewise)
151 Gtest-dyn1 (no dynamic unwind info support yet)
152 Ltest-dyn1 (no dynamic unwind info support yet)
153 test-setjmp (longjmp() not implemented yet)
154 run-check-namespace (toolchain doesn't support HIDDEN yet)
hp.com!davidmef00f952003-11-27 07:17:47 +0000155
156** Expected results on HP-UX
157
mostang.com!davidmf2b40602004-05-04 22:24:50 +0000158"make check" is currently unsupported for HP-UX. You can try to run
159it, but most tests will fail (and some may fail to terminate). The
160only test programs that are known to work at this time are:
161
162 tests/bt
163 tests/Gperf-simple
164 tests/test-proc-info
165 tests/test-static-link
166 tests/Gtest-init
167 tests/Ltest-init
168 tests/Gtest-resume-sig
169 tests/Ltest-resume-sig
hp.com!davidmef00f952003-11-27 07:17:47 +0000170
Jose Flavio Aguilar Paulino32e21872007-08-27 09:11:37 -0600171** Expected results on PPC64 Linux
172
173"make check" should run with no more than 10 out of 24 tests failed.
174
175
mostang.com!davidm065d4552004-01-21 06:36:35 +0000176* Performance Testing
177
178This distribution includes a few simple performance tests which give
179some idea of the basic cost of various libunwind operations. After
180building the library, you can run these tests with the following
181commands:
182
183 $ cd tests
184 $ make perf
185
mostang.com!davidm594e7eb2003-03-28 07:43:22 +0000186* Contacting the Developers
187
mostang.com!davidm7fbfe0a2002-02-15 23:22:05 +0000188Please direct all questions regarding this library to:
189
David Mosberger-Tang87247222007-10-15 17:48:26 -0600190 libunwind-devel@nongnu.org
mostang.com!davidm7fbfe0a2002-02-15 23:22:05 +0000191
David Mosberger-Tang87247222007-10-15 17:48:26 -0600192You can do this by sending a mail to libunwind-request@nongnu.org with
193a body of:
mostang.com!davidm7fbfe0a2002-02-15 23:22:05 +0000194
David Mosberger-Tang87247222007-10-15 17:48:26 -0600195 subscribe libunwind-devel
mostang.com!davidm7fbfe0a2002-02-15 23:22:05 +0000196
David Mosberger-Tang87247222007-10-15 17:48:26 -0600197or you can subscribe and manage your subscription via the
198web-interface at:
199
200 https://savannah.nongnu.org/mail/?group=libunwind