blob: d94e5810a9581f411af86ffc6b501ceafe9a469e [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
(none)!davidme9892bb2004-04-23 01:32:43 +000064
mostang.com!davidm8d057cb2003-04-03 07:59:15 +000065* Building on HP-UX
66
67For the time being, libunwind must be built with GCC on HP-UX.
hp.com!davidmef00f952003-11-27 07:17:47 +000068Unfortunately, gcc-3.0 and gcc-3.2 ship with a bad version of
69sys/types.h. The workaround for this is:
mostang.com!davidm8d057cb2003-04-03 07:59:15 +000070
71 $ mkdir $top_dir/include/sys
72 $ cp /usr/include/sys/types.h $top_dir/include/sys
73
hp.com!davidmef00f952003-11-27 07:17:47 +000074Apart from this glitch, libunwind should configure and install on
75HP-UX like this:
76
77 $ ./configure CFLAGS="-g -O2 -mlp64"
78
79Caveat: Unwinding of 32-bit (ILP32) binaries is not supported
80 at the moment.
81
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!davidmef00f952003-11-27 07:17:47 +0000103** Expected results on x86 Linux
104
105The following tests are expected to fail on x86 Linux:
106
107 test-proc-info (x86 unwinder doesn't use unwind-info yet)
108 Gtest-exc (unw_resume() not implmented yet)
109 Ltest-exc (unw_resume() not implmented yet)
110 test-setjmp (unw_resume() not implmented yet)
111
112** Expected results on HP-UX
113
114"make check" is currently unsupported for HP-UX. The only test
115programs that are known to work at this time are tests/bt (which
116produces various backtraces) and tests/Gperf-simple, which does some
117simple performance measurements.
118
mostang.com!davidm065d4552004-01-21 06:36:35 +0000119* Performance Testing
120
121This distribution includes a few simple performance tests which give
122some idea of the basic cost of various libunwind operations. After
123building the library, you can run these tests with the following
124commands:
125
126 $ cd tests
127 $ make perf
128
mostang.com!davidm594e7eb2003-03-28 07:43:22 +0000129* Contacting the Developers
130
mostang.com!davidm7fbfe0a2002-02-15 23:22:05 +0000131Please direct all questions regarding this library to:
132
133 libunwind@linux.hpl.hp.com
134
135For spam protection, you'll have to subscribe to this list before
136posting a question. You can do this by sending a mail to
137libunwind-request@linux.hpl.hp.com with a body of:
138
139 subscribe libunwind
140
141Note: the host that is running this list is behind a firewall, so
142you'll not be able to use the Web interface to manage your
143subscription. Send a mail containing "help" to
144libunwind-request@linux.hpl.hp.com for information on how to manage
145your subscription via email.