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 | |
(none)!davidm | e9892bb | 2004-04-23 01:32:43 +0000 | [diff] [blame^] | 64 | |
mostang.com!davidm | 8d057cb | 2003-04-03 07:59:15 +0000 | [diff] [blame] | 65 | * Building on HP-UX |
| 66 | |
| 67 | For the time being, libunwind must be built with GCC on HP-UX. |
hp.com!davidm | ef00f95 | 2003-11-27 07:17:47 +0000 | [diff] [blame] | 68 | Unfortunately, gcc-3.0 and gcc-3.2 ship with a bad version of |
| 69 | sys/types.h. The workaround for this is: |
mostang.com!davidm | 8d057cb | 2003-04-03 07:59:15 +0000 | [diff] [blame] | 70 | |
| 71 | $ mkdir $top_dir/include/sys |
| 72 | $ cp /usr/include/sys/types.h $top_dir/include/sys |
| 73 | |
hp.com!davidm | ef00f95 | 2003-11-27 07:17:47 +0000 | [diff] [blame] | 74 | Apart from this glitch, libunwind should configure and install on |
| 75 | HP-UX like this: |
| 76 | |
| 77 | $ ./configure CFLAGS="-g -O2 -mlp64" |
| 78 | |
| 79 | Caveat: Unwinding of 32-bit (ILP32) binaries is not supported |
| 80 | at the moment. |
| 81 | |
mostang.com!davidm | 594e7eb | 2003-03-28 07:43:22 +0000 | [diff] [blame] | 82 | * Regression Testing |
| 83 | |
| 84 | After building the library, you can run a set of regression tests with: |
| 85 | |
| 86 | $ make check |
| 87 | |
hp.com!davidm | ef00f95 | 2003-11-27 07:17:47 +0000 | [diff] [blame] | 88 | ** Expected results on IA-64 Linux |
| 89 | |
hp.com!davidm | b8e952c | 2003-11-19 23:15:58 +0000 | [diff] [blame] | 90 | 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] | 91 | 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] | 92 | |
hp.com!davidm | b8e952c | 2003-11-19 23:15:58 +0000 | [diff] [blame] | 93 | 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 | |
| 98 | This does not mean that libunwind cannot be used with older compilers |
| 99 | or C libraries, it just means that for certain corner cases, unwinding |
| 100 | will fail. Since they're corner cases, it is not likely for |
| 101 | applications to trigger them. |
mostang.com!davidm | 594e7eb | 2003-03-28 07:43:22 +0000 | [diff] [blame] | 102 | |
hp.com!davidm | ef00f95 | 2003-11-27 07:17:47 +0000 | [diff] [blame] | 103 | ** Expected results on x86 Linux |
| 104 | |
| 105 | The 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 |
| 115 | programs that are known to work at this time are tests/bt (which |
| 116 | produces various backtraces) and tests/Gperf-simple, which does some |
| 117 | simple performance measurements. |
| 118 | |
mostang.com!davidm | 065d455 | 2004-01-21 06:36:35 +0000 | [diff] [blame] | 119 | * Performance Testing |
| 120 | |
| 121 | This distribution includes a few simple performance tests which give |
| 122 | some idea of the basic cost of various libunwind operations. After |
| 123 | building the library, you can run these tests with the following |
| 124 | commands: |
| 125 | |
| 126 | $ cd tests |
| 127 | $ make perf |
| 128 | |
mostang.com!davidm | 594e7eb | 2003-03-28 07:43:22 +0000 | [diff] [blame] | 129 | * Contacting the Developers |
| 130 | |
mostang.com!davidm | 7fbfe0a | 2002-02-15 23:22:05 +0000 | [diff] [blame] | 131 | Please direct all questions regarding this library to: |
| 132 | |
| 133 | libunwind@linux.hpl.hp.com |
| 134 | |
| 135 | For spam protection, you'll have to subscribe to this list before |
| 136 | posting a question. You can do this by sending a mail to |
| 137 | libunwind-request@linux.hpl.hp.com with a body of: |
| 138 | |
| 139 | subscribe libunwind |
| 140 | |
| 141 | Note: the host that is running this list is behind a firewall, so |
| 142 | you'll not be able to use the Web interface to manage your |
| 143 | subscription. Send a mail containing "help" to |
| 144 | libunwind-request@linux.hpl.hp.com for information on how to manage |
| 145 | your subscription via email. |