blob: f119feccb856f978209a83a5b903472ade9855d6 [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!davidm758078f2004-04-20 16:53:44 +00003This is version 0.97 of the unwind library. At the moment, only the
4IA-64 Linux (IPF Linux) platform is fully supported. Some basic
hp.com!davidmef00f952003-11-27 07:17:47 +00005support for x86 and HP-UX/IPF exists also. However, the x86 support
hp.com!davidm758078f2004-04-20 16:53:44 +00006is based mostly on the frame-chain and does not reliably use unwind
7information yet, so its utility is limited. Similarly, the HP-UX/IPF
hp.com!davidmef00f952003-11-27 07:17:47 +00008support is incomplete, though it is sufficient to do a basic
9backtrace. unw_resume() is not supported, however.
mostang.com!davidm7fbfe0a2002-02-15 23:22:05 +000010
hp.com!davidm75b67192004-10-15 13:37:27 +000011* Important GCC v3.4.[012] Caveat
(none)!davidme9892bb2004-04-23 01:32:43 +000012
hp.com!davidm75b67192004-10-15 13:37:27 +000013GCC v3.4.[012] break C++ ABI compatibility and because of that,
14libunwind cannot easily be used as the unwinder. The GCC developers
15are aware of the problem [1] and the the problem has been fixed for
16GCC v3.4.3.
(none)!davidme9892bb2004-04-23 01:32:43 +000017
18[1] http://gcc.gnu.org/ml/gcc/2004-04/msg00989.html
19
mostang.com!davidm594e7eb2003-03-28 07:43:22 +000020* General Build Instructions
21
22In general, this library can be built and installed with the following
23commands:
mostang.com!davidm7fbfe0a2002-02-15 23:22:05 +000024
mostang.com!davidm354f1c72002-02-23 20:27:03 +000025 $ ./configure
mostang.com!davidm7fbfe0a2002-02-15 23:22:05 +000026 $ make
27 $ make install prefix=PREFIX
28
mostang.com!davidm354f1c72002-02-23 20:27:03 +000029where PREFIX is the installation prefix. By default, a prefix of
30/usr/local is used, such that libunwind.a is installed in
31/usr/local/lib and unwind.h is installed in /usr/local/include. For
32testing, you may want to use a prefix of /usr/local instead.
mostang.com!davidm7fbfe0a2002-02-15 23:22:05 +000033
hp.com!davidm3f9c0bc2003-09-24 21:51:53 +000034
hp.com!davidmef00f952003-11-27 07:17:47 +000035* Building with Intel compiler
36
hp.com!davidm75b67192004-10-15 13:37:27 +000037** Version 8 and later
38
39Starting with version 8, the preferred name for the IA-64 Intel
40compiler is "icc" (same name as on x86). Thus, the configure-line
41should look like this:
42
43 $ ./configure CC=icc CFLAGS="-g -O3 -ip" CXX=icc CCAS=gcc CCASFLAGS=-g \
44 LDFLAGS="-L$PWD/src/.libs"
45
46** Version 7
mostang.com!davidm594e7eb2003-03-28 07:43:22 +000047
48To build libunwind with the Intel Electron compiler (ECC), it is
49recommended to run configure like this:
50
(none)!davidme9892bb2004-04-23 01:32:43 +000051 $ ./configure CC=ecc CXX=ecc CCAS=gcc CCASFLAGS=-g \
52 LDFLAGS="-L$PWD/src/.libs"
mostang.com!davidm594e7eb2003-03-28 07:43:22 +000053
54The reason for this is that ECC uses the Intel assembler, which
55doesn't grok some of the IA-64 assembly code in the "tests" directory.
56
57For an ECC-built version of libunwind to work properly, you also need
58to ensure that /usr/include/asm/fpu.h contains a "long double" member
59called "__dummy" in the declaration of "struct ia64_fpreg". Without
60that member, variables of type unw_context_t won't be aligned
61properly.
62
mostang.com!davidm8d057cb2003-04-03 07:59:15 +000063* Building on HP-UX
64
65For the time being, libunwind must be built with GCC on HP-UX.
mostang.com!davidmf2b40602004-05-04 22:24:50 +000066
67libunwind should be configured and installed on HP-UX like this:
68
69 $ ./configure CFLAGS="-g -O2 -mlp64" CXXFLAGS="-g -O2 -mlp64"
70
71Caveat: Unwinding of 32-bit (ILP32) binaries is not supported
72 at the moment.
73
74** Workaround for older versions of GCC
75
76GCC v3.0 and GCC v3.2 ship with a bad version of sys/types.h. The
77workaround is to issue the following commands before running
78"configure":
mostang.com!davidm8d057cb2003-04-03 07:59:15 +000079
80 $ mkdir $top_dir/include/sys
81 $ cp /usr/include/sys/types.h $top_dir/include/sys
82
mostang.com!davidmf2b40602004-05-04 22:24:50 +000083GCC v3.3.2 or later have been fixed and do not require this
84workaround.
hp.com!davidmef00f952003-11-27 07:17:47 +000085
mostang.com!davidm594e7eb2003-03-28 07:43:22 +000086* Regression Testing
87
88After building the library, you can run a set of regression tests with:
89
90 $ make check
91
hp.com!davidmef00f952003-11-27 07:17:47 +000092** Expected results on IA-64 Linux
93
hp.com!davidmb8e952c2003-11-19 23:15:58 +000094Unless you have a very recent C library and compiler installed, it is
hp.com!davidmef00f952003-11-27 07:17:47 +000095currently expected to have the following tests fail on IA-64 Linux:
mostang.com!davidm594e7eb2003-03-28 07:43:22 +000096
hp.com!davidmb8e952c2003-11-19 23:15:58 +000097 Gtest-init (should pass starting with glibc-2.3.x/gcc-3.4)
98 Ltest-init (should pass starting with glibc-2.3.x/gcc-3.4)
99 test-ptrace (should pass starting with glibc-2.3.x/gcc-3.4)
100 run-ia64-test-dyn1 (should pass starting with glibc-2.3.x)
101
102This does not mean that libunwind cannot be used with older compilers
103or C libraries, it just means that for certain corner cases, unwinding
104will fail. Since they're corner cases, it is not likely for
105applications to trigger them.
mostang.com!davidm594e7eb2003-03-28 07:43:22 +0000106
hp.com!davidm75b67192004-10-15 13:37:27 +0000107Note: If you get lots of errors in Gia64-test-nat and Lia64-test-nat, it's
108 almost certainly a sign of an old assembler. The GNU assembler used
109 to encode previous-stack-pointer-relative offsets incorrectly.
110 This bug was fixed on 21-Sep-2004 so any later assembler will be
111 fine.
112
hp.com!davidmef00f952003-11-27 07:17:47 +0000113** Expected results on x86 Linux
114
115The following tests are expected to fail on x86 Linux:
116
117 test-proc-info (x86 unwinder doesn't use unwind-info yet)
118 Gtest-exc (unw_resume() not implmented yet)
119 Ltest-exc (unw_resume() not implmented yet)
120 test-setjmp (unw_resume() not implmented yet)
121
122** Expected results on HP-UX
123
mostang.com!davidmf2b40602004-05-04 22:24:50 +0000124"make check" is currently unsupported for HP-UX. You can try to run
125it, but most tests will fail (and some may fail to terminate). The
126only test programs that are known to work at this time are:
127
128 tests/bt
129 tests/Gperf-simple
130 tests/test-proc-info
131 tests/test-static-link
132 tests/Gtest-init
133 tests/Ltest-init
134 tests/Gtest-resume-sig
135 tests/Ltest-resume-sig
hp.com!davidmef00f952003-11-27 07:17:47 +0000136
mostang.com!davidm065d4552004-01-21 06:36:35 +0000137* Performance Testing
138
139This distribution includes a few simple performance tests which give
140some idea of the basic cost of various libunwind operations. After
141building the library, you can run these tests with the following
142commands:
143
144 $ cd tests
145 $ make perf
146
mostang.com!davidm594e7eb2003-03-28 07:43:22 +0000147* Contacting the Developers
148
mostang.com!davidm7fbfe0a2002-02-15 23:22:05 +0000149Please direct all questions regarding this library to:
150
151 libunwind@linux.hpl.hp.com
152
153For spam protection, you'll have to subscribe to this list before
154posting a question. You can do this by sending a mail to
155libunwind-request@linux.hpl.hp.com with a body of:
156
157 subscribe libunwind
158
159Note: the host that is running this list is behind a firewall, so
160you'll not be able to use the Web interface to manage your
161subscription. Send a mail containing "help" to
162libunwind-request@linux.hpl.hp.com for information on how to manage
163your subscription via email.