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 | |
mostang.com!davidm | 594e7eb | 2003-03-28 07:43:22 +0000 | [diff] [blame] | 11 | * General Build Instructions |
| 12 | |
| 13 | In general, this library can be built and installed with the following |
| 14 | commands: |
mostang.com!davidm | 7fbfe0a | 2002-02-15 23:22:05 +0000 | [diff] [blame] | 15 | |
mostang.com!davidm | 354f1c7 | 2002-02-23 20:27:03 +0000 | [diff] [blame] | 16 | $ ./configure |
mostang.com!davidm | 7fbfe0a | 2002-02-15 23:22:05 +0000 | [diff] [blame] | 17 | $ make |
| 18 | $ make install prefix=PREFIX |
| 19 | |
mostang.com!davidm | 354f1c7 | 2002-02-23 20:27:03 +0000 | [diff] [blame] | 20 | where 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 |
| 23 | 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] | 24 | |
hp.com!davidm | 3f9c0bc | 2003-09-24 21:51:53 +0000 | [diff] [blame] | 25 | |
hp.com!davidm | ef00f95 | 2003-11-27 07:17:47 +0000 | [diff] [blame] | 26 | * Building with Intel compiler |
| 27 | |
| 28 | ** Up to version 7 |
mostang.com!davidm | 594e7eb | 2003-03-28 07:43:22 +0000 | [diff] [blame] | 29 | |
| 30 | To build libunwind with the Intel Electron compiler (ECC), it is |
| 31 | recommended to run configure like this: |
| 32 | |
| 33 | $ ./configure CC=ecc CXX=ecc CCAS=gcc |
| 34 | |
| 35 | The reason for this is that ECC uses the Intel assembler, which |
| 36 | doesn't grok some of the IA-64 assembly code in the "tests" directory. |
| 37 | |
| 38 | For an ECC-built version of libunwind to work properly, you also need |
| 39 | to ensure that /usr/include/asm/fpu.h contains a "long double" member |
| 40 | called "__dummy" in the declaration of "struct ia64_fpreg". Without |
| 41 | that member, variables of type unw_context_t won't be aligned |
| 42 | properly. |
| 43 | |
hp.com!davidm | ef00f95 | 2003-11-27 07:17:47 +0000 | [diff] [blame] | 44 | ** Version 8 and later |
| 45 | |
| 46 | Starting with version 8, the preferred name for the IA-64 Intel |
| 47 | compiler is "icc" (same name as on x86). Thus, the configure-line |
| 48 | should look like this: |
| 49 | |
hp.com!davidm | 758078f | 2004-04-20 16:53:44 +0000 | [diff] [blame^] | 50 | $ ./configure CC=icc CFLAGS="-g -O3 -ip" CXX=icc CCAS=gcc CCASFLAGS=-g \ |
| 51 | LDFLAGS="-L$PWD/src/.libs" |
hp.com!davidm | ef00f95 | 2003-11-27 07:17:47 +0000 | [diff] [blame] | 52 | |
mostang.com!davidm | 8d057cb | 2003-04-03 07:59:15 +0000 | [diff] [blame] | 53 | * Building on HP-UX |
| 54 | |
| 55 | 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] | 56 | Unfortunately, gcc-3.0 and gcc-3.2 ship with a bad version of |
| 57 | sys/types.h. The workaround for this is: |
mostang.com!davidm | 8d057cb | 2003-04-03 07:59:15 +0000 | [diff] [blame] | 58 | |
| 59 | $ mkdir $top_dir/include/sys |
| 60 | $ cp /usr/include/sys/types.h $top_dir/include/sys |
| 61 | |
hp.com!davidm | ef00f95 | 2003-11-27 07:17:47 +0000 | [diff] [blame] | 62 | Apart from this glitch, libunwind should configure and install on |
| 63 | HP-UX like this: |
| 64 | |
| 65 | $ ./configure CFLAGS="-g -O2 -mlp64" |
| 66 | |
| 67 | Caveat: Unwinding of 32-bit (ILP32) binaries is not supported |
| 68 | at the moment. |
| 69 | |
mostang.com!davidm | 594e7eb | 2003-03-28 07:43:22 +0000 | [diff] [blame] | 70 | * Regression Testing |
| 71 | |
| 72 | After building the library, you can run a set of regression tests with: |
| 73 | |
| 74 | $ make check |
| 75 | |
hp.com!davidm | ef00f95 | 2003-11-27 07:17:47 +0000 | [diff] [blame] | 76 | ** Expected results on IA-64 Linux |
| 77 | |
hp.com!davidm | b8e952c | 2003-11-19 23:15:58 +0000 | [diff] [blame] | 78 | 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] | 79 | 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] | 80 | |
hp.com!davidm | b8e952c | 2003-11-19 23:15:58 +0000 | [diff] [blame] | 81 | Gtest-init (should pass starting with glibc-2.3.x/gcc-3.4) |
| 82 | Ltest-init (should pass starting with glibc-2.3.x/gcc-3.4) |
| 83 | test-ptrace (should pass starting with glibc-2.3.x/gcc-3.4) |
| 84 | run-ia64-test-dyn1 (should pass starting with glibc-2.3.x) |
| 85 | |
| 86 | This does not mean that libunwind cannot be used with older compilers |
| 87 | or C libraries, it just means that for certain corner cases, unwinding |
| 88 | will fail. Since they're corner cases, it is not likely for |
| 89 | applications to trigger them. |
mostang.com!davidm | 594e7eb | 2003-03-28 07:43:22 +0000 | [diff] [blame] | 90 | |
hp.com!davidm | ef00f95 | 2003-11-27 07:17:47 +0000 | [diff] [blame] | 91 | ** Expected results on x86 Linux |
| 92 | |
| 93 | The following tests are expected to fail on x86 Linux: |
| 94 | |
| 95 | test-proc-info (x86 unwinder doesn't use unwind-info yet) |
| 96 | Gtest-exc (unw_resume() not implmented yet) |
| 97 | Ltest-exc (unw_resume() not implmented yet) |
| 98 | test-setjmp (unw_resume() not implmented yet) |
| 99 | |
| 100 | ** Expected results on HP-UX |
| 101 | |
| 102 | "make check" is currently unsupported for HP-UX. The only test |
| 103 | programs that are known to work at this time are tests/bt (which |
| 104 | produces various backtraces) and tests/Gperf-simple, which does some |
| 105 | simple performance measurements. |
| 106 | |
mostang.com!davidm | 065d455 | 2004-01-21 06:36:35 +0000 | [diff] [blame] | 107 | * Performance Testing |
| 108 | |
| 109 | This distribution includes a few simple performance tests which give |
| 110 | some idea of the basic cost of various libunwind operations. After |
| 111 | building the library, you can run these tests with the following |
| 112 | commands: |
| 113 | |
| 114 | $ cd tests |
| 115 | $ make perf |
| 116 | |
mostang.com!davidm | 594e7eb | 2003-03-28 07:43:22 +0000 | [diff] [blame] | 117 | * Contacting the Developers |
| 118 | |
mostang.com!davidm | 7fbfe0a | 2002-02-15 23:22:05 +0000 | [diff] [blame] | 119 | Please direct all questions regarding this library to: |
| 120 | |
| 121 | libunwind@linux.hpl.hp.com |
| 122 | |
| 123 | For spam protection, you'll have to subscribe to this list before |
| 124 | posting a question. You can do this by sending a mail to |
| 125 | libunwind-request@linux.hpl.hp.com with a body of: |
| 126 | |
| 127 | subscribe libunwind |
| 128 | |
| 129 | Note: the host that is running this list is behind a firewall, so |
| 130 | you'll not be able to use the Web interface to manage your |
| 131 | subscription. Send a mail containing "help" to |
| 132 | libunwind-request@linux.hpl.hp.com for information on how to manage |
| 133 | your subscription via email. |