blob: 9f03a1830c4249363a9ddc8efe351b62752fbe71 [file] [log] [blame]
mostang.com!davidm594e7eb2003-03-28 07:43:22 +00001-*- mode: Outline -*-
mostang.com!davidm7fbfe0a2002-02-15 23:22:05 +00002
Arun Sharma8ab88632011-08-15 21:02:26 -07003This is version 1.0 of the unwind library. This library supports
hp.com!davidmdef37e72005-05-03 09:13:17 +00004several architecture/operating-system combinations:
mostang.com!davidm7fbfe0a2002-02-15 23:22:05 +00005
hp.com!davidmdef37e72005-05-03 09:13:17 +00006 Linux/x86-64: Works well.
Arun Sharma8ab88632011-08-15 21:02:26 -07007 Linux/x86: Works well.
8 Linux/ARM: Works well.
9 Linux/IA-64: Fully tested and supported.
hp.com!davidmdef37e72005-05-03 09:13:17 +000010 Linux/PARISC: Works well, but C library missing unwind-info.
11 HP-UX/IA-64: Mostly works but known to have some serious limitations.
David Mosberger-Tang955d1272007-08-06 20:26:50 -060012 Linux/PPC64: Newly added.
Konstantin Belousov71699582010-04-04 12:03:15 +030013 FreeBSD/i386: Newly added.
14 FreeBSD/x86-64: Newly added (FreeBSD architecture is known as amd64).
(none)!davidme9892bb2004-04-23 01:32:43 +000015
(none)!davidme9892bb2004-04-23 01:32:43 +000016
mostang.com!davidm594e7eb2003-03-28 07:43:22 +000017* General Build Instructions
18
19In general, this library can be built and installed with the following
20commands:
mostang.com!davidm7fbfe0a2002-02-15 23:22:05 +000021
Arun Sharma46ea1062010-03-02 21:18:57 -080022 $ autoreconf -i # Needed only for building from git. Depends on libtool.
mostang.com!davidm354f1c72002-02-23 20:27:03 +000023 $ ./configure
mostang.com!davidm7fbfe0a2002-02-15 23:22:05 +000024 $ make
25 $ make install prefix=PREFIX
26
mostang.com!davidm354f1c72002-02-23 20:27:03 +000027where PREFIX is the installation prefix. By default, a prefix of
28/usr/local is used, such that libunwind.a is installed in
29/usr/local/lib and unwind.h is installed in /usr/local/include. For
30testing, you may want to use a prefix of /usr/local instead.
mostang.com!davidm7fbfe0a2002-02-15 23:22:05 +000031
hp.com!davidm3f9c0bc2003-09-24 21:51:53 +000032
hp.com!davidmef00f952003-11-27 07:17:47 +000033* Building with Intel compiler
34
hp.com!davidm75b67192004-10-15 13:37:27 +000035** Version 8 and later
36
37Starting with version 8, the preferred name for the IA-64 Intel
38compiler is "icc" (same name as on x86). Thus, the configure-line
39should look like this:
40
41 $ ./configure CC=icc CFLAGS="-g -O3 -ip" CXX=icc CCAS=gcc CCASFLAGS=-g \
42 LDFLAGS="-L$PWD/src/.libs"
43
hp.com!davidmdef37e72005-05-03 09:13:17 +000044
mostang.com!davidm8d057cb2003-04-03 07:59:15 +000045* Building on HP-UX
46
47For the time being, libunwind must be built with GCC on HP-UX.
mostang.com!davidmf2b40602004-05-04 22:24:50 +000048
49libunwind should be configured and installed on HP-UX like this:
50
51 $ ./configure CFLAGS="-g -O2 -mlp64" CXXFLAGS="-g -O2 -mlp64"
52
53Caveat: Unwinding of 32-bit (ILP32) binaries is not supported
54 at the moment.
55
56** Workaround for older versions of GCC
57
58GCC v3.0 and GCC v3.2 ship with a bad version of sys/types.h. The
59workaround is to issue the following commands before running
60"configure":
mostang.com!davidm8d057cb2003-04-03 07:59:15 +000061
62 $ mkdir $top_dir/include/sys
63 $ cp /usr/include/sys/types.h $top_dir/include/sys
64
mostang.com!davidmf2b40602004-05-04 22:24:50 +000065GCC v3.3.2 or later have been fixed and do not require this
66workaround.
hp.com!davidmef00f952003-11-27 07:17:47 +000067
Jose Flavio Aguilar Paulino3e245812007-08-24 10:54:00 -060068* Building for PowerPC64 / Linux
69
70For building for power64 you should use:
71
72 $ ./configure CFLAGS="-g -O2 -m64" CXXFLAGS="-g -O2 -m64"
73
74If your power support altivec registers:
75 $ ./configure CFLAGS="-g -O2 -m64 -maltivec" CXXFLAGS="-g -O2 -m64 -maltivec"
76
77To check if your processor has support for vector registers (altivec):
78 cat /proc/cpuinfo | grep altivec
79and should have something like this:
80 cpu : PPC970, altivec supported
81
82If libunwind seems to not work (backtracing failing), try to compile
83it with -O0, without optimizations. There are some compiler problems
84depending on the version of your gcc.
85
Konstantin Belousov71699582010-04-04 12:03:15 +030086* Building on FreeBSD
87
88General building instructions apply. To build and execute several tests,
89you need libexecinfo library available in ports as devel/libexecinfo.
90
Konstantin Belousov601919e2010-04-04 12:39:16 +030091Development of the port was done of FreeBSD 8.0-STABLE. The library
92was build with the system compiler that is modified version of gcc 4.2.1,
93as well as the gcc 4.4.3.
hp.com!davidmdef37e72005-05-03 09:13:17 +000094
mostang.com!davidm594e7eb2003-03-28 07:43:22 +000095* Regression Testing
96
97After building the library, you can run a set of regression tests with:
98
99 $ make check
100
hp.com!davidmef00f952003-11-27 07:17:47 +0000101** Expected results on IA-64 Linux
102
hp.com!davidmb8e952c2003-11-19 23:15:58 +0000103Unless you have a very recent C library and compiler installed, it is
hp.com!davidmef00f952003-11-27 07:17:47 +0000104currently expected to have the following tests fail on IA-64 Linux:
mostang.com!davidm594e7eb2003-03-28 07:43:22 +0000105
hp.com!davidmb8e952c2003-11-19 23:15:58 +0000106 Gtest-init (should pass starting with glibc-2.3.x/gcc-3.4)
107 Ltest-init (should pass starting with glibc-2.3.x/gcc-3.4)
108 test-ptrace (should pass starting with glibc-2.3.x/gcc-3.4)
109 run-ia64-test-dyn1 (should pass starting with glibc-2.3.x)
110
111This does not mean that libunwind cannot be used with older compilers
112or C libraries, it just means that for certain corner cases, unwinding
113will fail. Since they're corner cases, it is not likely for
114applications to trigger them.
mostang.com!davidm594e7eb2003-03-28 07:43:22 +0000115
hp.com!davidm75b67192004-10-15 13:37:27 +0000116Note: If you get lots of errors in Gia64-test-nat and Lia64-test-nat, it's
117 almost certainly a sign of an old assembler. The GNU assembler used
118 to encode previous-stack-pointer-relative offsets incorrectly.
119 This bug was fixed on 21-Sep-2004 so any later assembler will be
120 fine.
121
hp.com!davidmef00f952003-11-27 07:17:47 +0000122** Expected results on x86 Linux
123
124The following tests are expected to fail on x86 Linux:
125
David Mosberger-Tang955d1272007-08-06 20:26:50 -0600126 Gtest-resume-sig (fails to get SIGUSR2)
127 Ltest-resume-sig (likewise)
hp.com!davidmdef37e72005-05-03 09:13:17 +0000128 Gtest-dyn1 (no dynamic unwind info support yet)
129 Ltest-dyn1 (no dynamic unwind info support yet)
130 test-setjmp (longjmp() not implemented yet)
131 run-check-namespace (no _Ux86_getcontext yet)
David Mosberger-Tang955d1272007-08-06 20:26:50 -0600132 test-ptrace
hp.com!davidmdef37e72005-05-03 09:13:17 +0000133
134** Expected results on x86-64 Linux
135
136The following tests are expected to fail on x86-64 Linux:
137
138 Gtest-dyn1 (no dynamic unwind info support yet)
139 Ltest-dyn1 (no dynamic unwind info support yet)
140 Gtest-init (see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18743)
141 Ltest-init (likewise)
142 test-async-sig (crashes due to bad unwind-info?)
143 test-setjmp (longjmp() not implemented yet)
144 run-check-namespace (no _Ux86_64_getcontext yet)
145 run-ptrace-mapper (??? investigate)
146 run-ptrace-misc (see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18748
147 and http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18749)
148
149** Expected results on PARISC Linux
150
151Caveat: GCC v3.4 or newer is needed on PA-RISC Linux. Earlier
152versions of the compiler failed to generate the exception-handling
153program header (GNU_EH_FRAME) needed for unwinding.
154
155The following tests are expected to fail on x86-64 Linux:
156
157 Gtest-bt (backtrace truncated at kill() due to lack of unwind-info)
158 Ltest-bt (likewise)
159 Gtest-resume-sig (Gresume.c:my_rt_sigreturn() is wrong somehow)
160 Ltest-resume-sig (likewise)
161 Gtest-init (likewise)
162 Ltest-init (likewise)
163 Gtest-dyn1 (no dynamic unwind info support yet)
164 Ltest-dyn1 (no dynamic unwind info support yet)
165 test-setjmp (longjmp() not implemented yet)
166 run-check-namespace (toolchain doesn't support HIDDEN yet)
hp.com!davidmef00f952003-11-27 07:17:47 +0000167
168** Expected results on HP-UX
169
mostang.com!davidmf2b40602004-05-04 22:24:50 +0000170"make check" is currently unsupported for HP-UX. You can try to run
171it, but most tests will fail (and some may fail to terminate). The
172only test programs that are known to work at this time are:
173
174 tests/bt
175 tests/Gperf-simple
176 tests/test-proc-info
177 tests/test-static-link
178 tests/Gtest-init
179 tests/Ltest-init
180 tests/Gtest-resume-sig
181 tests/Ltest-resume-sig
hp.com!davidmef00f952003-11-27 07:17:47 +0000182
Jose Flavio Aguilar Paulino32e21872007-08-27 09:11:37 -0600183** Expected results on PPC64 Linux
184
185"make check" should run with no more than 10 out of 24 tests failed.
186
187
mostang.com!davidm065d4552004-01-21 06:36:35 +0000188* Performance Testing
189
190This distribution includes a few simple performance tests which give
191some idea of the basic cost of various libunwind operations. After
192building the library, you can run these tests with the following
193commands:
194
195 $ cd tests
196 $ make perf
197
mostang.com!davidm594e7eb2003-03-28 07:43:22 +0000198* Contacting the Developers
199
mostang.com!davidm7fbfe0a2002-02-15 23:22:05 +0000200Please direct all questions regarding this library to:
201
David Mosberger-Tang87247222007-10-15 17:48:26 -0600202 libunwind-devel@nongnu.org
mostang.com!davidm7fbfe0a2002-02-15 23:22:05 +0000203
David Mosberger-Tang87247222007-10-15 17:48:26 -0600204You can do this by sending a mail to libunwind-request@nongnu.org with
205a body of:
mostang.com!davidm7fbfe0a2002-02-15 23:22:05 +0000206
David Mosberger-Tang87247222007-10-15 17:48:26 -0600207 subscribe libunwind-devel
mostang.com!davidm7fbfe0a2002-02-15 23:22:05 +0000208
David Mosberger-Tang87247222007-10-15 17:48:26 -0600209or you can subscribe and manage your subscription via the
210web-interface at:
211
212 https://savannah.nongnu.org/mail/?group=libunwind