blob: d5509ee33338824025cbe87e79c06093a0152708 [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
(none)!davidme9892bb2004-04-23 01:32:43 +000011* Important GCC v3.4.0 Caveat
12
13GCC v3.4.0 breaks C++ ABI compatibility and because of that, libunwind
14cannot easily be used as the unwinder for GCC v3.4.0. The GCC
15developers are aware of the problem [1] and the expectation is that
16the problem will be fixed with GCC v3.4.1. In the meantime, it may be
17best to avoid using GCC v3.4.0.
18
19[1] http://gcc.gnu.org/ml/gcc/2004-04/msg00989.html
20
mostang.com!davidm594e7eb2003-03-28 07:43:22 +000021* General Build Instructions
22
23In general, this library can be built and installed with the following
24commands:
mostang.com!davidm7fbfe0a2002-02-15 23:22:05 +000025
mostang.com!davidm354f1c72002-02-23 20:27:03 +000026 $ ./configure
mostang.com!davidm7fbfe0a2002-02-15 23:22:05 +000027 $ make
28 $ make install prefix=PREFIX
29
mostang.com!davidm354f1c72002-02-23 20:27:03 +000030where PREFIX is the installation prefix. By default, a prefix of
31/usr/local is used, such that libunwind.a is installed in
32/usr/local/lib and unwind.h is installed in /usr/local/include. For
33testing, you may want to use a prefix of /usr/local instead.
mostang.com!davidm7fbfe0a2002-02-15 23:22:05 +000034
hp.com!davidm3f9c0bc2003-09-24 21:51:53 +000035
hp.com!davidmef00f952003-11-27 07:17:47 +000036* Building with Intel compiler
37
38** Up to version 7
mostang.com!davidm594e7eb2003-03-28 07:43:22 +000039
40To build libunwind with the Intel Electron compiler (ECC), it is
41recommended to run configure like this:
42
(none)!davidme9892bb2004-04-23 01:32:43 +000043 $ ./configure CC=ecc CXX=ecc CCAS=gcc CCASFLAGS=-g \
44 LDFLAGS="-L$PWD/src/.libs"
mostang.com!davidm594e7eb2003-03-28 07:43:22 +000045
46The reason for this is that ECC uses the Intel assembler, which
47doesn't grok some of the IA-64 assembly code in the "tests" directory.
48
49For an ECC-built version of libunwind to work properly, you also need
50to ensure that /usr/include/asm/fpu.h contains a "long double" member
51called "__dummy" in the declaration of "struct ia64_fpreg". Without
52that member, variables of type unw_context_t won't be aligned
53properly.
54
hp.com!davidmef00f952003-11-27 07:17:47 +000055** Version 8 and later
56
57Starting with version 8, the preferred name for the IA-64 Intel
58compiler is "icc" (same name as on x86). Thus, the configure-line
59should look like this:
60
hp.com!davidm758078f2004-04-20 16:53:44 +000061 $ ./configure CC=icc CFLAGS="-g -O3 -ip" CXX=icc CCAS=gcc CCASFLAGS=-g \
62 LDFLAGS="-L$PWD/src/.libs"
hp.com!davidmef00f952003-11-27 07:17:47 +000063
mostang.com!davidm8d057cb2003-04-03 07:59:15 +000064* Building on HP-UX
65
66For the time being, libunwind must be built with GCC on HP-UX.
mostang.com!davidmf2b40602004-05-04 22:24:50 +000067
68libunwind should be configured and installed on HP-UX like this:
69
70 $ ./configure CFLAGS="-g -O2 -mlp64" CXXFLAGS="-g -O2 -mlp64"
71
72Caveat: Unwinding of 32-bit (ILP32) binaries is not supported
73 at the moment.
74
75** Workaround for older versions of GCC
76
77GCC v3.0 and GCC v3.2 ship with a bad version of sys/types.h. The
78workaround is to issue the following commands before running
79"configure":
mostang.com!davidm8d057cb2003-04-03 07:59:15 +000080
81 $ mkdir $top_dir/include/sys
82 $ cp /usr/include/sys/types.h $top_dir/include/sys
83
mostang.com!davidmf2b40602004-05-04 22:24:50 +000084GCC v3.3.2 or later have been fixed and do not require this
85workaround.
hp.com!davidmef00f952003-11-27 07:17:47 +000086
mostang.com!davidm594e7eb2003-03-28 07:43:22 +000087* Regression Testing
88
89After building the library, you can run a set of regression tests with:
90
91 $ make check
92
hp.com!davidmef00f952003-11-27 07:17:47 +000093** Expected results on IA-64 Linux
94
hp.com!davidmb8e952c2003-11-19 23:15:58 +000095Unless you have a very recent C library and compiler installed, it is
hp.com!davidmef00f952003-11-27 07:17:47 +000096currently expected to have the following tests fail on IA-64 Linux:
mostang.com!davidm594e7eb2003-03-28 07:43:22 +000097
hp.com!davidmb8e952c2003-11-19 23:15:58 +000098 Gtest-init (should pass starting with glibc-2.3.x/gcc-3.4)
99 Ltest-init (should pass starting with glibc-2.3.x/gcc-3.4)
100 test-ptrace (should pass starting with glibc-2.3.x/gcc-3.4)
101 run-ia64-test-dyn1 (should pass starting with glibc-2.3.x)
102
103This does not mean that libunwind cannot be used with older compilers
104or C libraries, it just means that for certain corner cases, unwinding
105will fail. Since they're corner cases, it is not likely for
106applications to trigger them.
mostang.com!davidm594e7eb2003-03-28 07:43:22 +0000107
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
112 test-proc-info (x86 unwinder doesn't use unwind-info yet)
113 Gtest-exc (unw_resume() not implmented yet)
114 Ltest-exc (unw_resume() not implmented yet)
115 test-setjmp (unw_resume() not implmented yet)
116
117** Expected results on HP-UX
118
mostang.com!davidmf2b40602004-05-04 22:24:50 +0000119"make check" is currently unsupported for HP-UX. You can try to run
120it, but most tests will fail (and some may fail to terminate). The
121only test programs that are known to work at this time are:
122
123 tests/bt
124 tests/Gperf-simple
125 tests/test-proc-info
126 tests/test-static-link
127 tests/Gtest-init
128 tests/Ltest-init
129 tests/Gtest-resume-sig
130 tests/Ltest-resume-sig
hp.com!davidmef00f952003-11-27 07:17:47 +0000131
mostang.com!davidm065d4552004-01-21 06:36:35 +0000132* Performance Testing
133
134This distribution includes a few simple performance tests which give
135some idea of the basic cost of various libunwind operations. After
136building the library, you can run these tests with the following
137commands:
138
139 $ cd tests
140 $ make perf
141
mostang.com!davidm594e7eb2003-03-28 07:43:22 +0000142* Contacting the Developers
143
mostang.com!davidm7fbfe0a2002-02-15 23:22:05 +0000144Please direct all questions regarding this library to:
145
146 libunwind@linux.hpl.hp.com
147
148For spam protection, you'll have to subscribe to this list before
149posting a question. You can do this by sending a mail to
150libunwind-request@linux.hpl.hp.com with a body of:
151
152 subscribe libunwind
153
154Note: the host that is running this list is behind a firewall, so
155you'll not be able to use the Web interface to manage your
156subscription. Send a mail containing "help" to
157libunwind-request@linux.hpl.hp.com for information on how to manage
158your subscription via email.