blob: d5d4ff99b46a3c928840fe6396a027bcbff57f19 [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
40** Version 7
mostang.com!davidm594e7eb2003-03-28 07:43:22 +000041
42To build libunwind with the Intel Electron compiler (ECC), it is
43recommended to run configure like this:
44
(none)!davidme9892bb2004-04-23 01:32:43 +000045 $ ./configure CC=ecc CXX=ecc CCAS=gcc CCASFLAGS=-g \
46 LDFLAGS="-L$PWD/src/.libs"
mostang.com!davidm594e7eb2003-03-28 07:43:22 +000047
48The reason for this is that ECC uses the Intel assembler, which
49doesn't grok some of the IA-64 assembly code in the "tests" directory.
50
51For an ECC-built version of libunwind to work properly, you also need
52to ensure that /usr/include/asm/fpu.h contains a "long double" member
53called "__dummy" in the declaration of "struct ia64_fpreg". Without
54that member, variables of type unw_context_t won't be aligned
55properly.
56
hp.com!davidmdef37e72005-05-03 09:13:17 +000057
mostang.com!davidm8d057cb2003-04-03 07:59:15 +000058* Building on HP-UX
59
60For the time being, libunwind must be built with GCC on HP-UX.
mostang.com!davidmf2b40602004-05-04 22:24:50 +000061
62libunwind should be configured and installed on HP-UX like this:
63
64 $ ./configure CFLAGS="-g -O2 -mlp64" CXXFLAGS="-g -O2 -mlp64"
65
66Caveat: Unwinding of 32-bit (ILP32) binaries is not supported
67 at the moment.
68
69** Workaround for older versions of GCC
70
71GCC v3.0 and GCC v3.2 ship with a bad version of sys/types.h. The
72workaround is to issue the following commands before running
73"configure":
mostang.com!davidm8d057cb2003-04-03 07:59:15 +000074
75 $ mkdir $top_dir/include/sys
76 $ cp /usr/include/sys/types.h $top_dir/include/sys
77
mostang.com!davidmf2b40602004-05-04 22:24:50 +000078GCC v3.3.2 or later have been fixed and do not require this
79workaround.
hp.com!davidmef00f952003-11-27 07:17:47 +000080
hp.com!davidmdef37e72005-05-03 09:13:17 +000081
mostang.com!davidm594e7eb2003-03-28 07:43:22 +000082* Regression Testing
83
84After building the library, you can run a set of regression tests with:
85
86 $ make check
87
hp.com!davidmef00f952003-11-27 07:17:47 +000088** Expected results on IA-64 Linux
89
hp.com!davidmb8e952c2003-11-19 23:15:58 +000090Unless you have a very recent C library and compiler installed, it is
hp.com!davidmef00f952003-11-27 07:17:47 +000091currently expected to have the following tests fail on IA-64 Linux:
mostang.com!davidm594e7eb2003-03-28 07:43:22 +000092
hp.com!davidmb8e952c2003-11-19 23:15:58 +000093 Gtest-init (should pass starting with glibc-2.3.x/gcc-3.4)
94 Ltest-init (should pass starting with glibc-2.3.x/gcc-3.4)
95 test-ptrace (should pass starting with glibc-2.3.x/gcc-3.4)
96 run-ia64-test-dyn1 (should pass starting with glibc-2.3.x)
97
98This does not mean that libunwind cannot be used with older compilers
99or C libraries, it just means that for certain corner cases, unwinding
100will fail. Since they're corner cases, it is not likely for
101applications to trigger them.
mostang.com!davidm594e7eb2003-03-28 07:43:22 +0000102
hp.com!davidm75b67192004-10-15 13:37:27 +0000103Note: If you get lots of errors in Gia64-test-nat and Lia64-test-nat, it's
104 almost certainly a sign of an old assembler. The GNU assembler used
105 to encode previous-stack-pointer-relative offsets incorrectly.
106 This bug was fixed on 21-Sep-2004 so any later assembler will be
107 fine.
108
hp.com!davidmef00f952003-11-27 07:17:47 +0000109** Expected results on x86 Linux
110
111The following tests are expected to fail on x86 Linux:
112
David Mosberger-Tang955d1272007-08-06 20:26:50 -0600113 Gtest-resume-sig (fails to get SIGUSR2)
114 Ltest-resume-sig (likewise)
hp.com!davidmdef37e72005-05-03 09:13:17 +0000115 Gtest-dyn1 (no dynamic unwind info support yet)
116 Ltest-dyn1 (no dynamic unwind info support yet)
117 test-setjmp (longjmp() not implemented yet)
118 run-check-namespace (no _Ux86_getcontext yet)
David Mosberger-Tang955d1272007-08-06 20:26:50 -0600119 test-ptrace
hp.com!davidmdef37e72005-05-03 09:13:17 +0000120
121** Expected results on x86-64 Linux
122
123The following tests are expected to fail on x86-64 Linux:
124
125 Gtest-dyn1 (no dynamic unwind info support yet)
126 Ltest-dyn1 (no dynamic unwind info support yet)
127 Gtest-init (see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18743)
128 Ltest-init (likewise)
129 test-async-sig (crashes due to bad unwind-info?)
130 test-setjmp (longjmp() not implemented yet)
131 run-check-namespace (no _Ux86_64_getcontext yet)
132 run-ptrace-mapper (??? investigate)
133 run-ptrace-misc (see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18748
134 and http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18749)
135
136** Expected results on PARISC Linux
137
138Caveat: GCC v3.4 or newer is needed on PA-RISC Linux. Earlier
139versions of the compiler failed to generate the exception-handling
140program header (GNU_EH_FRAME) needed for unwinding.
141
142The following tests are expected to fail on x86-64 Linux:
143
144 Gtest-bt (backtrace truncated at kill() due to lack of unwind-info)
145 Ltest-bt (likewise)
146 Gtest-resume-sig (Gresume.c:my_rt_sigreturn() is wrong somehow)
147 Ltest-resume-sig (likewise)
148 Gtest-init (likewise)
149 Ltest-init (likewise)
150 Gtest-dyn1 (no dynamic unwind info support yet)
151 Ltest-dyn1 (no dynamic unwind info support yet)
152 test-setjmp (longjmp() not implemented yet)
153 run-check-namespace (toolchain doesn't support HIDDEN yet)
hp.com!davidmef00f952003-11-27 07:17:47 +0000154
155** Expected results on HP-UX
156
mostang.com!davidmf2b40602004-05-04 22:24:50 +0000157"make check" is currently unsupported for HP-UX. You can try to run
158it, but most tests will fail (and some may fail to terminate). The
159only test programs that are known to work at this time are:
160
161 tests/bt
162 tests/Gperf-simple
163 tests/test-proc-info
164 tests/test-static-link
165 tests/Gtest-init
166 tests/Ltest-init
167 tests/Gtest-resume-sig
168 tests/Ltest-resume-sig
hp.com!davidmef00f952003-11-27 07:17:47 +0000169
mostang.com!davidm065d4552004-01-21 06:36:35 +0000170* Performance Testing
171
172This distribution includes a few simple performance tests which give
173some idea of the basic cost of various libunwind operations. After
174building the library, you can run these tests with the following
175commands:
176
177 $ cd tests
178 $ make perf
179
mostang.com!davidm594e7eb2003-03-28 07:43:22 +0000180* Contacting the Developers
181
mostang.com!davidm7fbfe0a2002-02-15 23:22:05 +0000182Please direct all questions regarding this library to:
183
184 libunwind@linux.hpl.hp.com
185
186For spam protection, you'll have to subscribe to this list before
187posting a question. You can do this by sending a mail to
188libunwind-request@linux.hpl.hp.com with a body of:
189
190 subscribe libunwind
191
192Note: the host that is running this list is behind a firewall, so
193you'll not be able to use the Web interface to manage your
194subscription. Send a mail containing "help" to
195libunwind-request@linux.hpl.hp.com for information on how to manage
196your subscription via email.