mostang.com!davidm | 594e7eb | 2003-03-28 07:43:22 +0000 | [diff] [blame] | 1 | -*- mode: Outline -*- |
mostang.com!davidm | 7fbfe0a | 2002-02-15 23:22:05 +0000 | [diff] [blame] | 2 | |
hp.com!davidm | def37e7 | 2005-05-03 09:13:17 +0000 | [diff] [blame] | 3 | This is version 0.99 of the unwind library. This library supports |
| 4 | several architecture/operating-system combinations: |
mostang.com!davidm | 7fbfe0a | 2002-02-15 23:22:05 +0000 | [diff] [blame] | 5 | |
hp.com!davidm | def37e7 | 2005-05-03 09:13:17 +0000 | [diff] [blame] | 6 | 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. |
David Mosberger-Tang | 955d127 | 2007-08-06 20:26:50 -0600 | [diff] [blame] | 11 | Linux/PPC64: Newly added. |
Konstantin Belousov | 7169958 | 2010-04-04 12:03:15 +0300 | [diff] [blame] | 12 | FreeBSD/i386: Newly added. |
| 13 | FreeBSD/x86-64: Newly added (FreeBSD architecture is known as amd64). |
(none)!davidm | e9892bb | 2004-04-23 01:32:43 +0000 | [diff] [blame] | 14 | |
(none)!davidm | e9892bb | 2004-04-23 01:32:43 +0000 | [diff] [blame] | 15 | |
mostang.com!davidm | 594e7eb | 2003-03-28 07:43:22 +0000 | [diff] [blame] | 16 | * General Build Instructions |
| 17 | |
| 18 | In general, this library can be built and installed with the following |
| 19 | commands: |
mostang.com!davidm | 7fbfe0a | 2002-02-15 23:22:05 +0000 | [diff] [blame] | 20 | |
Arun Sharma | 46ea106 | 2010-03-02 21:18:57 -0800 | [diff] [blame] | 21 | $ autoreconf -i # Needed only for building from git. Depends on libtool. |
mostang.com!davidm | 354f1c7 | 2002-02-23 20:27:03 +0000 | [diff] [blame] | 22 | $ ./configure |
mostang.com!davidm | 7fbfe0a | 2002-02-15 23:22:05 +0000 | [diff] [blame] | 23 | $ make |
| 24 | $ make install prefix=PREFIX |
| 25 | |
mostang.com!davidm | 354f1c7 | 2002-02-23 20:27:03 +0000 | [diff] [blame] | 26 | where PREFIX is the installation prefix. By default, a prefix of |
| 27 | /usr/local is used, such that libunwind.a is installed in |
| 28 | /usr/local/lib and unwind.h is installed in /usr/local/include. For |
| 29 | testing, you may want to use a prefix of /usr/local instead. |
mostang.com!davidm | 7fbfe0a | 2002-02-15 23:22:05 +0000 | [diff] [blame] | 30 | |
hp.com!davidm | 3f9c0bc | 2003-09-24 21:51:53 +0000 | [diff] [blame] | 31 | |
hp.com!davidm | ef00f95 | 2003-11-27 07:17:47 +0000 | [diff] [blame] | 32 | * Building with Intel compiler |
| 33 | |
hp.com!davidm | 75b6719 | 2004-10-15 13:37:27 +0000 | [diff] [blame] | 34 | ** Version 8 and later |
| 35 | |
| 36 | Starting with version 8, the preferred name for the IA-64 Intel |
| 37 | compiler is "icc" (same name as on x86). Thus, the configure-line |
| 38 | should look like this: |
| 39 | |
| 40 | $ ./configure CC=icc CFLAGS="-g -O3 -ip" CXX=icc CCAS=gcc CCASFLAGS=-g \ |
| 41 | LDFLAGS="-L$PWD/src/.libs" |
| 42 | |
hp.com!davidm | def37e7 | 2005-05-03 09:13:17 +0000 | [diff] [blame] | 43 | |
mostang.com!davidm | 8d057cb | 2003-04-03 07:59:15 +0000 | [diff] [blame] | 44 | * Building on HP-UX |
| 45 | |
| 46 | For the time being, libunwind must be built with GCC on HP-UX. |
mostang.com!davidm | f2b4060 | 2004-05-04 22:24:50 +0000 | [diff] [blame] | 47 | |
| 48 | libunwind should be configured and installed on HP-UX like this: |
| 49 | |
| 50 | $ ./configure CFLAGS="-g -O2 -mlp64" CXXFLAGS="-g -O2 -mlp64" |
| 51 | |
| 52 | Caveat: Unwinding of 32-bit (ILP32) binaries is not supported |
| 53 | at the moment. |
| 54 | |
| 55 | ** Workaround for older versions of GCC |
| 56 | |
| 57 | GCC v3.0 and GCC v3.2 ship with a bad version of sys/types.h. The |
| 58 | workaround is to issue the following commands before running |
| 59 | "configure": |
mostang.com!davidm | 8d057cb | 2003-04-03 07:59:15 +0000 | [diff] [blame] | 60 | |
| 61 | $ mkdir $top_dir/include/sys |
| 62 | $ cp /usr/include/sys/types.h $top_dir/include/sys |
| 63 | |
mostang.com!davidm | f2b4060 | 2004-05-04 22:24:50 +0000 | [diff] [blame] | 64 | GCC v3.3.2 or later have been fixed and do not require this |
| 65 | workaround. |
hp.com!davidm | ef00f95 | 2003-11-27 07:17:47 +0000 | [diff] [blame] | 66 | |
Jose Flavio Aguilar Paulino | 3e24581 | 2007-08-24 10:54:00 -0600 | [diff] [blame] | 67 | * Building for PowerPC64 / Linux |
| 68 | |
| 69 | For building for power64 you should use: |
| 70 | |
| 71 | $ ./configure CFLAGS="-g -O2 -m64" CXXFLAGS="-g -O2 -m64" |
| 72 | |
| 73 | If your power support altivec registers: |
| 74 | $ ./configure CFLAGS="-g -O2 -m64 -maltivec" CXXFLAGS="-g -O2 -m64 -maltivec" |
| 75 | |
| 76 | To check if your processor has support for vector registers (altivec): |
| 77 | cat /proc/cpuinfo | grep altivec |
| 78 | and should have something like this: |
| 79 | cpu : PPC970, altivec supported |
| 80 | |
| 81 | If libunwind seems to not work (backtracing failing), try to compile |
| 82 | it with -O0, without optimizations. There are some compiler problems |
| 83 | depending on the version of your gcc. |
| 84 | |
Konstantin Belousov | 7169958 | 2010-04-04 12:03:15 +0300 | [diff] [blame] | 85 | * Building on FreeBSD |
| 86 | |
| 87 | General building instructions apply. To build and execute several tests, |
| 88 | you need libexecinfo library available in ports as devel/libexecinfo. |
| 89 | |
Konstantin Belousov | 601919e | 2010-04-04 12:39:16 +0300 | [diff] [blame] | 90 | Development of the port was done of FreeBSD 8.0-STABLE. The library |
| 91 | was build with the system compiler that is modified version of gcc 4.2.1, |
| 92 | as well as the gcc 4.4.3. |
hp.com!davidm | def37e7 | 2005-05-03 09:13:17 +0000 | [diff] [blame] | 93 | |
mostang.com!davidm | 594e7eb | 2003-03-28 07:43:22 +0000 | [diff] [blame] | 94 | * Regression Testing |
| 95 | |
| 96 | After building the library, you can run a set of regression tests with: |
| 97 | |
| 98 | $ make check |
| 99 | |
hp.com!davidm | ef00f95 | 2003-11-27 07:17:47 +0000 | [diff] [blame] | 100 | ** Expected results on IA-64 Linux |
| 101 | |
hp.com!davidm | b8e952c | 2003-11-19 23:15:58 +0000 | [diff] [blame] | 102 | Unless you have a very recent C library and compiler installed, it is |
hp.com!davidm | ef00f95 | 2003-11-27 07:17:47 +0000 | [diff] [blame] | 103 | currently expected to have the following tests fail on IA-64 Linux: |
mostang.com!davidm | 594e7eb | 2003-03-28 07:43:22 +0000 | [diff] [blame] | 104 | |
hp.com!davidm | b8e952c | 2003-11-19 23:15:58 +0000 | [diff] [blame] | 105 | Gtest-init (should pass starting with glibc-2.3.x/gcc-3.4) |
| 106 | Ltest-init (should pass starting with glibc-2.3.x/gcc-3.4) |
| 107 | test-ptrace (should pass starting with glibc-2.3.x/gcc-3.4) |
| 108 | run-ia64-test-dyn1 (should pass starting with glibc-2.3.x) |
| 109 | |
| 110 | This does not mean that libunwind cannot be used with older compilers |
| 111 | or C libraries, it just means that for certain corner cases, unwinding |
| 112 | will fail. Since they're corner cases, it is not likely for |
| 113 | applications to trigger them. |
mostang.com!davidm | 594e7eb | 2003-03-28 07:43:22 +0000 | [diff] [blame] | 114 | |
hp.com!davidm | 75b6719 | 2004-10-15 13:37:27 +0000 | [diff] [blame] | 115 | Note: If you get lots of errors in Gia64-test-nat and Lia64-test-nat, it's |
| 116 | almost certainly a sign of an old assembler. The GNU assembler used |
| 117 | to encode previous-stack-pointer-relative offsets incorrectly. |
| 118 | This bug was fixed on 21-Sep-2004 so any later assembler will be |
| 119 | fine. |
| 120 | |
hp.com!davidm | ef00f95 | 2003-11-27 07:17:47 +0000 | [diff] [blame] | 121 | ** Expected results on x86 Linux |
| 122 | |
| 123 | The following tests are expected to fail on x86 Linux: |
| 124 | |
David Mosberger-Tang | 955d127 | 2007-08-06 20:26:50 -0600 | [diff] [blame] | 125 | Gtest-resume-sig (fails to get SIGUSR2) |
| 126 | Ltest-resume-sig (likewise) |
hp.com!davidm | def37e7 | 2005-05-03 09:13:17 +0000 | [diff] [blame] | 127 | Gtest-dyn1 (no dynamic unwind info support yet) |
| 128 | Ltest-dyn1 (no dynamic unwind info support yet) |
| 129 | test-setjmp (longjmp() not implemented yet) |
| 130 | run-check-namespace (no _Ux86_getcontext yet) |
David Mosberger-Tang | 955d127 | 2007-08-06 20:26:50 -0600 | [diff] [blame] | 131 | test-ptrace |
hp.com!davidm | def37e7 | 2005-05-03 09:13:17 +0000 | [diff] [blame] | 132 | |
| 133 | ** Expected results on x86-64 Linux |
| 134 | |
| 135 | The following tests are expected to fail on x86-64 Linux: |
| 136 | |
| 137 | Gtest-dyn1 (no dynamic unwind info support yet) |
| 138 | Ltest-dyn1 (no dynamic unwind info support yet) |
| 139 | Gtest-init (see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18743) |
| 140 | Ltest-init (likewise) |
| 141 | test-async-sig (crashes due to bad unwind-info?) |
| 142 | test-setjmp (longjmp() not implemented yet) |
| 143 | run-check-namespace (no _Ux86_64_getcontext yet) |
| 144 | run-ptrace-mapper (??? investigate) |
| 145 | run-ptrace-misc (see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18748 |
| 146 | and http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18749) |
| 147 | |
| 148 | ** Expected results on PARISC Linux |
| 149 | |
| 150 | Caveat: GCC v3.4 or newer is needed on PA-RISC Linux. Earlier |
| 151 | versions of the compiler failed to generate the exception-handling |
| 152 | program header (GNU_EH_FRAME) needed for unwinding. |
| 153 | |
| 154 | The following tests are expected to fail on x86-64 Linux: |
| 155 | |
| 156 | Gtest-bt (backtrace truncated at kill() due to lack of unwind-info) |
| 157 | Ltest-bt (likewise) |
| 158 | Gtest-resume-sig (Gresume.c:my_rt_sigreturn() is wrong somehow) |
| 159 | Ltest-resume-sig (likewise) |
| 160 | Gtest-init (likewise) |
| 161 | Ltest-init (likewise) |
| 162 | Gtest-dyn1 (no dynamic unwind info support yet) |
| 163 | Ltest-dyn1 (no dynamic unwind info support yet) |
| 164 | test-setjmp (longjmp() not implemented yet) |
| 165 | run-check-namespace (toolchain doesn't support HIDDEN yet) |
hp.com!davidm | ef00f95 | 2003-11-27 07:17:47 +0000 | [diff] [blame] | 166 | |
| 167 | ** Expected results on HP-UX |
| 168 | |
mostang.com!davidm | f2b4060 | 2004-05-04 22:24:50 +0000 | [diff] [blame] | 169 | "make check" is currently unsupported for HP-UX. You can try to run |
| 170 | it, but most tests will fail (and some may fail to terminate). The |
| 171 | only test programs that are known to work at this time are: |
| 172 | |
| 173 | tests/bt |
| 174 | tests/Gperf-simple |
| 175 | tests/test-proc-info |
| 176 | tests/test-static-link |
| 177 | tests/Gtest-init |
| 178 | tests/Ltest-init |
| 179 | tests/Gtest-resume-sig |
| 180 | tests/Ltest-resume-sig |
hp.com!davidm | ef00f95 | 2003-11-27 07:17:47 +0000 | [diff] [blame] | 181 | |
Jose Flavio Aguilar Paulino | 32e2187 | 2007-08-27 09:11:37 -0600 | [diff] [blame] | 182 | ** Expected results on PPC64 Linux |
| 183 | |
| 184 | "make check" should run with no more than 10 out of 24 tests failed. |
| 185 | |
| 186 | |
mostang.com!davidm | 065d455 | 2004-01-21 06:36:35 +0000 | [diff] [blame] | 187 | * Performance Testing |
| 188 | |
| 189 | This distribution includes a few simple performance tests which give |
| 190 | some idea of the basic cost of various libunwind operations. After |
| 191 | building the library, you can run these tests with the following |
| 192 | commands: |
| 193 | |
| 194 | $ cd tests |
| 195 | $ make perf |
| 196 | |
mostang.com!davidm | 594e7eb | 2003-03-28 07:43:22 +0000 | [diff] [blame] | 197 | * Contacting the Developers |
| 198 | |
mostang.com!davidm | 7fbfe0a | 2002-02-15 23:22:05 +0000 | [diff] [blame] | 199 | Please direct all questions regarding this library to: |
| 200 | |
David Mosberger-Tang | 8724722 | 2007-10-15 17:48:26 -0600 | [diff] [blame] | 201 | libunwind-devel@nongnu.org |
mostang.com!davidm | 7fbfe0a | 2002-02-15 23:22:05 +0000 | [diff] [blame] | 202 | |
David Mosberger-Tang | 8724722 | 2007-10-15 17:48:26 -0600 | [diff] [blame] | 203 | You can do this by sending a mail to libunwind-request@nongnu.org with |
| 204 | a body of: |
mostang.com!davidm | 7fbfe0a | 2002-02-15 23:22:05 +0000 | [diff] [blame] | 205 | |
David Mosberger-Tang | 8724722 | 2007-10-15 17:48:26 -0600 | [diff] [blame] | 206 | subscribe libunwind-devel |
mostang.com!davidm | 7fbfe0a | 2002-02-15 23:22:05 +0000 | [diff] [blame] | 207 | |
David Mosberger-Tang | 8724722 | 2007-10-15 17:48:26 -0600 | [diff] [blame] | 208 | or you can subscribe and manage your subscription via the |
| 209 | web-interface at: |
| 210 | |
| 211 | https://savannah.nongnu.org/mail/?group=libunwind |