blob: cf98f4f565554f75cc371924cd608225625d576a [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.
Konstantin Belousov71699582010-04-04 12:03:15 +030012 FreeBSD/i386: Newly added.
13 FreeBSD/x86-64: Newly added (FreeBSD architecture is known as amd64).
(none)!davidme9892bb2004-04-23 01:32:43 +000014
(none)!davidme9892bb2004-04-23 01:32:43 +000015
mostang.com!davidm594e7eb2003-03-28 07:43:22 +000016* General Build Instructions
17
18In general, this library can be built and installed with the following
19commands:
mostang.com!davidm7fbfe0a2002-02-15 23:22:05 +000020
Arun Sharma46ea1062010-03-02 21:18:57 -080021 $ autoreconf -i # Needed only for building from git. Depends on libtool.
mostang.com!davidm354f1c72002-02-23 20:27:03 +000022 $ ./configure
mostang.com!davidm7fbfe0a2002-02-15 23:22:05 +000023 $ make
24 $ make install prefix=PREFIX
25
mostang.com!davidm354f1c72002-02-23 20:27:03 +000026where PREFIX is the installation prefix. By default, a prefix of
27/usr/local is used, such that libunwind.a is installed in
28/usr/local/lib and unwind.h is installed in /usr/local/include. For
29testing, you may want to use a prefix of /usr/local instead.
mostang.com!davidm7fbfe0a2002-02-15 23:22:05 +000030
hp.com!davidm3f9c0bc2003-09-24 21:51:53 +000031
hp.com!davidmef00f952003-11-27 07:17:47 +000032* Building with Intel compiler
33
hp.com!davidm75b67192004-10-15 13:37:27 +000034** Version 8 and later
35
36Starting with version 8, the preferred name for the IA-64 Intel
37compiler is "icc" (same name as on x86). Thus, the configure-line
38should look like this:
39
40 $ ./configure CC=icc CFLAGS="-g -O3 -ip" CXX=icc CCAS=gcc CCASFLAGS=-g \
41 LDFLAGS="-L$PWD/src/.libs"
42
hp.com!davidmdef37e72005-05-03 09:13:17 +000043
mostang.com!davidm8d057cb2003-04-03 07:59:15 +000044* Building on HP-UX
45
46For the time being, libunwind must be built with GCC on HP-UX.
mostang.com!davidmf2b40602004-05-04 22:24:50 +000047
48libunwind should be configured and installed on HP-UX like this:
49
50 $ ./configure CFLAGS="-g -O2 -mlp64" CXXFLAGS="-g -O2 -mlp64"
51
52Caveat: Unwinding of 32-bit (ILP32) binaries is not supported
53 at the moment.
54
55** Workaround for older versions of GCC
56
57GCC v3.0 and GCC v3.2 ship with a bad version of sys/types.h. The
58workaround is to issue the following commands before running
59"configure":
mostang.com!davidm8d057cb2003-04-03 07:59:15 +000060
61 $ mkdir $top_dir/include/sys
62 $ cp /usr/include/sys/types.h $top_dir/include/sys
63
mostang.com!davidmf2b40602004-05-04 22:24:50 +000064GCC v3.3.2 or later have been fixed and do not require this
65workaround.
hp.com!davidmef00f952003-11-27 07:17:47 +000066
Jose Flavio Aguilar Paulino3e245812007-08-24 10:54:00 -060067* Building for PowerPC64 / Linux
68
69For building for power64 you should use:
70
71 $ ./configure CFLAGS="-g -O2 -m64" CXXFLAGS="-g -O2 -m64"
72
73If your power support altivec registers:
74 $ ./configure CFLAGS="-g -O2 -m64 -maltivec" CXXFLAGS="-g -O2 -m64 -maltivec"
75
76To check if your processor has support for vector registers (altivec):
77 cat /proc/cpuinfo | grep altivec
78and should have something like this:
79 cpu : PPC970, altivec supported
80
81If libunwind seems to not work (backtracing failing), try to compile
82it with -O0, without optimizations. There are some compiler problems
83depending on the version of your gcc.
84
Konstantin Belousov71699582010-04-04 12:03:15 +030085* Building on FreeBSD
86
87General building instructions apply. To build and execute several tests,
88you need libexecinfo library available in ports as devel/libexecinfo.
89
Konstantin Belousov601919e2010-04-04 12:39:16 +030090Development of the port was done of FreeBSD 8.0-STABLE. The library
91was build with the system compiler that is modified version of gcc 4.2.1,
92as well as the gcc 4.4.3.
hp.com!davidmdef37e72005-05-03 09:13:17 +000093
mostang.com!davidm594e7eb2003-03-28 07:43:22 +000094* Regression Testing
95
96After building the library, you can run a set of regression tests with:
97
98 $ make check
99
hp.com!davidmef00f952003-11-27 07:17:47 +0000100** Expected results on IA-64 Linux
101
hp.com!davidmb8e952c2003-11-19 23:15:58 +0000102Unless you have a very recent C library and compiler installed, it is
hp.com!davidmef00f952003-11-27 07:17:47 +0000103currently expected to have the following tests fail on IA-64 Linux:
mostang.com!davidm594e7eb2003-03-28 07:43:22 +0000104
hp.com!davidmb8e952c2003-11-19 23:15:58 +0000105 Gtest-init (should pass starting with glibc-2.3.x/gcc-3.4)
106 Ltest-init (should pass starting with glibc-2.3.x/gcc-3.4)
107 test-ptrace (should pass starting with glibc-2.3.x/gcc-3.4)
108 run-ia64-test-dyn1 (should pass starting with glibc-2.3.x)
109
110This does not mean that libunwind cannot be used with older compilers
111or C libraries, it just means that for certain corner cases, unwinding
112will fail. Since they're corner cases, it is not likely for
113applications to trigger them.
mostang.com!davidm594e7eb2003-03-28 07:43:22 +0000114
hp.com!davidm75b67192004-10-15 13:37:27 +0000115Note: If you get lots of errors in Gia64-test-nat and Lia64-test-nat, it's
116 almost certainly a sign of an old assembler. The GNU assembler used
117 to encode previous-stack-pointer-relative offsets incorrectly.
118 This bug was fixed on 21-Sep-2004 so any later assembler will be
119 fine.
120
hp.com!davidmef00f952003-11-27 07:17:47 +0000121** Expected results on x86 Linux
122
123The following tests are expected to fail on x86 Linux:
124
David Mosberger-Tang955d1272007-08-06 20:26:50 -0600125 Gtest-resume-sig (fails to get SIGUSR2)
126 Ltest-resume-sig (likewise)
hp.com!davidmdef37e72005-05-03 09:13:17 +0000127 Gtest-dyn1 (no dynamic unwind info support yet)
128 Ltest-dyn1 (no dynamic unwind info support yet)
129 test-setjmp (longjmp() not implemented yet)
130 run-check-namespace (no _Ux86_getcontext yet)
David Mosberger-Tang955d1272007-08-06 20:26:50 -0600131 test-ptrace
hp.com!davidmdef37e72005-05-03 09:13:17 +0000132
133** Expected results on x86-64 Linux
134
135The following tests are expected to fail on x86-64 Linux:
136
137 Gtest-dyn1 (no dynamic unwind info support yet)
138 Ltest-dyn1 (no dynamic unwind info support yet)
139 Gtest-init (see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18743)
140 Ltest-init (likewise)
141 test-async-sig (crashes due to bad unwind-info?)
142 test-setjmp (longjmp() not implemented yet)
143 run-check-namespace (no _Ux86_64_getcontext yet)
144 run-ptrace-mapper (??? investigate)
145 run-ptrace-misc (see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18748
146 and http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18749)
147
148** Expected results on PARISC Linux
149
150Caveat: GCC v3.4 or newer is needed on PA-RISC Linux. Earlier
151versions of the compiler failed to generate the exception-handling
152program header (GNU_EH_FRAME) needed for unwinding.
153
154The following tests are expected to fail on x86-64 Linux:
155
156 Gtest-bt (backtrace truncated at kill() due to lack of unwind-info)
157 Ltest-bt (likewise)
158 Gtest-resume-sig (Gresume.c:my_rt_sigreturn() is wrong somehow)
159 Ltest-resume-sig (likewise)
160 Gtest-init (likewise)
161 Ltest-init (likewise)
162 Gtest-dyn1 (no dynamic unwind info support yet)
163 Ltest-dyn1 (no dynamic unwind info support yet)
164 test-setjmp (longjmp() not implemented yet)
165 run-check-namespace (toolchain doesn't support HIDDEN yet)
hp.com!davidmef00f952003-11-27 07:17:47 +0000166
167** Expected results on HP-UX
168
mostang.com!davidmf2b40602004-05-04 22:24:50 +0000169"make check" is currently unsupported for HP-UX. You can try to run
170it, but most tests will fail (and some may fail to terminate). The
171only test programs that are known to work at this time are:
172
173 tests/bt
174 tests/Gperf-simple
175 tests/test-proc-info
176 tests/test-static-link
177 tests/Gtest-init
178 tests/Ltest-init
179 tests/Gtest-resume-sig
180 tests/Ltest-resume-sig
hp.com!davidmef00f952003-11-27 07:17:47 +0000181
Jose Flavio Aguilar Paulino32e21872007-08-27 09:11:37 -0600182** Expected results on PPC64 Linux
183
184"make check" should run with no more than 10 out of 24 tests failed.
185
186
mostang.com!davidm065d4552004-01-21 06:36:35 +0000187* Performance Testing
188
189This distribution includes a few simple performance tests which give
190some idea of the basic cost of various libunwind operations. After
191building the library, you can run these tests with the following
192commands:
193
194 $ cd tests
195 $ make perf
196
mostang.com!davidm594e7eb2003-03-28 07:43:22 +0000197* Contacting the Developers
198
mostang.com!davidm7fbfe0a2002-02-15 23:22:05 +0000199Please direct all questions regarding this library to:
200
David Mosberger-Tang87247222007-10-15 17:48:26 -0600201 libunwind-devel@nongnu.org
mostang.com!davidm7fbfe0a2002-02-15 23:22:05 +0000202
David Mosberger-Tang87247222007-10-15 17:48:26 -0600203You can do this by sending a mail to libunwind-request@nongnu.org with
204a body of:
mostang.com!davidm7fbfe0a2002-02-15 23:22:05 +0000205
David Mosberger-Tang87247222007-10-15 17:48:26 -0600206 subscribe libunwind-devel
mostang.com!davidm7fbfe0a2002-02-15 23:22:05 +0000207
David Mosberger-Tang87247222007-10-15 17:48:26 -0600208or you can subscribe and manage your subscription via the
209web-interface at:
210
211 https://savannah.nongnu.org/mail/?group=libunwind