README 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  1. -*- mode: Outline -*-
  2. This is version 1.0 of the unwind library. This library supports
  3. several architecture/operating-system combinations:
  4. Linux/x86-64: Works well.
  5. Linux/x86: Works well.
  6. Linux/ARM: Works well.
  7. Linux/IA-64: Fully tested and supported.
  8. Linux/PARISC: Works well, but C library missing unwind-info.
  9. HP-UX/IA-64: Mostly works but known to have some serious limitations.
  10. Linux/PPC64: Newly added.
  11. FreeBSD/i386: Newly added.
  12. FreeBSD/x86-64: Newly added (FreeBSD architecture is known as amd64).
  13. * General Build Instructions
  14. In general, this library can be built and installed with the following
  15. commands:
  16. $ autoreconf -i # Needed only for building from git. Depends on libtool.
  17. $ ./configure
  18. $ make
  19. $ make install prefix=PREFIX
  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.
  24. * Building with Intel compiler
  25. ** Version 8 and later
  26. Starting with version 8, the preferred name for the IA-64 Intel
  27. compiler is "icc" (same name as on x86). Thus, the configure-line
  28. should look like this:
  29. $ ./configure CC=icc CFLAGS="-g -O3 -ip" CXX=icc CCAS=gcc CCASFLAGS=-g \
  30. LDFLAGS="-L$PWD/src/.libs"
  31. * Building on HP-UX
  32. For the time being, libunwind must be built with GCC on HP-UX.
  33. libunwind should be configured and installed on HP-UX like this:
  34. $ ./configure CFLAGS="-g -O2 -mlp64" CXXFLAGS="-g -O2 -mlp64"
  35. Caveat: Unwinding of 32-bit (ILP32) binaries is not supported
  36. at the moment.
  37. ** Workaround for older versions of GCC
  38. GCC v3.0 and GCC v3.2 ship with a bad version of sys/types.h. The
  39. workaround is to issue the following commands before running
  40. "configure":
  41. $ mkdir $top_dir/include/sys
  42. $ cp /usr/include/sys/types.h $top_dir/include/sys
  43. GCC v3.3.2 or later have been fixed and do not require this
  44. workaround.
  45. * Building for PowerPC64 / Linux
  46. For building for power64 you should use:
  47. $ ./configure CFLAGS="-g -O2 -m64" CXXFLAGS="-g -O2 -m64"
  48. If your power support altivec registers:
  49. $ ./configure CFLAGS="-g -O2 -m64 -maltivec" CXXFLAGS="-g -O2 -m64 -maltivec"
  50. To check if your processor has support for vector registers (altivec):
  51. cat /proc/cpuinfo | grep altivec
  52. and should have something like this:
  53. cpu : PPC970, altivec supported
  54. If libunwind seems to not work (backtracing failing), try to compile
  55. it with -O0, without optimizations. There are some compiler problems
  56. depending on the version of your gcc.
  57. * Building on FreeBSD
  58. General building instructions apply. To build and execute several tests,
  59. you need libexecinfo library available in ports as devel/libexecinfo.
  60. Development of the port was done of FreeBSD 8.0-STABLE. The library
  61. was build with the system compiler that is modified version of gcc 4.2.1,
  62. as well as the gcc 4.4.3.
  63. * Regression Testing
  64. After building the library, you can run a set of regression tests with:
  65. $ make check
  66. ** Expected results on IA-64 Linux
  67. Unless you have a very recent C library and compiler installed, it is
  68. currently expected to have the following tests fail on IA-64 Linux:
  69. Gtest-init (should pass starting with glibc-2.3.x/gcc-3.4)
  70. Ltest-init (should pass starting with glibc-2.3.x/gcc-3.4)
  71. test-ptrace (should pass starting with glibc-2.3.x/gcc-3.4)
  72. run-ia64-test-dyn1 (should pass starting with glibc-2.3.x)
  73. This does not mean that libunwind cannot be used with older compilers
  74. or C libraries, it just means that for certain corner cases, unwinding
  75. will fail. Since they're corner cases, it is not likely for
  76. applications to trigger them.
  77. Note: If you get lots of errors in Gia64-test-nat and Lia64-test-nat, it's
  78. almost certainly a sign of an old assembler. The GNU assembler used
  79. to encode previous-stack-pointer-relative offsets incorrectly.
  80. This bug was fixed on 21-Sep-2004 so any later assembler will be
  81. fine.
  82. ** Expected results on x86 Linux
  83. The following tests are expected to fail on x86 Linux:
  84. Gtest-resume-sig (fails to get SIGUSR2)
  85. Ltest-resume-sig (likewise)
  86. Gtest-dyn1 (no dynamic unwind info support yet)
  87. Ltest-dyn1 (no dynamic unwind info support yet)
  88. test-setjmp (longjmp() not implemented yet)
  89. run-check-namespace (no _Ux86_getcontext yet)
  90. test-ptrace
  91. ** Expected results on x86-64 Linux
  92. The following tests are expected to fail on x86-64 Linux:
  93. Gtest-dyn1 (no dynamic unwind info support yet)
  94. Ltest-dyn1 (no dynamic unwind info support yet)
  95. Gtest-init (see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18743)
  96. Ltest-init (likewise)
  97. test-async-sig (crashes due to bad unwind-info?)
  98. test-setjmp (longjmp() not implemented yet)
  99. run-check-namespace (no _Ux86_64_getcontext yet)
  100. run-ptrace-mapper (??? investigate)
  101. run-ptrace-misc (see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18748
  102. and http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18749)
  103. ** Expected results on PARISC Linux
  104. Caveat: GCC v3.4 or newer is needed on PA-RISC Linux. Earlier
  105. versions of the compiler failed to generate the exception-handling
  106. program header (GNU_EH_FRAME) needed for unwinding.
  107. The following tests are expected to fail on x86-64 Linux:
  108. Gtest-bt (backtrace truncated at kill() due to lack of unwind-info)
  109. Ltest-bt (likewise)
  110. Gtest-resume-sig (Gresume.c:my_rt_sigreturn() is wrong somehow)
  111. Ltest-resume-sig (likewise)
  112. Gtest-init (likewise)
  113. Ltest-init (likewise)
  114. Gtest-dyn1 (no dynamic unwind info support yet)
  115. Ltest-dyn1 (no dynamic unwind info support yet)
  116. test-setjmp (longjmp() not implemented yet)
  117. run-check-namespace (toolchain doesn't support HIDDEN yet)
  118. ** Expected results on HP-UX
  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. tests/bt
  123. tests/Gperf-simple
  124. tests/test-proc-info
  125. tests/test-static-link
  126. tests/Gtest-init
  127. tests/Ltest-init
  128. tests/Gtest-resume-sig
  129. tests/Ltest-resume-sig
  130. ** Expected results on PPC64 Linux
  131. "make check" should run with no more than 10 out of 24 tests failed.
  132. * Performance Testing
  133. This distribution includes a few simple performance tests which give
  134. some idea of the basic cost of various libunwind operations. After
  135. building the library, you can run these tests with the following
  136. commands:
  137. $ cd tests
  138. $ make perf
  139. * Contacting the Developers
  140. Please direct all questions regarding this library to:
  141. libunwind-devel@nongnu.org
  142. You can do this by sending a mail to libunwind-request@nongnu.org with
  143. a body of:
  144. subscribe libunwind-devel
  145. or you can subscribe and manage your subscription via the
  146. web-interface at:
  147. https://savannah.nongnu.org/mail/?group=libunwind