patched libbacktrace
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

169 lines
4.3 KiB

libbacktrace: support MiniDebugInfo libbacktrace/ChangeLog: PR libbacktrace/93608 Add support for MiniDebugInfo. * elf.c (struct elf_view): Define. Replace most uses of backtrace_view with elf_view. (elf_get_view): New static functions. Replace most calls of backtrace_get_view with elf_get_view. (elf_release_view): New static functions. Replace most calls of backtrace_release_view with elf_release_view. (elf_uncompress_failed): Rename from elf_zlib_failed. Change all callers. (LZMA_STATES, LZMA_POS_STATES, LZMA_DIST_STATES): Define. (LZMA_DIST_SLOTS, LZMA_DIST_MODEL_START): Define. (LZMA_DIST_MODEL_END, LZMA_FULL_DISTANCES): Define. (LZMA_ALIGN_SIZE, LZMA_LEN_LOW_SYMBOLS): Define. (LZMA_LEN_MID_SYMBOLS, LZMA_LEN_HIGH_SYMBOLS): Define. (LZMA_LITERAL_CODERS_MAX, LZMA_LITERAL_CODER_SIZE): Define. (LZMA_PROB_IS_MATCH_LEN, LZMA_PROB_IS_REP_LEN): Define. (LZMA_PROB_IS_REP0_LEN, LZMA_PROB_IS_REP1_LEN): Define. (LZMA_PROB_IS_REP2_LEN, LZMA_PROB_IS_REP0_LONG_LEN): Define. (LZMA_PROB_DIST_SLOT_LEN, LZMA_PROB_DIST_SPECIAL_LEN): Define. (LZMA_PROB_DIST_ALIGN_LEN): Define. (LZMA_PROB_MATCH_LEN_CHOICE_LEN): Define. (LZMA_PROB_MATCH_LEN_CHOICE2_LEN): Define. (LZMA_PROB_MATCH_LEN_LOW_LEN): Define. (LZMA_PROB_MATCH_LEN_MID_LEN): Define. (LZMA_PROB_MATCH_LEN_HIGH_LEN): Define. (LZMA_PROB_REP_LEN_CHOICE_LEN): Define. (LZMA_PROB_REP_LEN_CHOICE2_LEN): Define. (LZMA_PROB_REP_LEN_LOW_LEN): Define. (LZMA_PROB_REP_LEN_MID_LEN): Define. (LZMA_PROB_REP_LEN_HIGH_LEN): Define. (LZMA_PROB_LITERAL_LEN): Define. (LZMA_PROB_IS_MATCH_OFFSET, LZMA_PROB_IS_REP_OFFSET): Define. (LZMA_PROB_IS_REP0_OFFSET, LZMA_PROB_IS_REP1_OFFSET): Define. (LZMA_PROB_IS_REP2_OFFSET): Define. (LZMA_PROB_IS_REP0_LONG_OFFSET): Define. (LZMA_PROB_DIST_SLOT_OFFSET): Define. (LZMA_PROB_DIST_SPECIAL_OFFSET): Define. (LZMA_PROB_DIST_ALIGN_OFFSET): Define. (LZMA_PROB_MATCH_LEN_CHOICE_OFFSET): Define. (LZMA_PROB_MATCH_LEN_CHOICE2_OFFSET): Define. (LZMA_PROB_MATCH_LEN_LOW_OFFSET): Define. (LZMA_PROB_MATCH_LEN_MID_OFFSET): Define. (LZMA_PROB_MATCH_LEN_HIGH_OFFSET): Define. (LZMA_PROB_REP_LEN_CHOICE_OFFSET): Define. (LZMA_PROB_REP_LEN_CHOICE2_OFFSET): Define. (LZMA_PROB_REP_LEN_LOW_OFFSET): Define. (LZMA_PROB_REP_LEN_MID_OFFSET): Define. (LZMA_PROB_REP_LEN_HIGH_OFFSET): Define. (LZMA_PROB_LITERAL_OFFSET): Define. (LZMA_PROB_TOTAL_COUNT): Define. (LZMA_IS_MATCH, LZMA_IS_REP, LZMA_IS_REP0): Define. (LZMA_IS_REP1, LZMA_IS_REP2, LZMA_IS_REP0_LONG): Define. (LZMA_DIST_SLOT, LZMA_DIST_SPECIAL, LZMA_DIST_ALIGN): Define. (LZMA_MATCH_LEN_CHOICE, LZMA_MATCH_LEN_CHOICE2): Define. (LZMA_MATCH_LEN_LOW, LZMA_MATCH_LEN_MID): Define. (LZMA_MATCH_LEN_HIGH, LZMA_REP_LEN_CHOICE): Define. (LZMA_REP_LEN_CHOICE2, LZMA_REP_LEN_LOW): Define. (LZMA_REP_LEN_MID, LZMA_REP_LEN_HIGH, LZMA_LITERAL): Define. (elf_lzma_varint): New static function. (elf_lzma_range_normalize): New static function. (elf_lzma_bit, elf_lzma_integer): New static functions. (elf_lzma_reverse_integer): New static function. (elf_lzma_len, elf_uncompress_lzma_block): New static functions. (elf_uncompress_lzma): New static function. (backtrace_uncompress_lzma): New function. (elf_add): Add memory and memory_size parameters. Change all callers. Look for .gnu_debugdata section, and, if found, decompress it and use it for symbols and debug info. Permit the descriptor parameter to be -1. * internal.h (backtrace_uncompress_lzma): Declare. * mtest.c: New file. * xztest.c: New file. * configure.ac: Check for nm, xz, and comm programs. Check for liblzma library. (HAVE_MINIDEBUG): Define. * Makefile.am (mtest_SOURCES): Define. (mtest_CFLAGS, mtest_LDADD): Define. (TESTS): Add mtest_minidebug if HAVE_MINIDEBUG. (%_minidebug): New pattern rule, if HAVE_MINIDEBUG. (xztest_SOURCES, xztest_CFLAGS, xztest_LDADD): Define. (xztest_alloc_SOURCES, xztest_alloc_CFLAGS): Define (xztest_alloc_LDADD): Define. (BUILDTESTS): Add mtest, xztest, xztest_alloc. (CLEANFILES): Add files created by minidebug pattern. (btest.lo): Correct INCDIR reference. (mtest.lo, xztest.lo, ztest.lo): New targets. * configure: Regenerate. * config.h.in: Regenerate. * Makefile.in: Regenerate. Close #38
1 year ago
  1. /* config.h.in. Generated from configure.ac by autoheader. */
  2. /* ELF size: 32 or 64 */
  3. #undef BACKTRACE_ELF_SIZE
  4. /* XCOFF size: 32 or 64 */
  5. #undef BACKTRACE_XCOFF_SIZE
  6. /* Define to 1 if you have the __atomic functions */
  7. #undef HAVE_ATOMIC_FUNCTIONS
  8. /* Define to 1 if you have the `clock_gettime' function. */
  9. #undef HAVE_CLOCK_GETTIME
  10. /* Define to 1 if you have the declaration of `getpagesize', and to 0 if you
  11. don't. */
  12. #undef HAVE_DECL_GETPAGESIZE
  13. /* Define to 1 if you have the declaration of `strnlen', and to 0 if you
  14. don't. */
  15. #undef HAVE_DECL_STRNLEN
  16. /* Define to 1 if you have the <dlfcn.h> header file. */
  17. #undef HAVE_DLFCN_H
  18. /* Define if dl_iterate_phdr is available. */
  19. #undef HAVE_DL_ITERATE_PHDR
  20. /* Define to 1 if you have the fcntl function */
  21. #undef HAVE_FCNTL
  22. /* Define if getexecname is available. */
  23. #undef HAVE_GETEXECNAME
  24. /* Define if _Unwind_GetIPInfo is available. */
  25. #undef HAVE_GETIPINFO
  26. /* Define to 1 if you have the <inttypes.h> header file. */
  27. #undef HAVE_INTTYPES_H
  28. /* Define to 1 if you have KERN_PROC and KERN_PROC_PATHNAME in <sys/sysctl.h>.
  29. */
  30. #undef HAVE_KERN_PROC
  31. /* Define to 1 if you have KERN_PROCARGS and KERN_PROC_PATHNAME in
  32. <sys/sysctl.h>. */
  33. #undef HAVE_KERN_PROC_ARGS
  34. /* Define if -llzma is available. */
  35. #undef HAVE_LIBLZMA
  36. /* Define to 1 if you have the <link.h> header file. */
  37. #undef HAVE_LINK_H
  38. /* Define if AIX loadquery is available. */
  39. #undef HAVE_LOADQUERY
  40. /* Define to 1 if you have the `lstat' function. */
  41. #undef HAVE_LSTAT
  42. /* Define to 1 if you have the <mach-o/dyld.h> header file. */
  43. #undef HAVE_MACH_O_DYLD_H
  44. /* Define to 1 if you have the <memory.h> header file. */
  45. #undef HAVE_MEMORY_H
  46. /* Define to 1 if you have the `readlink' function. */
  47. #undef HAVE_READLINK
  48. /* Define to 1 if you have the <stdint.h> header file. */
  49. #undef HAVE_STDINT_H
  50. /* Define to 1 if you have the <stdlib.h> header file. */
  51. #undef HAVE_STDLIB_H
  52. /* Define to 1 if you have the <strings.h> header file. */
  53. #undef HAVE_STRINGS_H
  54. /* Define to 1 if you have the <string.h> header file. */
  55. #undef HAVE_STRING_H
  56. /* Define to 1 if you have the __sync functions */
  57. #undef HAVE_SYNC_FUNCTIONS
  58. /* Define to 1 if you have the <sys/ldr.h> header file. */
  59. #undef HAVE_SYS_LDR_H
  60. /* Define to 1 if you have the <sys/mman.h> header file. */
  61. #undef HAVE_SYS_MMAN_H
  62. /* Define to 1 if you have the <sys/stat.h> header file. */
  63. #undef HAVE_SYS_STAT_H
  64. /* Define to 1 if you have the <sys/types.h> header file. */
  65. #undef HAVE_SYS_TYPES_H
  66. /* Define to 1 if you have the <unistd.h> header file. */
  67. #undef HAVE_UNISTD_H
  68. /* Define if -lz is available. */
  69. #undef HAVE_ZLIB
  70. /* Define to the sub-directory in which libtool stores uninstalled libraries.
  71. */
  72. #undef LT_OBJDIR
  73. /* Define to the address where bug reports for this package should be sent. */
  74. #undef PACKAGE_BUGREPORT
  75. /* Define to the full name of this package. */
  76. #undef PACKAGE_NAME
  77. /* Define to the full name and version of this package. */
  78. #undef PACKAGE_STRING
  79. /* Define to the one symbol short name of this package. */
  80. #undef PACKAGE_TARNAME
  81. /* Define to the home page for this package. */
  82. #undef PACKAGE_URL
  83. /* Define to the version of this package. */
  84. #undef PACKAGE_VERSION
  85. /* Define to 1 if you have the ANSI C header files. */
  86. #undef STDC_HEADERS
  87. /* Enable extensions on AIX 3, Interix. */
  88. #ifndef _ALL_SOURCE
  89. # undef _ALL_SOURCE
  90. #endif
  91. /* Enable GNU extensions on systems that have them. */
  92. #ifndef _GNU_SOURCE
  93. # undef _GNU_SOURCE
  94. #endif
  95. /* Enable threading extensions on Solaris. */
  96. #ifndef _POSIX_PTHREAD_SEMANTICS
  97. # undef _POSIX_PTHREAD_SEMANTICS
  98. #endif
  99. /* Enable extensions on HP NonStop. */
  100. #ifndef _TANDEM_SOURCE
  101. # undef _TANDEM_SOURCE
  102. #endif
  103. /* Enable general extensions on Solaris. */
  104. #ifndef __EXTENSIONS__
  105. # undef __EXTENSIONS__
  106. #endif
  107. /* Enable large inode numbers on Mac OS X 10.5. */
  108. #ifndef _DARWIN_USE_64_BIT_INODE
  109. # define _DARWIN_USE_64_BIT_INODE 1
  110. #endif
  111. /* Number of bits in a file offset, on hosts where this is settable. */
  112. #undef _FILE_OFFSET_BITS
  113. /* Define for large files, on AIX-style hosts. */
  114. #undef _LARGE_FILES
  115. /* Define to 1 if on MINIX. */
  116. #undef _MINIX
  117. /* Define to 2 if the system does not provide POSIX.1 features except with
  118. this defined. */
  119. #undef _POSIX_1_SOURCE
  120. /* Define to 1 if you need to in order for `stat' and other things to work. */
  121. #undef _POSIX_SOURCE