blob: 5f7fdb7ec6dd139e758ccbc7d55759c570a7b182 [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.
(none)!davidme9892bb2004-04-23 01:32:43 +000011
(none)!davidme9892bb2004-04-23 01:32:43 +000012
mostang.com!davidm594e7eb2003-03-28 07:43:22 +000013* General Build Instructions
14
15In general, this library can be built and installed with the following
16commands:
mostang.com!davidm7fbfe0a2002-02-15 23:22:05 +000017
mostang.com!davidm354f1c72002-02-23 20:27:03 +000018 $ ./configure
mostang.com!davidm7fbfe0a2002-02-15 23:22:05 +000019 $ make
20 $ make install prefix=PREFIX
21
mostang.com!davidm354f1c72002-02-23 20:27:03 +000022where PREFIX is the installation prefix. By default, a prefix of
23/usr/local is used, such that libunwind.a is installed in
24/usr/local/lib and unwind.h is installed in /usr/local/include. For
25testing, you may want to use a prefix of /usr/local instead.
mostang.com!davidm7fbfe0a2002-02-15 23:22:05 +000026
hp.com!davidm3f9c0bc2003-09-24 21:51:53 +000027
hp.com!davidmef00f952003-11-27 07:17:47 +000028* Building with Intel compiler
29
hp.com!davidm75b67192004-10-15 13:37:27 +000030** Version 8 and later
31
32Starting with version 8, the preferred name for the IA-64 Intel
33compiler is "icc" (same name as on x86). Thus, the configure-line
34should look like this:
35
36 $ ./configure CC=icc CFLAGS="-g -O3 -ip" CXX=icc CCAS=gcc CCASFLAGS=-g \
37 LDFLAGS="-L$PWD/src/.libs"
38
39** Version 7
mostang.com!davidm594e7eb2003-03-28 07:43:22 +000040
41To build libunwind with the Intel Electron compiler (ECC), it is
42recommended to run configure like this:
43
(none)!davidme9892bb2004-04-23 01:32:43 +000044 $ ./configure CC=ecc CXX=ecc CCAS=gcc CCASFLAGS=-g \
45 LDFLAGS="-L$PWD/src/.libs"
mostang.com!davidm594e7eb2003-03-28 07:43:22 +000046
47The reason for this is that ECC uses the Intel assembler, which
48doesn't grok some of the IA-64 assembly code in the "tests" directory.
49
50For an ECC-built version of libunwind to work properly, you also need
51to ensure that /usr/include/asm/fpu.h contains a "long double" member
52called "__dummy" in the declaration of "struct ia64_fpreg". Without
53that member, variables of type unw_context_t won't be aligned
54properly.
55
hp.com!davidmdef37e72005-05-03 09:13:17 +000056
mostang.com!davidm8d057cb2003-04-03 07:59:15 +000057* Building on HP-UX
58
59For the time being, libunwind must be built with GCC on HP-UX.
mostang.com!davidmf2b40602004-05-04 22:24:50 +000060
61libunwind should be configured and installed on HP-UX like this:
62
63 $ ./configure CFLAGS="-g -O2 -mlp64" CXXFLAGS="-g -O2 -mlp64"
64
65Caveat: Unwinding of 32-bit (ILP32) binaries is not supported
66 at the moment.
67
68** Workaround for older versions of GCC
69
70GCC v3.0 and GCC v3.2 ship with a bad version of sys/types.h. The
71workaround is to issue the following commands before running
72"configure":
mostang.com!davidm8d057cb2003-04-03 07:59:15 +000073
74 $ mkdir $top_dir/include/sys
75 $ cp /usr/include/sys/types.h $top_dir/include/sys
76
mostang.com!davidmf2b40602004-05-04 22:24:50 +000077GCC v3.3.2 or later have been fixed and do not require this
78workaround.
hp.com!davidmef00f952003-11-27 07:17:47 +000079
hp.com!davidmdef37e72005-05-03 09:13:17 +000080
mostang.com!davidm594e7eb2003-03-28 07:43:22 +000081* Regression Testing
82
83After building the library, you can run a set of regression tests with:
84
85 $ make check
86
hp.com!davidmef00f952003-11-27 07:17:47 +000087** Expected results on IA-64 Linux
88
hp.com!davidmb8e952c2003-11-19 23:15:58 +000089Unless you have a very recent C library and compiler installed, it is
hp.com!davidmef00f952003-11-27 07:17:47 +000090currently expected to have the following tests fail on IA-64 Linux:
mostang.com!davidm594e7eb2003-03-28 07:43:22 +000091
hp.com!davidmb8e952c2003-11-19 23:15:58 +000092 Gtest-init (should pass starting with glibc-2.3.x/gcc-3.4)
93 Ltest-init (should pass starting with glibc-2.3.x/gcc-3.4)
94 test-ptrace (should pass starting with glibc-2.3.x/gcc-3.4)
95 run-ia64-test-dyn1 (should pass starting with glibc-2.3.x)
96
97This does not mean that libunwind cannot be used with older compilers
98or C libraries, it just means that for certain corner cases, unwinding
99will fail. Since they're corner cases, it is not likely for
100applications to trigger them.
mostang.com!davidm594e7eb2003-03-28 07:43:22 +0000101
hp.com!davidm75b67192004-10-15 13:37:27 +0000102Note: If you get lots of errors in Gia64-test-nat and Lia64-test-nat, it's
103 almost certainly a sign of an old assembler. The GNU assembler used
104 to encode previous-stack-pointer-relative offsets incorrectly.
105 This bug was fixed on 21-Sep-2004 so any later assembler will be
106 fine.
107
hp.com!davidmef00f952003-11-27 07:17:47 +0000108** Expected results on x86 Linux
109
110The following tests are expected to fail on x86 Linux:
111
hp.com!davidmdef37e72005-05-03 09:13:17 +0000112 Gtest-bt (see http://sources.redhat.com/bugzilla/show_bug.cgi?id=595)
113 Ltest-bt (likewise)
114 Gtest-resume-sig (likewise)
115 Ltest-resume-sig (likewise)
116 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)
120
121In addition, the following are failing on Debian (Sarge):
122
123 Gtest-init (lack of unwind info for __libc_start_main,
124 libc ought to be compiled without
125 -fno-frame-pointer or with -fexceptions)
126 Ltest-init (likewise)
127 test-ptrace (likewise?)
128
129** Expected results on x86-64 Linux
130
131The following tests are expected to fail on x86-64 Linux:
132
133 Gtest-dyn1 (no dynamic unwind info support yet)
134 Ltest-dyn1 (no dynamic unwind info support yet)
135 Gtest-init (see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18743)
136 Ltest-init (likewise)
137 test-async-sig (crashes due to bad unwind-info?)
138 test-setjmp (longjmp() not implemented yet)
139 run-check-namespace (no _Ux86_64_getcontext yet)
140 run-ptrace-mapper (??? investigate)
141 run-ptrace-misc (see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18748
142 and http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18749)
143
144** Expected results on PARISC Linux
145
146Caveat: GCC v3.4 or newer is needed on PA-RISC Linux. Earlier
147versions of the compiler failed to generate the exception-handling
148program header (GNU_EH_FRAME) needed for unwinding.
149
150The following tests are expected to fail on x86-64 Linux:
151
152 Gtest-bt (backtrace truncated at kill() due to lack of unwind-info)
153 Ltest-bt (likewise)
154 Gtest-resume-sig (Gresume.c:my_rt_sigreturn() is wrong somehow)
155 Ltest-resume-sig (likewise)
156 Gtest-init (likewise)
157 Ltest-init (likewise)
158 Gtest-dyn1 (no dynamic unwind info support yet)
159 Ltest-dyn1 (no dynamic unwind info support yet)
160 test-setjmp (longjmp() not implemented yet)
161 run-check-namespace (toolchain doesn't support HIDDEN yet)
hp.com!davidmef00f952003-11-27 07:17:47 +0000162
163** Expected results on HP-UX
164
mostang.com!davidmf2b40602004-05-04 22:24:50 +0000165"make check" is currently unsupported for HP-UX. You can try to run
166it, but most tests will fail (and some may fail to terminate). The
167only test programs that are known to work at this time are:
168
169 tests/bt
170 tests/Gperf-simple
171 tests/test-proc-info
172 tests/test-static-link
173 tests/Gtest-init
174 tests/Ltest-init
175 tests/Gtest-resume-sig
176 tests/Ltest-resume-sig
hp.com!davidmef00f952003-11-27 07:17:47 +0000177
mostang.com!davidm065d4552004-01-21 06:36:35 +0000178* Performance Testing
179
180This distribution includes a few simple performance tests which give
181some idea of the basic cost of various libunwind operations. After
182building the library, you can run these tests with the following
183commands:
184
185 $ cd tests
186 $ make perf
187
mostang.com!davidm594e7eb2003-03-28 07:43:22 +0000188* Contacting the Developers
189
mostang.com!davidm7fbfe0a2002-02-15 23:22:05 +0000190Please direct all questions regarding this library to:
191
192 libunwind@linux.hpl.hp.com
193
194For spam protection, you'll have to subscribe to this list before
195posting a question. You can do this by sending a mail to
196libunwind-request@linux.hpl.hp.com with a body of:
197
198 subscribe libunwind
199
200Note: the host that is running this list is behind a firewall, so
201you'll not be able to use the Web interface to manage your
202subscription. Send a mail containing "help" to
203libunwind-request@linux.hpl.hp.com for information on how to manage
204your subscription via email.