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 | 758078f | 2004-04-20 16:53:44 +0000 | [diff] [blame] | 3 | This is version 0.97 of the unwind library. At the moment, only the |
| 4 | IA-64 Linux (IPF Linux) platform is fully supported. Some basic |
hp.com!davidm | ef00f95 | 2003-11-27 07:17:47 +0000 | [diff] [blame] | 5 | support for x86 and HP-UX/IPF exists also. However, the x86 support |
hp.com!davidm | 758078f | 2004-04-20 16:53:44 +0000 | [diff] [blame] | 6 | is based mostly on the frame-chain and does not reliably use unwind |
| 7 | information yet, so its utility is limited. Similarly, the HP-UX/IPF |
hp.com!davidm | ef00f95 | 2003-11-27 07:17:47 +0000 | [diff] [blame] | 8 | support is incomplete, though it is sufficient to do a basic |
| 9 | backtrace. unw_resume() is not supported, however. |
mostang.com!davidm | 7fbfe0a | 2002-02-15 23:22:05 +0000 | [diff] [blame] | 10 | |
(none)!davidm | e9892bb | 2004-04-23 01:32:43 +0000 | [diff] [blame] | 11 | * Important GCC v3.4.0 Caveat |
| 12 | |
| 13 | GCC v3.4.0 breaks C++ ABI compatibility and because of that, libunwind |
| 14 | cannot easily be used as the unwinder for GCC v3.4.0. The GCC |
| 15 | developers are aware of the problem [1] and the expectation is that |
| 16 | the problem will be fixed with GCC v3.4.1. In the meantime, it may be |
| 17 | best to avoid using GCC v3.4.0. |
| 18 | |
| 19 | [1] http://gcc.gnu.org/ml/gcc/2004-04/msg00989.html |
| 20 | |
mostang.com!davidm | 594e7eb | 2003-03-28 07:43:22 +0000 | [diff] [blame] | 21 | * General Build Instructions |
| 22 | |
| 23 | In general, this library can be built and installed with the following |
| 24 | commands: |
mostang.com!davidm | 7fbfe0a | 2002-02-15 23:22:05 +0000 | [diff] [blame] | 25 | |
mostang.com!davidm | 354f1c7 | 2002-02-23 20:27:03 +0000 | [diff] [blame] | 26 | $ ./configure |
mostang.com!davidm | 7fbfe0a | 2002-02-15 23:22:05 +0000 | [diff] [blame] | 27 | $ make |
| 28 | $ make install prefix=PREFIX |
| 29 | |
mostang.com!davidm | 354f1c7 | 2002-02-23 20:27:03 +0000 | [diff] [blame] | 30 | where 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 |
| 33 | 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] | 34 | |
hp.com!davidm | 3f9c0bc | 2003-09-24 21:51:53 +0000 | [diff] [blame] | 35 | |
hp.com!davidm | ef00f95 | 2003-11-27 07:17:47 +0000 | [diff] [blame] | 36 | * Building with Intel compiler |
| 37 | |
| 38 | ** Up to version 7 |
mostang.com!davidm | 594e7eb | 2003-03-28 07:43:22 +0000 | [diff] [blame] | 39 | |
| 40 | To build libunwind with the Intel Electron compiler (ECC), it is |
| 41 | recommended to run configure like this: |
| 42 | |
(none)!davidm | e9892bb | 2004-04-23 01:32:43 +0000 | [diff] [blame] | 43 | $ ./configure CC=ecc CXX=ecc CCAS=gcc CCASFLAGS=-g \ |
| 44 | LDFLAGS="-L$PWD/src/.libs" |
mostang.com!davidm | 594e7eb | 2003-03-28 07:43:22 +0000 | [diff] [blame] | 45 | |
| 46 | The reason for this is that ECC uses the Intel assembler, which |
| 47 | doesn't grok some of the IA-64 assembly code in the "tests" directory. |
| 48 | |
| 49 | For an ECC-built version of libunwind to work properly, you also need |
| 50 | to ensure that /usr/include/asm/fpu.h contains a "long double" member |
| 51 | called "__dummy" in the declaration of "struct ia64_fpreg". Without |
| 52 | that member, variables of type unw_context_t won't be aligned |
| 53 | properly. |
| 54 | |
hp.com!davidm | ef00f95 | 2003-11-27 07:17:47 +0000 | [diff] [blame] | 55 | ** Version 8 and later |
| 56 | |
| 57 | Starting with version 8, the preferred name for the IA-64 Intel |
| 58 | compiler is "icc" (same name as on x86). Thus, the configure-line |
| 59 | should look like this: |
| 60 | |
hp.com!davidm | 758078f | 2004-04-20 16:53:44 +0000 | [diff] [blame] | 61 | $ ./configure CC=icc CFLAGS="-g -O3 -ip" CXX=icc CCAS=gcc CCASFLAGS=-g \ |
| 62 | LDFLAGS="-L$PWD/src/.libs" |
hp.com!davidm | ef00f95 | 2003-11-27 07:17:47 +0000 | [diff] [blame] | 63 | |
mostang.com!davidm | 8d057cb | 2003-04-03 07:59:15 +0000 | [diff] [blame] | 64 | * Building on HP-UX |
| 65 | |
| 66 | 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] | 67 | |
| 68 | libunwind should be configured and installed on HP-UX like this: |
| 69 | |
| 70 | $ ./configure CFLAGS="-g -O2 -mlp64" CXXFLAGS="-g -O2 -mlp64" |
| 71 | |
| 72 | Caveat: Unwinding of 32-bit (ILP32) binaries is not supported |
| 73 | at the moment. |
| 74 | |
| 75 | ** Workaround for older versions of GCC |
| 76 | |
| 77 | GCC v3.0 and GCC v3.2 ship with a bad version of sys/types.h. The |
| 78 | workaround is to issue the following commands before running |
| 79 | "configure": |
mostang.com!davidm | 8d057cb | 2003-04-03 07:59:15 +0000 | [diff] [blame] | 80 | |
| 81 | $ mkdir $top_dir/include/sys |
| 82 | $ cp /usr/include/sys/types.h $top_dir/include/sys |
| 83 | |
mostang.com!davidm | f2b4060 | 2004-05-04 22:24:50 +0000 | [diff] [blame] | 84 | GCC v3.3.2 or later have been fixed and do not require this |
| 85 | workaround. |
hp.com!davidm | ef00f95 | 2003-11-27 07:17:47 +0000 | [diff] [blame] | 86 | |
mostang.com!davidm | 594e7eb | 2003-03-28 07:43:22 +0000 | [diff] [blame] | 87 | * Regression Testing |
| 88 | |
| 89 | After building the library, you can run a set of regression tests with: |
| 90 | |
| 91 | $ make check |
| 92 | |
hp.com!davidm | ef00f95 | 2003-11-27 07:17:47 +0000 | [diff] [blame] | 93 | ** Expected results on IA-64 Linux |
| 94 | |
hp.com!davidm | b8e952c | 2003-11-19 23:15:58 +0000 | [diff] [blame] | 95 | 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] | 96 | 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] | 97 | |
hp.com!davidm | b8e952c | 2003-11-19 23:15:58 +0000 | [diff] [blame] | 98 | 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 | |
| 103 | This does not mean that libunwind cannot be used with older compilers |
| 104 | or C libraries, it just means that for certain corner cases, unwinding |
| 105 | will fail. Since they're corner cases, it is not likely for |
| 106 | applications to trigger them. |
mostang.com!davidm | 594e7eb | 2003-03-28 07:43:22 +0000 | [diff] [blame] | 107 | |
hp.com!davidm | ef00f95 | 2003-11-27 07:17:47 +0000 | [diff] [blame] | 108 | ** Expected results on x86 Linux |
| 109 | |
| 110 | The 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!davidm | f2b4060 | 2004-05-04 22:24:50 +0000 | [diff] [blame] | 119 | "make check" is currently unsupported for HP-UX. You can try to run |
| 120 | it, but most tests will fail (and some may fail to terminate). The |
| 121 | only 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!davidm | ef00f95 | 2003-11-27 07:17:47 +0000 | [diff] [blame] | 131 | |
mostang.com!davidm | 065d455 | 2004-01-21 06:36:35 +0000 | [diff] [blame] | 132 | * Performance Testing |
| 133 | |
| 134 | This distribution includes a few simple performance tests which give |
| 135 | some idea of the basic cost of various libunwind operations. After |
| 136 | building the library, you can run these tests with the following |
| 137 | commands: |
| 138 | |
| 139 | $ cd tests |
| 140 | $ make perf |
| 141 | |
mostang.com!davidm | 594e7eb | 2003-03-28 07:43:22 +0000 | [diff] [blame] | 142 | * Contacting the Developers |
| 143 | |
mostang.com!davidm | 7fbfe0a | 2002-02-15 23:22:05 +0000 | [diff] [blame] | 144 | Please direct all questions regarding this library to: |
| 145 | |
| 146 | libunwind@linux.hpl.hp.com |
| 147 | |
| 148 | For spam protection, you'll have to subscribe to this list before |
| 149 | posting a question. You can do this by sending a mail to |
| 150 | libunwind-request@linux.hpl.hp.com with a body of: |
| 151 | |
| 152 | subscribe libunwind |
| 153 | |
| 154 | Note: the host that is running this list is behind a firewall, so |
| 155 | you'll not be able to use the Web interface to manage your |
| 156 | subscription. Send a mail containing "help" to |
| 157 | libunwind-request@linux.hpl.hp.com for information on how to manage |
| 158 | your subscription via email. |