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 | |
mostang.com!davidm | fab61cf | 2003-12-05 06:42:28 +0000 | [diff] [blame] | 3 | This is version 0.96 of the unwind library. At the moment, only the |
mostang.com!davidm | 594e7eb | 2003-03-28 07:43:22 +0000 | [diff] [blame] | 4 | IA-64 Linux (IPF Linux) platform is fully supported. Some very 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 |
| 6 | is based purely on the frame-chain and does not use unwind |
| 7 | information, so its utility is limited. Similarly, the HP-UX/IPF |
| 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 | If, 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 | |
| 29 | it indicates that you have a compiler which supports the `__thread' |
| 30 | keyword, but a runtime system (C library), which does not. As of |
| 31 | September 2003, this appears to be a common problem for Debian |
| 32 | "unstable" systems. To work around this issue, run "./configure" with |
| 33 | option "--disable-__thread". |
| 34 | |
| 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 | |
| 43 | $ ./configure CC=ecc CXX=ecc CCAS=gcc |
| 44 | |
| 45 | The reason for this is that ECC uses the Intel assembler, which |
| 46 | doesn't grok some of the IA-64 assembly code in the "tests" directory. |
| 47 | |
| 48 | For an ECC-built version of libunwind to work properly, you also need |
| 49 | to ensure that /usr/include/asm/fpu.h contains a "long double" member |
| 50 | called "__dummy" in the declaration of "struct ia64_fpreg". Without |
| 51 | that member, variables of type unw_context_t won't be aligned |
| 52 | properly. |
| 53 | |
hp.com!davidm | ef00f95 | 2003-11-27 07:17:47 +0000 | [diff] [blame] | 54 | ** Version 8 and later |
| 55 | |
| 56 | Starting with version 8, the preferred name for the IA-64 Intel |
| 57 | compiler is "icc" (same name as on x86). Thus, the configure-line |
| 58 | should look like this: |
| 59 | |
| 60 | $ ./configure CC=icc CXX=icc CCAS=gcc |
| 61 | |
mostang.com!davidm | 8d057cb | 2003-04-03 07:59:15 +0000 | [diff] [blame] | 62 | * Building on HP-UX |
| 63 | |
| 64 | 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] | 65 | Unfortunately, gcc-3.0 and gcc-3.2 ship with a bad version of |
| 66 | sys/types.h. The workaround for this is: |
mostang.com!davidm | 8d057cb | 2003-04-03 07:59:15 +0000 | [diff] [blame] | 67 | |
| 68 | $ mkdir $top_dir/include/sys |
| 69 | $ cp /usr/include/sys/types.h $top_dir/include/sys |
| 70 | |
hp.com!davidm | ef00f95 | 2003-11-27 07:17:47 +0000 | [diff] [blame] | 71 | Apart from this glitch, libunwind should configure and install on |
| 72 | HP-UX like this: |
| 73 | |
| 74 | $ ./configure CFLAGS="-g -O2 -mlp64" |
| 75 | |
| 76 | Caveat: Unwinding of 32-bit (ILP32) binaries is not supported |
| 77 | at the moment. |
| 78 | |
mostang.com!davidm | 594e7eb | 2003-03-28 07:43:22 +0000 | [diff] [blame] | 79 | * Regression Testing |
| 80 | |
| 81 | After building the library, you can run a set of regression tests with: |
| 82 | |
| 83 | $ make check |
| 84 | |
hp.com!davidm | ef00f95 | 2003-11-27 07:17:47 +0000 | [diff] [blame] | 85 | ** Expected results on IA-64 Linux |
| 86 | |
hp.com!davidm | b8e952c | 2003-11-19 23:15:58 +0000 | [diff] [blame] | 87 | 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] | 88 | 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] | 89 | |
hp.com!davidm | b8e952c | 2003-11-19 23:15:58 +0000 | [diff] [blame] | 90 | 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 | |
| 95 | This does not mean that libunwind cannot be used with older compilers |
| 96 | or C libraries, it just means that for certain corner cases, unwinding |
| 97 | will fail. Since they're corner cases, it is not likely for |
| 98 | applications to trigger them. |
mostang.com!davidm | 594e7eb | 2003-03-28 07:43:22 +0000 | [diff] [blame] | 99 | |
hp.com!davidm | ef00f95 | 2003-11-27 07:17:47 +0000 | [diff] [blame] | 100 | ** Expected results on x86 Linux |
| 101 | |
| 102 | The 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 |
| 112 | programs that are known to work at this time are tests/bt (which |
| 113 | produces various backtraces) and tests/Gperf-simple, which does some |
| 114 | simple performance measurements. |
| 115 | |
mostang.com!davidm | 065d455 | 2004-01-21 06:36:35 +0000 | [diff] [blame^] | 116 | * Performance Testing |
| 117 | |
| 118 | This distribution includes a few simple performance tests which give |
| 119 | some idea of the basic cost of various libunwind operations. After |
| 120 | building the library, you can run these tests with the following |
| 121 | commands: |
| 122 | |
| 123 | $ cd tests |
| 124 | $ make perf |
| 125 | |
mostang.com!davidm | 594e7eb | 2003-03-28 07:43:22 +0000 | [diff] [blame] | 126 | * Contacting the Developers |
| 127 | |
mostang.com!davidm | 7fbfe0a | 2002-02-15 23:22:05 +0000 | [diff] [blame] | 128 | Please direct all questions regarding this library to: |
| 129 | |
| 130 | libunwind@linux.hpl.hp.com |
| 131 | |
| 132 | For spam protection, you'll have to subscribe to this list before |
| 133 | posting a question. You can do this by sending a mail to |
| 134 | libunwind-request@linux.hpl.hp.com with a body of: |
| 135 | |
| 136 | subscribe libunwind |
| 137 | |
| 138 | Note: the host that is running this list is behind a firewall, so |
| 139 | you'll not be able to use the Web interface to manage your |
| 140 | subscription. Send a mail containing "help" to |
| 141 | libunwind-request@linux.hpl.hp.com for information on how to manage |
| 142 | your subscription via email. |