blob: d6b7b56969c9e53d125047c62fccc582be8dbb18 [file] [log] [blame]
mostang.com!davidm594e7eb2003-03-28 07:43:22 +00001-*- mode: Outline -*-
mostang.com!davidm7fbfe0a2002-02-15 23:22:05 +00002
mostang.com!davidmfab61cf2003-12-05 06:42:28 +00003This is version 0.96 of the unwind library. At the moment, only the
mostang.com!davidm594e7eb2003-03-28 07:43:22 +00004IA-64 Linux (IPF Linux) platform is fully supported. Some very basic
hp.com!davidmef00f952003-11-27 07:17:47 +00005support for x86 and HP-UX/IPF exists also. However, the x86 support
6is based purely on the frame-chain and does not use unwind
7information, so its utility is limited. Similarly, the HP-UX/IPF
8support 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
mostang.com!davidm594e7eb2003-03-28 07:43:22 +000011* General Build Instructions
12
13In general, this library can be built and installed with the following
14commands:
mostang.com!davidm7fbfe0a2002-02-15 23:22:05 +000015
mostang.com!davidm354f1c72002-02-23 20:27:03 +000016 $ ./configure
mostang.com!davidm7fbfe0a2002-02-15 23:22:05 +000017 $ make
18 $ make install prefix=PREFIX
19
mostang.com!davidm354f1c72002-02-23 20:27:03 +000020where PREFIX is the installation prefix. By default, a prefix of
21/usr/local is used, such that libunwind.a is installed in
22/usr/local/lib and unwind.h is installed in /usr/local/include. For
23testing, you may want to use a prefix of /usr/local instead.
mostang.com!davidm7fbfe0a2002-02-15 23:22:05 +000024
hp.com!davidm3f9c0bc2003-09-24 21:51:53 +000025If, during the build, you're getting an error of the form:
26
27 ../src/.libs/libunwind-ia64.so: undefined reference to `__tls_get_addr'
28
29it indicates that you have a compiler which supports the `__thread'
30keyword, but a runtime system (C library), which does not. As of
31September 2003, this appears to be a common problem for Debian
32"unstable" systems. To work around this issue, run "./configure" with
33option "--disable-__thread".
34
35
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
43 $ ./configure CC=ecc CXX=ecc CCAS=gcc
44
45The reason for this is that ECC uses the Intel assembler, which
46doesn't grok some of the IA-64 assembly code in the "tests" directory.
47
48For an ECC-built version of libunwind to work properly, you also need
49to ensure that /usr/include/asm/fpu.h contains a "long double" member
50called "__dummy" in the declaration of "struct ia64_fpreg". Without
51that member, variables of type unw_context_t won't be aligned
52properly.
53
hp.com!davidmef00f952003-11-27 07:17:47 +000054** Version 8 and later
55
56Starting with version 8, the preferred name for the IA-64 Intel
57compiler is "icc" (same name as on x86). Thus, the configure-line
58should look like this:
59
60 $ ./configure CC=icc CXX=icc CCAS=gcc
61
mostang.com!davidm8d057cb2003-04-03 07:59:15 +000062* Building on HP-UX
63
64For the time being, libunwind must be built with GCC on HP-UX.
hp.com!davidmef00f952003-11-27 07:17:47 +000065Unfortunately, gcc-3.0 and gcc-3.2 ship with a bad version of
66sys/types.h. The workaround for this is:
mostang.com!davidm8d057cb2003-04-03 07:59:15 +000067
68 $ mkdir $top_dir/include/sys
69 $ cp /usr/include/sys/types.h $top_dir/include/sys
70
hp.com!davidmef00f952003-11-27 07:17:47 +000071Apart from this glitch, libunwind should configure and install on
72HP-UX like this:
73
74 $ ./configure CFLAGS="-g -O2 -mlp64"
75
76Caveat: Unwinding of 32-bit (ILP32) binaries is not supported
77 at the moment.
78
mostang.com!davidm594e7eb2003-03-28 07:43:22 +000079* Regression Testing
80
81After building the library, you can run a set of regression tests with:
82
83 $ make check
84
hp.com!davidmef00f952003-11-27 07:17:47 +000085** Expected results on IA-64 Linux
86
hp.com!davidmb8e952c2003-11-19 23:15:58 +000087Unless you have a very recent C library and compiler installed, it is
hp.com!davidmef00f952003-11-27 07:17:47 +000088currently expected to have the following tests fail on IA-64 Linux:
mostang.com!davidm594e7eb2003-03-28 07:43:22 +000089
hp.com!davidmb8e952c2003-11-19 23:15:58 +000090 Gtest-init (should pass starting with glibc-2.3.x/gcc-3.4)
91 Ltest-init (should pass starting with glibc-2.3.x/gcc-3.4)
92 test-ptrace (should pass starting with glibc-2.3.x/gcc-3.4)
93 run-ia64-test-dyn1 (should pass starting with glibc-2.3.x)
94
95This does not mean that libunwind cannot be used with older compilers
96or C libraries, it just means that for certain corner cases, unwinding
97will fail. Since they're corner cases, it is not likely for
98applications to trigger them.
mostang.com!davidm594e7eb2003-03-28 07:43:22 +000099
hp.com!davidmef00f952003-11-27 07:17:47 +0000100** Expected results on x86 Linux
101
102The following tests are expected to fail on x86 Linux:
103
104 test-proc-info (x86 unwinder doesn't use unwind-info yet)
105 Gtest-exc (unw_resume() not implmented yet)
106 Ltest-exc (unw_resume() not implmented yet)
107 test-setjmp (unw_resume() not implmented yet)
108
109** Expected results on HP-UX
110
111"make check" is currently unsupported for HP-UX. The only test
112programs that are known to work at this time are tests/bt (which
113produces various backtraces) and tests/Gperf-simple, which does some
114simple performance measurements.
115
mostang.com!davidm065d4552004-01-21 06:36:35 +0000116* Performance Testing
117
118This distribution includes a few simple performance tests which give
119some idea of the basic cost of various libunwind operations. After
120building the library, you can run these tests with the following
121commands:
122
123 $ cd tests
124 $ make perf
125
mostang.com!davidm594e7eb2003-03-28 07:43:22 +0000126* Contacting the Developers
127
mostang.com!davidm7fbfe0a2002-02-15 23:22:05 +0000128Please direct all questions regarding this library to:
129
130 libunwind@linux.hpl.hp.com
131
132For spam protection, you'll have to subscribe to this list before
133posting a question. You can do this by sending a mail to
134libunwind-request@linux.hpl.hp.com with a body of:
135
136 subscribe libunwind
137
138Note: the host that is running this list is behind a firewall, so
139you'll not be able to use the Web interface to manage your
140subscription. Send a mail containing "help" to
141libunwind-request@linux.hpl.hp.com for information on how to manage
142your subscription via email.