ChangeLog 58 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817
  1. 2022-04-05 Ian Lance Taylor <iant@golang.org>
  2. * elf.c (elf_zlib_inflate): Don't skip initial aligned byte in
  3. uncompressed block.
  4. 2022-02-17 Ian Lance Taylor <iant@golang.org>
  5. * dwarf.c (find_address_ranges): Handle skeleton units.
  6. (read_function_entry): Likewise.
  7. 2022-02-16 Ian Lance Taylor <iant@golang.org>
  8. * dwarf.c (build_address_map): Initialize DWARF 5 fields of unit.
  9. 2022-02-03 David Seifert <soap@gentoo.org>
  10. Jakub Jelinek <jakub@redhat.com>
  11. * configure.ac: Support --disable-werror.
  12. * configure: Regenerate.
  13. 2021-12-28 Francois-Xavier Coudert <fxcoudert@gmail.com>
  14. PR libbacktrace/103822
  15. * Makefile.am: Fix newline.
  16. * Makefile.in: Regenerate.
  17. 2021-11-12 Martin Liska <mliska@suse.cz>
  18. PR libbacktrace/103167
  19. * elf.c (elf_uncompress_lzma_block): Cast to unsigned int.
  20. (elf_uncompress_lzma): Likewise.
  21. * xztest.c (test_samples): memcpy only if v > 0.
  22. 2021-10-22 Martin Liska <mliska@suse.cz>
  23. PR testsuite/102742
  24. * btest.c (MIN_DESCRIPTOR): New.
  25. (MAX_DESCRIPTOR): Likewise.
  26. (check_available_files): Likewise.
  27. (check_open_files): Check only file descriptors that
  28. were not available at the entry.
  29. (main): Call check_available_files.
  30. 2021-08-13 Sergei Trofimovich <siarheit@google.com>
  31. * install-debuginfo-for-buildid.sh.in: Force non-localized readelf
  32. output with LANG=C.
  33. 2021-06-28 Clément Chigot <clement.chigot@atos.net>
  34. * xcoff.c (SSUBTYP_DWRNGES): New define.
  35. (xcoff_add): Use correct XCOFF DWARF section subtype
  36. for DEBUG_RANGES. Remove lineoff workaround.
  37. Adjust base_address.
  38. (xcoff_initialize_syminfo): Adapt to new base_address.
  39. (xcoff_lookup_pc): Likewise.
  40. (xcoff_initialize_fileline): Likewise.
  41. 2021-05-03 H.J. Lu <hjl.tools@gmail.com>
  42. PR bootstrap/99703
  43. * configure: Regenerated.
  44. 2021-03-03 Ian Lance Taylor <iant@golang.org>
  45. * dwarf.c (read_line_program): Don't special case file 0.
  46. (read_function_entry): Likewise.
  47. 2021-03-02 Ian Lance Taylor <iant@golang.org>
  48. PR libbacktrace/98818
  49. * dwarf.c (dwarf_buf_error): Add errnum parameter. Change all
  50. callers.
  51. * backtrace.h: Update backtrace_error_callback comment.
  52. 2021-02-12 Ian Lance Taylor <iant@golang.org>
  53. * configure.ac: Check for objcopy --add-gnu-debuglink by using
  54. objcopy --help.
  55. * configure: Regenerate
  56. 2021-01-18 Ian Lance Taylor <iant@golang.org>
  57. * Makefile.am (%_dwz): If dwz fails, use uncompressed debug info.
  58. * Makefile.in: Regenerate.
  59. * configure: Regenerate.
  60. 2021-01-18 Ian Lance Taylor <iant@golang.org>
  61. PR debug/98716
  62. * dwarf.c (read_v2_paths): Allocate zero entry for dirs and
  63. filenames.
  64. (read_line_program): Remove parameter u, change caller. Don't
  65. subtract one from dirs and filenames index.
  66. (read_function_entry): Don't subtract one from filenames index.
  67. 2021-01-05 Samuel Thibault <samuel.thibault@ens-lyon.org>
  68. * configure: Re-generate.
  69. 2020-12-05 Iain Sandoe <iain@sandoe.co.uk>
  70. PR target/97865
  71. * configure: Regenerate.
  72. 2020-12-02 Ian Lance Taylor <iant@golang.org>
  73. * dwarf.c (resolve_string): Use > rather than >= to check whether
  74. string index extends past buffer.
  75. (resolve_addr_index): Similarly for address index.
  76. 2020-11-29 John David Anglin <danglin@gcc.gnu.org>
  77. * configure: Regenerate.
  78. 2020-10-20 Ian Lance Taylor <iant@golang.org>
  79. * internal.h (ATTRIBUTE_FALLTHROUGH): Define.
  80. * elf.c (elf_zlib_inflate): Use ATTRIBUTE_FALLTHROUGH.
  81. 2020-09-28 Ian Lance Taylor <iant@golang.org>
  82. PR libbacktrace/97082
  83. * Makefile.am (check_DATA): Add mtest.dSYM if USE_DSYMUTIL.
  84. * Makefile.in: Regenerate.
  85. 2020-09-28 Ian Lance Taylor <iant@golang.org>
  86. PR libbacktrace/97227
  87. * configure.ac (USE_DSYMUTIL): Define instead of HAVE_DSYMUTIL.
  88. * Makefile.am: Change all uses of HAVE_DSYMUTIL to USE_DSYMUTIL.
  89. * configure: Regenerate.
  90. * Makefile.in: Regenerate.
  91. 2020-09-23 Ian Lance Taylor <iant@golang.org>
  92. * dwarf.c (report_inlined_functions): Handle PC == -1 and PC ==
  93. p->low.
  94. (dwarf_lookup_pc): Likewise.
  95. 2020-09-17 Ian Lance Taylor <iant@golang.org>
  96. PR libbacktrace/97080
  97. * fileline.c (backtrace_syminfo_to_full_callback): New function.
  98. (backtrace_syminfo_to_full_error_callback): New function.
  99. * elf.c (elf_nodebug): Call syminfo_fn if possible.
  100. * internal.h (struct backtrace_call_full): Define.
  101. (backtrace_syminfo_to_full_callback): Declare.
  102. (backtrace_syminfo_to_full_error_callback): Declare.
  103. * mtest.c (f3): Only check all[i] if data.index permits.
  104. 2020-09-16 Iain Sandoe <iain@sandoe.co.uk>
  105. * macho.c (MACH_O_CPU_TYPE_PPC): New.
  106. (MACH_O_CPU_TYPE_PPC64): New.
  107. Add compile-tests for powerpc to the Mach-O variants.
  108. 2020-09-14 Ian Lance Taylor <iant@golang.org>
  109. PR libbacktrace/93608
  110. Add support for MiniDebugInfo.
  111. * elf.c (struct elf_view): Define. Replace most uses of
  112. backtrace_view with elf_view.
  113. (elf_get_view): New static functions. Replace most calls of
  114. backtrace_get_view with elf_get_view.
  115. (elf_release_view): New static functions. Replace most calls of
  116. backtrace_release_view with elf_release_view.
  117. (elf_uncompress_failed): Rename from elf_zlib_failed. Change all
  118. callers.
  119. (LZMA_STATES, LZMA_POS_STATES, LZMA_DIST_STATES): Define.
  120. (LZMA_DIST_SLOTS, LZMA_DIST_MODEL_START): Define.
  121. (LZMA_DIST_MODEL_END, LZMA_FULL_DISTANCES): Define.
  122. (LZMA_ALIGN_SIZE, LZMA_LEN_LOW_SYMBOLS): Define.
  123. (LZMA_LEN_MID_SYMBOLS, LZMA_LEN_HIGH_SYMBOLS): Define.
  124. (LZMA_LITERAL_CODERS_MAX, LZMA_LITERAL_CODER_SIZE): Define.
  125. (LZMA_PROB_IS_MATCH_LEN, LZMA_PROB_IS_REP_LEN): Define.
  126. (LZMA_PROB_IS_REP0_LEN, LZMA_PROB_IS_REP1_LEN): Define.
  127. (LZMA_PROB_IS_REP2_LEN, LZMA_PROB_IS_REP0_LONG_LEN): Define.
  128. (LZMA_PROB_DIST_SLOT_LEN, LZMA_PROB_DIST_SPECIAL_LEN): Define.
  129. (LZMA_PROB_DIST_ALIGN_LEN): Define.
  130. (LZMA_PROB_MATCH_LEN_CHOICE_LEN): Define.
  131. (LZMA_PROB_MATCH_LEN_CHOICE2_LEN): Define.
  132. (LZMA_PROB_MATCH_LEN_LOW_LEN): Define.
  133. (LZMA_PROB_MATCH_LEN_MID_LEN): Define.
  134. (LZMA_PROB_MATCH_LEN_HIGH_LEN): Define.
  135. (LZMA_PROB_REP_LEN_CHOICE_LEN): Define.
  136. (LZMA_PROB_REP_LEN_CHOICE2_LEN): Define.
  137. (LZMA_PROB_REP_LEN_LOW_LEN): Define.
  138. (LZMA_PROB_REP_LEN_MID_LEN): Define.
  139. (LZMA_PROB_REP_LEN_HIGH_LEN): Define.
  140. (LZMA_PROB_LITERAL_LEN): Define.
  141. (LZMA_PROB_IS_MATCH_OFFSET, LZMA_PROB_IS_REP_OFFSET): Define.
  142. (LZMA_PROB_IS_REP0_OFFSET, LZMA_PROB_IS_REP1_OFFSET): Define.
  143. (LZMA_PROB_IS_REP2_OFFSET): Define.
  144. (LZMA_PROB_IS_REP0_LONG_OFFSET): Define.
  145. (LZMA_PROB_DIST_SLOT_OFFSET): Define.
  146. (LZMA_PROB_DIST_SPECIAL_OFFSET): Define.
  147. (LZMA_PROB_DIST_ALIGN_OFFSET): Define.
  148. (LZMA_PROB_MATCH_LEN_CHOICE_OFFSET): Define.
  149. (LZMA_PROB_MATCH_LEN_CHOICE2_OFFSET): Define.
  150. (LZMA_PROB_MATCH_LEN_LOW_OFFSET): Define.
  151. (LZMA_PROB_MATCH_LEN_MID_OFFSET): Define.
  152. (LZMA_PROB_MATCH_LEN_HIGH_OFFSET): Define.
  153. (LZMA_PROB_REP_LEN_CHOICE_OFFSET): Define.
  154. (LZMA_PROB_REP_LEN_CHOICE2_OFFSET): Define.
  155. (LZMA_PROB_REP_LEN_LOW_OFFSET): Define.
  156. (LZMA_PROB_REP_LEN_MID_OFFSET): Define.
  157. (LZMA_PROB_REP_LEN_HIGH_OFFSET): Define.
  158. (LZMA_PROB_LITERAL_OFFSET): Define.
  159. (LZMA_PROB_TOTAL_COUNT): Define.
  160. (LZMA_IS_MATCH, LZMA_IS_REP, LZMA_IS_REP0): Define.
  161. (LZMA_IS_REP1, LZMA_IS_REP2, LZMA_IS_REP0_LONG): Define.
  162. (LZMA_DIST_SLOT, LZMA_DIST_SPECIAL, LZMA_DIST_ALIGN): Define.
  163. (LZMA_MATCH_LEN_CHOICE, LZMA_MATCH_LEN_CHOICE2): Define.
  164. (LZMA_MATCH_LEN_LOW, LZMA_MATCH_LEN_MID): Define.
  165. (LZMA_MATCH_LEN_HIGH, LZMA_REP_LEN_CHOICE): Define.
  166. (LZMA_REP_LEN_CHOICE2, LZMA_REP_LEN_LOW): Define.
  167. (LZMA_REP_LEN_MID, LZMA_REP_LEN_HIGH, LZMA_LITERAL): Define.
  168. (elf_lzma_varint): New static function.
  169. (elf_lzma_range_normalize): New static function.
  170. (elf_lzma_bit, elf_lzma_integer): New static functions.
  171. (elf_lzma_reverse_integer): New static function.
  172. (elf_lzma_len, elf_uncompress_lzma_block): New static functions.
  173. (elf_uncompress_lzma): New static function.
  174. (backtrace_uncompress_lzma): New function.
  175. (elf_add): Add memory and memory_size parameters. Change all
  176. callers. Look for .gnu_debugdata section, and, if found,
  177. decompress it and use it for symbols and debug info. Permit the
  178. descriptor parameter to be -1.
  179. * internal.h (backtrace_uncompress_lzma): Declare.
  180. * mtest.c: New file.
  181. * xztest.c: New file.
  182. * configure.ac: Check for nm, xz, and comm programs. Check for
  183. liblzma library.
  184. (HAVE_MINIDEBUG): Define.
  185. * Makefile.am (mtest_SOURCES): Define.
  186. (mtest_CFLAGS, mtest_LDADD): Define.
  187. (TESTS): Add mtest_minidebug if HAVE_MINIDEBUG.
  188. (%_minidebug): New pattern rule, if HAVE_MINIDEBUG.
  189. (xztest_SOURCES, xztest_CFLAGS, xztest_LDADD): Define.
  190. (xztest_alloc_SOURCES, xztest_alloc_CFLAGS): Define
  191. (xztest_alloc_LDADD): Define.
  192. (BUILDTESTS): Add mtest, xztest, xztest_alloc.
  193. (CLEANFILES): Add files created by minidebug pattern.
  194. (btest.lo): Correct INCDIR reference.
  195. (mtest.lo, xztest.lo, ztest.lo): New targets.
  196. * configure: Regenerate.
  197. * config.h.in: Regenerate.
  198. * Makefile.in: Regenerate.
  199. 2020-09-09 Ian Lance Taylor <iant@golang.org>
  200. * pecoff.c (coff_initialize_syminfo): Add is_64 parameter.
  201. (coff_add): Determine and pass is_64.
  202. 2020-09-09 Ian Lance Taylor <iant@golang.org>
  203. PR libbacktrace/96973
  204. * fileline.c (macho_get_executable_path): New static function.
  205. (fileline_initialize): Call macho_get_executable_path.
  206. 2020-09-09 Ian Lance Taylor <iant@golang.org>
  207. * dwarf.c (function_addrs_search): Compare against the next entry
  208. low address, not the high address.
  209. (unit_addrs_search): Likewise.
  210. (build_address_map): Add a trailing unit_addrs.
  211. (read_function_entry): Add a trailing function_addrs.
  212. (read_function_info): Likewise.
  213. (report_inlined_functions): Search backward for function_addrs
  214. match.
  215. (dwarf_lookup_pc): Search backward for unit_addrs and
  216. function_addrs matches.
  217. 2020-09-08 Ian Lance Taylor <iant@golang.org>
  218. * simple.c (simple_unwind): Correct comment spelling.
  219. 2020-09-08 Ian Lance Taylor <iant@golang.org>
  220. * macho.c (macho_add_dsym): Make space for '/' in dsym. Use
  221. correct length when freeing diralc.
  222. 2020-09-08 Ian Lance Taylor <iant@golang.org>
  223. PR libbacktrace/96973
  224. * macho.c (macho_add_fat): Correctly swap 32-bit file offset.
  225. 2020-09-08 Ian Lance Taylor <iant@golang.org>
  226. PR libbacktrace/96971
  227. * filetype.awk: Only match magic number at start of line.
  228. 2020-08-24 Ian Lance Taylor <iant@golang.org>
  229. * macho.c (MACH_O_MH_MAGIC_FAT_64): Define.
  230. (MACH_O_MH_CIGAM_FAT_64): Define.
  231. (struct macho_fat_arch_64): Define.
  232. (macho_add_fat): Add and use is_64 parameter.
  233. (macho_add): Recognize 64-bit fat files.
  234. 2020-07-30 H.J. Lu <hjl.tools@gmail.com>
  235. PR bootstrap/96202
  236. * configure: Regenerated.
  237. 2020-07-08 Ian Lance Taylor <iant@golang.org>
  238. * configure.ac: Test linker support for DWARF5
  239. * configure: Regenerate
  240. 2020-05-29 H.J. Lu <hjl.tools@gmail.com>
  241. PR bootstrap/95413
  242. * configure: Regenerated.
  243. 2020-05-15 H.J. Lu <hongjiu.lu@intel.com>
  244. PR bootstrap/95147
  245. * configure: Regenerated.
  246. 2020-05-14 H.J. Lu <hongjiu.lu@intel.com>
  247. * configure: Regenerated.
  248. 2020-05-13 Ian Lance Taylor <iant@golang.org>
  249. * ztest.c (test_large): Mark state ATTRIBUTE_UNUSED.
  250. 2020-05-13 Ian Lance Taylor <iant@golang.org>
  251. PR go/95061
  252. * posix.c (backtrace_open): Treat EACCESS like ENOENT.
  253. 2020-05-12 H.J. Lu <hongjiu.lu@intel.com>
  254. * Makefile.am (AM_CFLAGS): Add $(CET_HOST_FLAGS).
  255. * configure.ac: Add GCC_CET_HOST_FLAGS(CET_HOST_FLAGS) and
  256. AC_SUBST(CET_HOST_FLAGS). Clear CET_HOST_FLAGS if jit isn't
  257. enabled.
  258. * Makefile.in: Regenerated.
  259. * configure: Likewise.
  260. 2020-05-11 Ian Lance Taylor <iant@golang.org>
  261. PR libbacktrace/95012
  262. * configure.ac: Check for getpagesize declaration.
  263. * mmap.c: Declare getpagesize if necessary.
  264. * mmapio.c: Likewise.
  265. * configure: Regenerate.
  266. * config.h.in: Regenerate.
  267. * Makefile.in: Regenerate.
  268. 2020-05-09 Roland McGrath <mcgrathr@google.com>
  269. * elf.c (elf_add): Bail early if there are no section headers at all.
  270. 2020-05-09 Ian Lance Taylor <iant@golang.org>
  271. * elf.c (elf_add): Don't free strtab if an error occurs after
  272. recording symbol information.
  273. 2020-05-09 Ian Lance Taylor <iant@golang.org>
  274. PR libbacktrace/88745
  275. * macho.c: New file.
  276. * filetype.awk: Recognize Mach-O files.
  277. * Makefile.am (FORMAT_FILES): Add macho.c.
  278. (check_DATA): New variable. Set to .dSYM if HAVE_DSYMUTIL.
  279. (%.dSYM): New pattern target.
  280. (test_macho_SOURCES, test_macho_CFLAGS): New targets.
  281. (test_macho_LDADD): New target.
  282. (BUILDTESTS): Add test_macho.
  283. (macho.lo): Add dependencies.
  284. * configure.ac: Recognize macho file type. Check for
  285. mach-o/dyld.h. Don't try to run objcopy if we don't find it.
  286. Look for dsymutil and define a HAVE_DSYMUTIL conditional.
  287. * Makefile.in: Regenerate.
  288. * configure: Regenerate.
  289. * config.h.in: Regenerate.
  290. 2020-05-09 Ian Lance Taylor <iant@golang.org>
  291. * read.c (backtrace_get_view): Support short read.
  292. 2020-05-09 Ian Lance Taylor <iant@golang.org>
  293. * elf.c (elf_add): If debug sections are very large or far apart,
  294. read them individually rather than as a single view.
  295. 2020-05-08 Ian Lance Taylor <iant@golang.org>
  296. * fileline.c (sysctl_exec_name): New static function.
  297. (sysctl_exec_name1): New macro or static function.
  298. (sysctl_exec_name2): Likewise.
  299. (fileline_initialize): Try sysctl_exec_name[12].
  300. * configure.ac: Check for sysctl args to fetch executable name.
  301. * configure: Regenerate.
  302. * config.h.in: Regenerate.
  303. 2020-02-15 Ian Lance Taylor <iant@golang.org>
  304. * ztest.c (test_large): Update file to current libgo test file.
  305. 2020-02-03 Ian Lance Taylor <iant@golang.org>
  306. * Makefile.am (libbacktrace_TEST_CFLAGS): Define.
  307. (test_elf32_CFLAGS): Use $(libbacktrace_test_CFLAGS).
  308. (test_elf_64_CFLAGS, test_xcoff_32_CFLAGS): Likewise.
  309. (test_xcoff_64_CFLAGS, test_pecoff_CFLAGS): Likewise.
  310. (test_unknown_CFLAGS, unittest_CFLAGS): Likewise.
  311. (unittest_alloc_CFLAGS, allocfail_CFLAGS): Likewise.
  312. (b2test_CFLAGS, b3test_CFLAGS, btest_CFLAGS): Likewise.
  313. (btest_lto_CFLAGS, btest_alloc_CFLAGS, stest_CFLAGS): Likewise.
  314. (stest_alloc_CFLAGS): Likewise.
  315. * Makefile.in: Regenerate.
  316. * ztest.c (error_callback_compress): Mark vdata unused.
  317. (test_large): Add casts to avoid warnings.
  318. 2020-01-01 Jakub Jelinek <jakub@redhat.com>
  319. Update copyright years.
  320. 2019-12-13 Ian Lance Taylor <iant@golang.org>
  321. Add DWARF 5 support.
  322. * dwarf.c (struct attr): Add val field.
  323. (enum attr_val_encoding): Add ATTR_VAL_ADDDRESS_INDEX,
  324. ATTR_VAL_STRING_INDEX, ATTR_VAL_RNGLISTS_INDEX.
  325. (struct line_header): Add addrsize field.
  326. (struct line_header_format): Define.
  327. (struct unit): Add str_offsets_base, addr_base, and rnglists_base
  328. fields.
  329. (read_uint24): New static function.
  330. (read_attribute): Add implicit_val parameter. Replace dwarf_str
  331. and dwarf_str_size parameters with dwarf_sections parameter. Add
  332. support for new DWARF 5 forms. Change all callers.
  333. (resolve_string): New static function.
  334. (resolve_addr_index): Likewise.
  335. (read_abbrevs): Support DW_FORM_implicit_const.
  336. (struct pcrange): Add lowpc_is_addr_index, highpc_is_addr_Index,
  337. and ranges_is_index fields.
  338. (update_pcrange): Support DWARF 5 encodings.
  339. (add_high_low_range): New static function, split out of
  340. add_ranges.
  341. (add_ranges_from_ranges): Likewise.
  342. (add_ranges_from_rnglists): New static function.
  343. (add_ranges): Just call new helper functions.
  344. (find_address_ranges): Use resolve_string for strings, after
  345. reading all attributes. Handle new DWARF 5 attributes.
  346. (build_address_map): Support DWARF 5 compilation units.
  347. (read_v2_paths): New static function, split out of
  348. read_line_header.
  349. (read_lnct): New static function.
  350. (read_line_header_format_entries): Likewise.
  351. (read_line_header): Add ddata parameter. Support DWARF 5 line
  352. headers. Call new helper functions. Change all callers.
  353. (read_line_program): Use addrsize from line program header. Don't
  354. special case directory index 0 for DWARF 5.
  355. (read_referenced_name): Use resolve_string.
  356. (read_function_entry): Handle DWARF 5 encodings. Use
  357. resolve_string.
  358. * internal.h (enum dwarf_section): Add DEBUG_ADDR,
  359. DEBUG_STR_OFFSETS, DEBUG_LINE_STR, DEBUG_RNGLISTS.
  360. * elf.c (dwarf_section_names): Add new section names.
  361. * pecoff.c (dwarf_section_names): Likewise.
  362. * xcoff.c (xcoff_add): Clear dwarf_sections before setting
  363. fields.
  364. * configure.ac: Define HAVE_DWARF5 automake conditional.
  365. * Makefile.am (dwarf5_SOURCES): New variable if HAVE_DWARF5.
  366. (dwarf5_CFLAGS, dwarf5_LDADD): Likewise.
  367. (dwarf5_alloc_SOURCES, dwarf5_alloc_CFLAGS): Likewise.
  368. (dwarf5_alloc_LDADD): Likewise.
  369. (BUILDTESTS): Add dwarf5 tests if HAVE_DWARF5.
  370. (CLEANFILES, clean-local): Define.
  371. 2019-12-08 Ian Lance Taylor <iant@golang.org>
  372. * dwarf.c (struct pcrange): Define.
  373. (update_pcrange, add_ranges): New static functions.
  374. (add_unit_addr): Change signature to work with add_ranges. Don't
  375. add base_address here.
  376. (add_unit_ranges): Remove.
  377. (find_address_ranges): Replace str/ranges parameters with
  378. dwarf_sections. Use update_pcrange and add_ranges. Change all
  379. callers.
  380. (add_function_range): Change signature to work with add_ranges.
  381. Don't add base_address here.
  382. (add_function_ranges): Remove.
  383. (read_function_entry): Use update_pcrange and add_ranges.
  384. 2019-12-04 Ian Lance Taylor <iant@golang.org>
  385. * edtest.c (test1): Add noclone attribute.
  386. 2019-12-04 Ian Lance Taylor <iant@golang.org>
  387. * internal.h (enum dwarf_section): Define.
  388. (struct dwarf_sections): Define.
  389. (backtrace_dwarf_add): Update declaration to replace specific
  390. section parameters with dwarf_sections parameter.
  391. * dwarf.c (struct dwarf_data): Replace specific section fields
  392. with dwarf_sections field.
  393. (read_attribute): Use dwarf_sections with altlink.
  394. (build_address_map): Replace specific section parameters with
  395. dwarf_sections parameter. Change all callers.
  396. (read_line_info): Use dwarf_sections with ddata.
  397. (read_referenced_name): Likewise.
  398. (add_function_ranges): Likewise.
  399. (read_function_entry): Likewise.
  400. (read_function_info): Likewise.
  401. (build_dwarf_data): Replace specific section parameters with
  402. dwarf_sections parameter. Change all callers.
  403. (backtrace_dwarf_add): Likewise.
  404. * elf.c (enum debug_section): Remove.
  405. (dwarf_section_names): Remove .zdebug names.
  406. (elf_add): Track zsections separately. Build dwarf_sections.
  407. * pecoff.c (enum debug_section): Remove.
  408. (struct debug_section_info): Remove data field.
  409. (coff_add): Build dwarf_sections.
  410. * xcoff.c (enum dwarf_section): Remove. Replace DWSECT_xxx
  411. references with DEBUG_xxx references.
  412. (xcoff_add): Build dwarf_sections.
  413. 2019-09-27 Maciej W. Rozycki <macro@wdc.com>
  414. * configure: Regenerate.
  415. 2019-09-26 Ian Lance Taylor <iant@golang.org>
  416. PR libbacktrace/91908
  417. * pecoff.c (backtrace_initialize): Explicitly cast unchecked
  418. __sync_bool_compare_and_swap to void.
  419. * xcoff.c (backtrace_initialize): Likewise.
  420. 2019-09-03 Ulrich Weigand <uweigand@de.ibm.com>
  421. * configure.ac: Remove references to spu.
  422. * configure: Regenerate.
  423. 2019-05-24 Clement Chigot <clement.chigot@atos.net>
  424. * Makefile.am (BUILDTESTS): Remove test_elf, add test_elf_32 and
  425. test_elf_64.
  426. * Makefile.in: Regenerate.
  427. 2019-05-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
  428. * configure.ac (have_dl_iterate_phdr): Remove *-*-solaris2.10*
  429. handling.
  430. * configure: Regenerate.
  431. 2019-03-11 Ian Lance Taylor <iant@golang.org>
  432. PR libbacktrace/89669
  433. * Makefile.am (BUILDTESTS): Only add ztest and ztest_alloc if
  434. HAVE_ELF.
  435. * Makefile.in: Regenerate.
  436. 2019-02-26 Tom de Vries <tdevries@suse.de>
  437. * btest.c (test5): Allow global.* as minimal symbol name for global.
  438. 2019-02-26 Tom de Vries <tdevries@suse.de>
  439. * Makefile.am (TESTS): Only add b3test_dwz_buildid if HAVE_DWZ.
  440. * Makefile.in: Regenerate.
  441. 2019-02-12 Tom de Vries <tdevries@suse.de>
  442. PR libbacktrace/81983
  443. * dwarf.c (dwarf_lookup_pc): Don't call bsearch if nmemb == 0.
  444. 2019-02-10 Tom de Vries <tdevries@suse.de>
  445. * Makefile.am (BUILDTESTS): Add btest_lto.
  446. * Makefile.in: Regenerate.
  447. * btest.c (test1, f2, f3, test3, f22, f23): Declare with
  448. __attribute__((noclone)).
  449. 2019-02-08 Tom de Vries <tdevries@suse.de>
  450. * backtrace.c (backtrace_full): Declare with __attribute__((noinline)).
  451. * print.c (backtrace_print): Same.
  452. * simple.c (backtrace_simple): Same.
  453. 2019-02-08 Tom de Vries <tdevries@suse.de>
  454. PR libbacktrace/78063
  455. * dwarf.c (build_address_map): Keep all parsed units.
  456. (read_referenced_name_from_attr): Handle DW_FORM_ref_addr.
  457. 2019-01-31 Tom de Vries <tdevries@suse.de>
  458. PR libbacktrace/89136
  459. * elf.c (elf_add): Read build-id if with_buildid_data. Fix
  460. 'debugaltlink_name_len =+ 1'.
  461. 2019-01-29 Tom de Vries <tdevries@suse.de>
  462. * install-debuginfo-for-buildid.sh.in: New script.
  463. * Makefile.am (check_PROGRAMS): Add b2test and b3test.
  464. (TESTS): Add b2test_buildid and b3test_dwz_buildid.
  465. * Makefile.in: Regenerate.
  466. * configure.ac (HAVE_ELF): Set with AM_CONDITIONAL.
  467. (READELF): Set with AC_CHECK_PROG.
  468. (install-debuginfo-for-buildid.sh): Generate with AC_CONFIG_FILES.
  469. * configure: Regenerate.
  470. * elf.c (SYSTEM_BUILD_ID_DIR): Factor out of ...
  471. (elf_open_debugfile_by_buildid): ... here.
  472. 2019-01-29 Tom de Vries <tdevries@suse.de>
  473. * Makefile.am: Replace check_PROGRAMS with BUILDTESTS, except for
  474. allocfail.
  475. (TESTS): Don't add check_PROGRAMS. Add BUILDTESTS.
  476. (check_PROGRAMS): Add BUILDTESTS.
  477. * Makefile.in: Regenerate.
  478. 2019-01-28 Tom de Vries <tdevries@suse.de>
  479. * Makefile.am (xcoff_%.c): Generate sed result into temporary file.
  480. Use $< to access prerequisite.
  481. * Makefile.in: Regenerate.
  482. 2019-01-25 Nathan Sidwell <nathan@acm.org>
  483. * elf.c (elf_add): Pass "" filename to recursive call with
  484. separated debug.
  485. 2019-01-25 Tom de Vries <tdevries@suse.de>
  486. * elf.c (elf_add): When handling .gnu_debugaltlink, call elf_add with
  487. filename == "".
  488. * Makefile.am (TESTS): Add btest_dwz_gnudebuglink.
  489. * Makefile.in: Regenerate.
  490. 2019-01-25 Tom de Vries <tdevries@suse.de>
  491. * Makefile.am: Rewrite dtest rule into "%_gnudebuglink" pattern rule.
  492. (TESTS): Rename dtest to btest_gnudebuglink.
  493. * Makefile.in: Regenerate.
  494. 2019-01-23 Tom de Vries <tdevries@suse.de>
  495. * dwarf.c (struct unit): Use size_t for low_offset/high_offset fields.
  496. (units_search, find_unit): Use size_t for offset.
  497. (build_address_map): Use size_t for unit_offset.
  498. 2019-01-20 Gerald Pfeifer <gerald@pfeifer.com>
  499. * allocfail.c (main): Increase portability of printf statement.
  500. 2019-01-18 Ian Lance Taylor <iant@golang.org>
  501. PR libbacktrace/88890
  502. * mmapio.c (backtrace_get_view): Change size parameter to
  503. uint64_t. Check that value fits in size_t.
  504. * read.c (backtrace_get_view): Likewise.
  505. * internal.h (backtrace_get_view): Update declaration.
  506. * elf.c (elf_add): Pass shstrhdr->sh_size to backtrace_get_view.
  507. 2019-01-17 Tom de Vries <tdevries@suse.de>
  508. PR libbacktrace/82857
  509. * configure.ac (DWZ): Set with AC_CHECK_PROG.
  510. (HAVE_DWZ): Set with AM_CONDITIONAL.
  511. * configure: Regenerate.
  512. * Makefile.am (TESTS): Add btest_dwz.
  513. * Makefile.in: Regenerate.
  514. 2019-01-17 Tom de Vries <tdevries@suse.de>
  515. PR libbacktrace/82857
  516. * dwarf.c (enum attr_val_encoding): Add ATTR_VAL_REF_ALT_INFO.
  517. (read_attribute): Handle DW_FORM_GNU_ref_alt using
  518. ATTR_VAL_REF_ALT_INFO.
  519. (read_referenced_name_from_attr): Handle DW_FORM_GNU_ref_alt.
  520. 2019-01-17 Tom de Vries <tdevries@suse.de>
  521. * dwarf.c (struct unit): Add low_offset and high_offset fields.
  522. (struct unit_vector): New type.
  523. (struct dwarf_data): Add units and units_counts fields.
  524. (find_unit): New function.
  525. (find_address_ranges): Add and handle unit_tag parameter.
  526. (build_address_map): Add and handle units_vec parameter.
  527. (build_dwarf_data): Pass units_vec to build_address_map. Store resulting
  528. units vector.
  529. 2019-01-17 Tom de Vries <tdevries@suse.de>
  530. PR libbacktrace/82857
  531. * dwarf.c (read_attribute): Handle DW_FORM_GNU_strp_alt
  532. using altlink.
  533. 2019-01-17 Tom de Vries <tdevries@suse.de>
  534. * dwarf.c (enum attr_val_encoding): Add ATTR_VAL_NONE.
  535. (read_attribute): Add altlink parameter. Handle missing altlink for
  536. DW_FORM_GNU_strp_alt and DW_FORM_GNU_ref_alt.
  537. (find_address_ranges, build_address_map, build_dwarf_data): Add and
  538. handle altlink parameter.
  539. (read_referenced_name, read_function_entry): Add argument to
  540. read_attribute call.
  541. 2019-01-17 Tom de Vries <tdevries@suse.de>
  542. * dwarf.c (struct dwarf_data): Add altlink field.
  543. (backtrace_dwarf_add): Add and handle fileline_altlink parameter.
  544. * elf.c (elf_add): Add argument to backtrace_dwarf_add call.
  545. (phdr_callback, backtrace_initialize): Add argument to elf_add calls.
  546. * internal.h (backtrace_dwarf_add): Add fileline_altlink parameter.
  547. * pecoff.c (coff_add): Add argument to backtrace_dwarf_add call.
  548. * xcoff.c (xcoff_add): Same.
  549. 2019-01-17 Tom de Vries <tdevries@suse.de>
  550. * internal.h (backtrace_dwarf_add): Add fileline_entry parameter.
  551. * dwarf.c (backtrace_dwarf_add): Add and handle fileline_entry parameter.
  552. * elf.c (elf_add): Add and handle fileline_entry parameter. Add
  553. argument to backtrace_dwarf_add call.
  554. (phdr_callback, backtrace_initialize): Add argument to elf_add calls.
  555. * pecoff.c (coff_add): Add argument to backtrace_dwarf_add call.
  556. * xcoff.c (xcoff_add): Same.
  557. 2019-01-17 Tom de Vries <tdevries@suse.de>
  558. * elf.c (elf_add): Add and handle with_buildid_data and
  559. with_buildid_size parameters. Handle .gnu_debugaltlink section.
  560. (phdr_callback, backtrace_initialize): Add arguments to elf_add calls.
  561. 2019-01-16 Tom de Vries <tdevries@suse.de>
  562. * dwarf.c (read_referenced_name_from_attr): New function. Factor out
  563. of ...
  564. (read_referenced_name): ... here, and ...
  565. (read_function_entry): ... here.
  566. 2019-01-16 Tom de Vries <tdevries@suse.de>
  567. * dwarf.c (read_referenced_name): Don't allow DW_AT_name to override any
  568. name.
  569. (read_function_entry): Same. Don't allow name found via
  570. DW_AT_abstract_origin or case DW_AT_specification to override linkage
  571. name.
  572. 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
  573. PR other/16615
  574. * backtrace.h: Mechanically replace "can not" with "cannot".
  575. 2019-01-01 Jakub Jelinek <jakub@redhat.com>
  576. Update copyright years.
  577. 2018-12-29 Gerald Pfeifer <gerald@pfeifer.com>
  578. * Makefile.am (xcoff_%.c): Use an actual newline instead of \n
  579. in sed pattern.
  580. * Makefile.in: Regenerate.
  581. 2018-12-28 Tom de Vries <tdevries@suse.de>
  582. * dwarf.c (build_address_map): Reuse unused units.
  583. 2018-12-28 Tom de Vries <tdevries@suse.de>
  584. * dwarf.c (build_address_map): Simplify by removing local variable
  585. abbrevs.
  586. 2018-12-28 Ian Lance Taylor <iant@golang.org>
  587. Tom de Vries <tdevries@suse.de>
  588. PR libbacktrace/88063
  589. * dwarf.c (free_unit_addrs_vector): Remove.
  590. (build_address_map): Keep track of allocated units in vector. Free
  591. allocated units and corresponding abbrevs upon failure. Remove now
  592. redundant call to free_unit_addrs_vector. Free addrs vector upon
  593. failure. Free allocated unit vector.
  594. 2018-12-28 Tom de Vries <tdevries@suse.de>
  595. * dwarf.c (build_address_map): Free addrs vector upon failure.
  596. 2018-12-14 Tom de Vries <tdevries@suse.de>
  597. PR testsuite/88491
  598. * allocfail.sh: Remove "set -o pipefail".
  599. 2018-12-12 Tom de Vries <tdevries@suse.de>
  600. * Makefile.am (TESTS): Add allocfail.sh.
  601. (check_PROGRAMS): Add allocfail.
  602. * Makefile.in: Regenerate.
  603. * instrumented_alloc.c: New file. Redefine malloc and realloc.
  604. Include alloc.c.
  605. * allocfail.c: New file.
  606. * allocfail.sh: New file.
  607. 2018-11-30 Tom de Vries <tdevries@suse.de>
  608. * Makefile.am (check_PROGRAMS): Add test_elf, test_xcoff_32,
  609. test_xcoff_64, test_pecoff and test_unknown.
  610. * Makefile.in: Regenerate.
  611. * test_format.c: New file.
  612. 2018-11-30 Tom de Vries <tdevries@suse.de>
  613. * Makefile.am : Add _with_alloc version for each test in
  614. check_PROGRAMS.
  615. * Makefile.in: Regenerate.
  616. 2018-11-30 Tom de Vries <tdevries@suse.de>
  617. * internal.h (backtrace_vector_free): New static inline fuction,
  618. factored out of ...
  619. * dwarf.c (read_line_info): ... here.
  620. 2018-11-28 Tom de Vries <tdevries@suse.de>
  621. * dwarf.c (read_abbrevs): Fix handling of abbrevs->abbrevs allocation
  622. failure.
  623. 2018-11-27 Tom de Vries <tdevries@suse.de>
  624. * mmap.c (backtrace_vector_release): Same.
  625. * unittest.c (test1): Add check.
  626. 2018-11-27 Tom de Vries <tdevries@suse.de>
  627. * alloc.c (backtrace_vector_release): Handle vec->size == 0 using free
  628. instead of realloc.
  629. * Makefile.am (check_PROGRAMS): Add unittest.
  630. * Makefile.in: Regenerate.
  631. * unittest.c: New file.
  632. 2018-11-22 Tom de Vries <tdevries@suse.de>
  633. * dwarf.c (read_initial_length): Factor out of ...
  634. (build_address_map, read_line_info): ... here.
  635. 2018-11-21 Tom de Vries <tdevries@suse.de>
  636. * dwarf.c (read_string): Factor out of ...
  637. (read_attribute, read_line_header, read_line_program): ... here.
  638. 2018-10-31 Joseph Myers <joseph@codesourcery.com>
  639. PR bootstrap/82856
  640. * Makefile.am: Include multilib.am.
  641. * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE.
  642. * Makefile.in, aclocal.m4, config.h.in, configure: Regenerate.
  643. 2018-10-05 Ian Lance Taylor <iant@golang.org>
  644. PR libbacktrace/87529
  645. * backtrace.h: Document that backtrace_create_state should be
  646. called only once.
  647. 2018-08-05 Iain Buclaw <ibuclaw@gdcproject.org>
  648. * configure.ac: Move define of HAVE_ZLIB into check for -lz.
  649. * Makefile.in: Regenerate.
  650. * config.h.in: Likewise.
  651. * configure: Likewise.
  652. 2018-08-01 Tony Reix <tony.reix@atos.net>
  653. * xcoff.c (struct xcoff_line, struct xcoff_line_vector): Remove.
  654. (struct xcoff_func, struct xcoff_func_vector): New structs.
  655. (xcoff_syminfo): Drop leading dot from symbol name.
  656. (xcoff_line_compare, xcoff_line_search): Remove.
  657. (xcoff_func_compare, xcoff_func_search): New static functions.
  658. (xcoff_lookup_pc): Search function table.
  659. (xcoff_add_line, xcoff_process_linenos): Remove.
  660. (xcoff_initialize_fileline): Build function table.
  661. 2018-06-21 Denis Khalikov <d.khalikov@partner.samsung.com>
  662. PR other/86198
  663. * elf.c (elf_add): Increase ".note.gnu.build-id" section size
  664. checking up to 36 bytes.
  665. 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
  666. * configure: Regenerated.
  667. 2018-04-19 Jakub Jelinek <jakub@redhat.com>
  668. * configure: Regenerated.
  669. 2018-04-17 Ian Lance Taylor <iant@golang.org>
  670. * backtrace.c: Revert last two changes. Don't call mmap
  671. directly.
  672. 2018-04-17 Ian Lance Taylor <iant@golang.org>
  673. * backtrace.c: Include backtrace-supported.h before checking
  674. BACKTRACE_USES_MALLOC.
  675. 2018-04-17 Ian Lance Taylor <iant@golang.org>
  676. * backtrace.c (backtrace_full): When testing whether we can
  677. allocate memory, call mmap directly, and munmap the memory.
  678. 2018-04-04 Jakub Jelinek <jakub@redhat.com>
  679. PR other/85161
  680. * elf.c (elf_zlib_fetch): Fix up predefined macro names in test for
  681. big endian, only use 32-bit loads if endianity macros are predefined
  682. and indicate big or little endian.
  683. 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
  684. PR target/84148
  685. * configure: Regenerate.
  686. 2018-02-15 Jakub Jelinek <jakub@redhat.com>
  687. PR other/82368
  688. * elf.c (SHT_PROGBITS): Undefine and define.
  689. 2018-02-14 Jakub Jelinek <jakub@redhat.com>
  690. PR other/82368
  691. * elf.c (EM_PPC64, EF_PPC64_ABI): Undefine and define.
  692. (struct elf_ppc64_opd_data): New type.
  693. (elf_initialize_syminfo): Add opd argument, handle symbols
  694. pointing into the PowerPC64 ELFv1 .opd section.
  695. (elf_add): Read .opd section on PowerPC64 ELFv1, pass pointer
  696. to structure with .opd data to elf_initialize_syminfo.
  697. 2018-01-31 Ian Lance Taylor <iant@golang.org>
  698. * elf.c (elf_add): Close descriptor if we use a debugfile.
  699. * btest.c (check_open_files): New static function.
  700. (main): Call check_open_files.
  701. 2018-01-25 Ian Lance Taylor <iant@golang.org>
  702. * elf.c (elf_open_debugfile_by_debuglink): Don't check CRC if the
  703. desired CRC is zero.
  704. (elf_add): Don't clear *found_sym and *found_dwarf if debuginfo.
  705. 2018-01-25 Ian Lance Taylor <iant@golang.org>
  706. * pecoff.c (coff_add): Only release syms_view if it is valid.
  707. 2018-01-25 Ian Lance Taylor <iant@golang.org>
  708. * pecoff.c (coff_add): Another memcpy -> coff_read4 fix.
  709. 2018-01-24 Ian Lance Taylor <iant@golang.org>
  710. * pecoff.c (coff_add): Use coff_read4, not memcpy.
  711. 2018-01-24 Ian Lance Taylor <iant@golang.org>
  712. PR other/68239
  713. * mmap.c (backtrace_free_locked): Don't put more than 16 entries
  714. on the free list.
  715. 2018-01-19 Tony Reix <tony.reix@atos.net>
  716. * xcoff.c (xcoff_incl_compare): New function.
  717. (xcoff_incl_search): New function.
  718. (xcoff_process_linenos): Use bsearch to find include file.
  719. (xcoff_initialize_fileline): Sort include file information.
  720. 2018-01-16 Ian Lance Taylor <iant@golang.org>
  721. * elf.c (codes) [GENERATE_FIXED_HUFFMAN_TABLE]: Fix size to be
  722. 288.
  723. (main) [GENERATE_FIXED_HUFFMAN_TABLE]: Pass 288 to
  724. elf_zlib_inflate_table. Generate elf_zlib_default_dist_table.
  725. (elf_zlib_default_table): Update.
  726. (elf_zlib_default_dist_table): New static array.
  727. (elf_zlib_inflate): Use elf_zlib_default_dist_table for dist table
  728. for block type 1.
  729. * ztest.c (struct zlib_test): Add uncompressed_len.
  730. (tests): Initialize uncompressed_len field. Add new test case.
  731. (test_samples): Use uncompressed_len field.
  732. 2018-01-03 Jakub Jelinek <jakub@redhat.com>
  733. Update copyright years.
  734. 2017-11-17 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
  735. * configure.ac: Add CET_FLAGS to EXTRA_FLAGS.
  736. * aclocal.m4: Regenerate.
  737. * Makefile.in: Likewise.
  738. * configure: Likewise.
  739. 2017-10-06 Ian Lance Taylor <iant@golang.org>
  740. * ztest.c (test_large): Pass unsigned long *, not size_t *, to
  741. zlib uncompress function.
  742. 2017-10-05 Ian Lance Taylor <iant@golang.org>
  743. * elf.c (elf_zlib_fetch): Change pval argument to uint64_t *.
  744. Read a four byte integer.
  745. (elf_zlib_inflate): Change val to uint64_t. Align pin to a 32-bit
  746. boundary before ever calling elf_zlib_fetch.
  747. * ztest.c (test_large): Simplify print statements a bit.
  748. 2017-10-02 Ian Lance Taylor <iant@golang.org>
  749. * ztest.c: #include <errno.h>.
  750. (TEST_TIMING): Don't define, don't test.
  751. (xclock_gettime, xclockid_t): Define if !HAVE_CLOCK_GETTIME.
  752. (clockid_t, clock_gettime, CLOCK_REALTIME): Likewise.
  753. (ZLIB_CLOCK_GETTIME_ARG): Define.
  754. * configure.ac: Change clock_gettime_link to CLOCK_GETTIME_LINK.
  755. * Makefile.am: Likewise.
  756. * configure, Makefile.in: Rebuild.
  757. 2017-10-02 Thomas Schwinge <thomas@codesourcery.com>
  758. PR other/67165
  759. * Makefile.am: Append the content of clock_gettime_link to
  760. ztest_LDADD.
  761. * configure.ac: Test for the case that clock_gettime is in librt.
  762. * Makefile.in: Regenerate.
  763. * configure: Likewise.
  764. PR other/67165
  765. * configure.ac: Check for clock_gettime.
  766. * config.h.in: Regenerate.
  767. * configure: Likewise.
  768. * ztest.c (average_time, test_large): Conditionalize test timing
  769. on clock_gettime availability.
  770. 2017-09-29 Tony Reix <tony.reix@atos.net>
  771. * xcoff.c: Initial support for DWARF debug sections in XCOFF.
  772. (STYP_DWARF, SSUBTYP_DW*): Define.
  773. (enum dwarf_section): Define.
  774. (struct dwsect_info): Define.
  775. (xcoff_add): Look for DWARF sections, pass them to
  776. backtrace_dwarf_add.
  777. 2017-09-28 Ian Lance Taylor <iant@golang.org>
  778. PR other/67165
  779. * elf.c (__builtin_prefetch): Define if not __GNUC__.
  780. (unlikely): Define.
  781. (SHF_UNCOMPRESSED, ELFCOMPRESS_ZLIB): Define.
  782. (b_elf_chdr): Define type.
  783. (enum debug_section): Add ZDEBUG_xxx values.
  784. (debug_section_names): Add names for new sections.
  785. (struct debug_section_info): Add compressed field.
  786. (elf_zlib_failed, elf_zlib_fetch): New static functions.
  787. (HUFFMAN_TABLE_SIZE, HUFFMAN_VALUE_MASK): Define.
  788. (HUFFMAN_BITS_SHIFT, HUFFMAN_BITS_MASK): Define.
  789. (HUFFMAN_SECONDARY_SHIFT): Define.
  790. (ZDEBUG_TABLE_SIZE): Define.
  791. (ZDEBUG_TABLE_CODELEN_OFFSET, ZDEBUG_TABLE_WORK_OFFSET): Define.
  792. (final_next_secondary): New static variable if
  793. BACKTRACE_GENERATE_FIXED_HUFFMAN_TABLE.
  794. (elf_zlib_inflate_table): New static function.
  795. (BACKTRACE_GENERATE_FIXED_HUFFMAN_TABLE): If define, define main
  796. function to produce fixed Huffman table.
  797. (elf_zlib_default_table): New static variable.
  798. (elf_zlib_inflate): New static function.
  799. (elf_zlib_verify_checksum): Likewise.
  800. (elf_zlib_inflate_and_verify): Likewise.
  801. (elf_uncompress_zdebug): Likewise.
  802. (elf_uncompress_chdr): Likewise.
  803. (backtrace_uncompress_zdebug): New extern function.
  804. (elf_add): Look for .zdebug sections and SHF_COMPRESSED debug
  805. sections, and uncompress them.
  806. * internal.h (backtrace_compress_zdebug): Declare.
  807. * ztest.c: New file.
  808. * configure.ac: Check for -lz and check whether the linker
  809. supports --compress-debug-sections.
  810. * Makefile.am (ztest_SOURCES): New variable.
  811. (ztest_CFLAGS, ztest_LDADD): New variables.
  812. (check_PROGRAMS): Add ztest.
  813. (ctestg_SOURCES): New variable.
  814. (ctestg_CFLAGS, ctestg_LDFLAGS, ctestg_LDADD): New variables.
  815. (ctesta_SOURCES): New variable.
  816. (ctesta_CFLAGS, ctesta_LDFLAGS, ctesta_LDADD): New variables.
  817. (check_PROGRAMS): Add ctestg and ctesta.
  818. * configure, config.h.in, Makefile.in: Rebuild.
  819. 2017-09-22 Ian Lance Taylor <iant@golang.org>
  820. PR sanitizer/77631
  821. * configure.ac: Check for lstat and readlink.
  822. * elf.c (lstat, readlink): Provide dummy versions if real versions
  823. are not available.
  824. * configure, config.h.in: Rebuild.
  825. 2017-09-21 Ian Lance Taylor <iant@google.com>
  826. PR go/82284
  827. * elf.c (backtrace_initialize): Set pd.exe_filename.
  828. 2017-09-20 Ian Lance Taylor <iant@golang.org>
  829. Denis Khalikov <d.khalikov@partner.samsung.com>
  830. PR sanitizer/77631
  831. Support for external debug info.
  832. * elf.c: Include <errno.h>, <sys/stat.h>, <unistd.h>.
  833. (S_ISLNK): Define if not defined.
  834. (xstrnlen): Define if strnlen is not available.
  835. (b_elf_note): Define type.
  836. (NT_GNU_BUILD_ID): Define macro.
  837. (elf_crc32, elf_crc32_file): New static functions.
  838. (elf_is_symlink, elf_readlink): New static functions.
  839. (elf_open_debugfile_by_buildid): New static function.
  840. (elf_try_debugfile): New static function.
  841. (elf_find_debugfile_by_debuglink): New static function.
  842. (elf_open_debugfile_by_debuglink): New static function.
  843. (elf_add): Add filename and debuginfo parameters. Adjust all
  844. callers. Look for external debug info notes, and try to fetch
  845. debug info from external file.
  846. (struct phdr_data): Add exe_filename field.
  847. (phdr_callback): Pass filename to elf_add.
  848. (backtrace_initialize): Add filename parameter.
  849. * internal.h (backtrace_initialize): Add filename parameter.
  850. * fileline.c (fileline_initialize): Pass filename to
  851. backtrace_initialize.
  852. * pecoff.c (fileline_initialize): Add unused filename parameter.
  853. * unknown.c (fileline_initialize): Likewise.
  854. * xcoff.c (fileline_initialize): Likewise.
  855. * configure.ac: Check for objcopy --add-gnu-debuglink.
  856. * Makefile.am (dtest): New test target.
  857. * configure, Makefile.in: Rebuild.
  858. 2017-09-12 Steve Ellcey <sellcey@cavium.com>
  859. PR other/81096
  860. * Makefile.am (ttest_CFLAGS): Add $(AM_CFLAGS)
  861. * Makefile.in: Regenerate.
  862. 2017-09-12 Steve Ellcey <sellcey@cavium.com>
  863. PR other/81096
  864. * libbacktrace/Makefile.in
  865. (HAVE_PTHREAD_TRUE@@NATIVE_TRUE@ttest_CFLAGS): Add $(AM_CFLAGS)
  866. 2017-08-02 David Edelsohn <dje.gcc@gmail.com>
  867. PR bootstrap/81638
  868. * xcoff.c (xcoff_process_linenos): Initialize incl to NULL.
  869. 2017-07-28 Tony Reix <tony.reix@atos.net>
  870. * xcoff.c: Don't leak a file descriptor if an archive is malformed.
  871. 2017-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
  872. * fileline.c (fileline_initialize): Print pid_t as long.
  873. 2017-07-26 Tony Reix <tony.reix@atos.net>
  874. * configure.ac: Check for XCOFF32/XCOFF64. Check for loadquery.
  875. * filetype.awk: Separate AIX XCOFF32 and XCOFF64.
  876. * xcoff.c: Add support for AIX XCOFF32 and XCOFF64 formats.
  877. * configure, config.h.in: Regenerate.
  878. 2017-07-21 Tony Reix <tony.reix@atos.net>
  879. * filetype.awk: Add AIX XCOFF type detection.
  880. * configure.ac: Recognize xcoff format.
  881. * Makefile.am (FORMAT_FILES): Add xcoff.c.
  882. * fileline.c: Include <unistd.h>.
  883. (fileline_initialize): Add case for AIX procfs.
  884. * xcoff.c: New file.
  885. * configure, Makefile.in: Rebuild.
  886. 2017-06-21 Richard Biener <rguenther@suse.de>
  887. * configure.ac: Add AC_SYS_LARGEFILE.
  888. * config.h.in: Regenerate.
  889. * configure: Likewise.
  890. 2017-06-11 Ian Lance Taylor <iant@golang.org>
  891. * elf.c (backtrace_initialize): Always set *fileline_fn.
  892. * ttest.c: New file.
  893. * btest.c: Move support functions into testlib.c. Change calls to
  894. check to pass file name.
  895. * testlib.c: New file, copied from (part of) btest.c.
  896. * testlib.h: New file, declarations for testlib.c.
  897. * edtest.c: Use testlib.h and testlib.c.
  898. * configure.ac: Test for -pthread, set HAVE_PTHREAD conditional.
  899. * Makefile.am (btest_SOURCES): Add testlib.c.
  900. (edtest_SOURCES): Likewise.
  901. (CHECK_PROGRAMS): Add ttest if HAVE_PTHREAD.
  902. (ttest_SOURCES, ttest_CFLAGS, ttest_LDADD): Define.
  903. * configure, Makefile.in: Rebuild.
  904. 2017-05-19 Than McIntosh <thanm@google.com>
  905. * dwarf.c (free_line_header): Don't free dirs if dirs_count == 0.
  906. (read_line_header): Don't allocate dirs if dirs_count == 0.
  907. * edtest.c: New file.
  908. * edtest2.c: New file.
  909. * Makefile.am (edtest_SOURCES, edtest_LDADD): Define.
  910. (check_PROGRAMS): Add edtest.
  911. (edtest2_build.c, gen_edtest2_build): New targets.
  912. * Makefile.in: Rebuild.
  913. 2017-03-08 Sam Thursfield <sam.thursfield@codethink.co.uk>
  914. * btest.c (test5): Replace #ifdef guard with 'unused' attribute
  915. to fix compile warning when BACKTRACE_SUPPORTED isn't defined.
  916. 2017-01-01 Jakub Jelinek <jakub@redhat.com>
  917. Update copyright years.
  918. 2016-11-15 Matthias Klose <doko@ubuntu.com>
  919. * configure: Regenerate.
  920. 2016-09-11 Carlos Liam <carlos@aarzee.me>
  921. * all: Remove meaningless trailing whitespace.
  922. 2016-05-18 Uros Bizjak <ubizjak@gmail.com>
  923. PR target/71161
  924. * elf.c (phdr_callback) [__i386__]: Add
  925. __attribute__((__force_align_arg_pointer__)).
  926. 2016-03-02 Maxim Ostapenko <m.ostapenko@partner.samsung.com>
  927. * elf.c (backtrace_initialize): Properly initialize elf_fileline_fn to
  928. avoid possible crash.
  929. (elf_add): Don't set *fileline_fn to elf_nodebug value in case of
  930. missing debug info anymore.
  931. 2016-02-06 John David Anglin <danglin@gcc.gnu.org>
  932. * mmap.c (MAP_FAILED): Define if not defined.
  933. 2016-01-04 Jakub Jelinek <jakub@redhat.com>
  934. Update copyright years.
  935. 2015-12-18 Andris Pavenis <andris.pavenis@iki.fi>
  936. * configure.ac: Specify that DJGPP do not have mmap
  937. even when sys/mman.h exists.
  938. * configure: Regenerate
  939. 2015-12-09 John David Anglin <danglin@gcc.gnu.org>
  940. PR libgfortran/68115
  941. * configure.ac: Set libbacktrace_cv_sys_sync to no on hppa*-*-hpux*.
  942. * configure: Regenerate.
  943. * elf.c (backtrace_initialize): Cast __sync_bool_compare_and_swap call
  944. to void.
  945. 2015-09-17 Ian Lance Taylor <iant@google.com>
  946. * posix.c (backtrace_open): Cast second argument of open() to int.
  947. 2015-09-11 Ian Lance Taylor <iant@google.com>
  948. * Makefile.am (backtrace.lo): Depend on internal.h.
  949. (sort.lo, stest.lo): Add explicit dependencies.
  950. * Makefile.in: Rebuild.
  951. 2015-09-09 Hans-Peter Nilsson <hp@axis.com>
  952. * backtrace.c: #include <sys/types.h>.
  953. 2015-09-08 Ian Lance Taylor <iant@google.com>
  954. PR other/67457
  955. * backtrace.c: #include "internal.h".
  956. (struct backtrace_data): Add can_alloc field.
  957. (unwind): If can_alloc is false, don't try to get file/line
  958. information.
  959. (backtrace_full): Set can_alloc field in bdata.
  960. * alloc.c (backtrace_alloc): Don't call error_callback if it is
  961. NULL.
  962. * mmap.c (backtrace_alloc): Likewise.
  963. * internal.h: Update comments for backtrace_alloc and
  964. backtrace_free.
  965. 2015-09-08 Ian Lance Taylor <iant@google.com>
  966. PR other/67457
  967. * mmap.c (backtrace_alloc): Correct test for mmap failure.
  968. 2015-08-31 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
  969. * configure.ac: For spu-*-* targets, set have_fcntl to no.
  970. * configure: Regenerate.
  971. 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
  972. * configure.ac: Remove [disable-shared] argument to LT_INIT.
  973. Remove setting PIC_FLAG when building as target library.
  974. * configure: Regenerate.
  975. 2015-08-26 Hans-Peter Nilsson <hp@axis.com>
  976. * configure.ac: Only compile with -fPIC if the target
  977. supports it.
  978. * configure: Regenerate.
  979. 2015-08-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
  980. * configure.ac: Set have_mmap to no on spu-*-* targets.
  981. * configure: Regenerate.
  982. 2015-08-13 Ian Lance Taylor <iant@google.com>
  983. * dwarf.c (read_function_entry): Add vec_inlined parameter.
  984. Change all callers.
  985. 2015-06-11 Martin Sebor <msebor@redhat.com>
  986. PR sanitizer/65479
  987. * dwarf.c (struct line): Add new field idx.
  988. (line_compare): Use it.
  989. (add_line): Set it.
  990. (read_line_info): Reset it.
  991. 2015-05-29 Tristan Gingold <gingold@adacore.com>
  992. * pecoff.c: New file.
  993. * Makefile.am (FORMAT_FILES): Add pecoff.c and dependencies.
  994. * Makefile.in: Regenerate.
  995. * filetype.awk: Detect pecoff.
  996. * configure.ac: Define BACKTRACE_SUPPORTS_DATA on elf platforms.
  997. Add pecoff.
  998. * btest.c (test5): Test enabled only if BACKTRACE_SUPPORTS_DATA is
  999. true.
  1000. * backtrace-supported.h.in (BACKTRACE_SUPPORTS_DATA): Define.
  1001. * configure: Regenerate.
  1002. * pecoff.c: New file.
  1003. 2015-05-13 Michael Haubenwallner <michael.haubenwallner@ssi-schaefer.com>
  1004. * Makefile.in: Regenerated with automake-1.11.6.
  1005. * aclocal.m4: Likewise.
  1006. * configure: Likewise.
  1007. 2015-01-24 Matthias Klose <doko@ubuntu.com>
  1008. * configure.ac: Move AM_ENABLE_MULTILIB before AC_PROG_CC.
  1009. * configure: Regenerate.
  1010. 2015-01-05 Jakub Jelinek <jakub@redhat.com>
  1011. Update copyright years.
  1012. 2014-11-21 H.J. Lu <hongjiu.lu@intel.com>
  1013. PR bootstrap/63784
  1014. * configure: Regenerated.
  1015. 2014-11-11 David Malcolm <dmalcolm@redhat.com>
  1016. * ChangeLog.jit: New.
  1017. 2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
  1018. PR target/63610
  1019. * configure: Regenerate.
  1020. 2014-10-23 Ian Lance Taylor <iant@google.com>
  1021. * internal.h (backtrace_atomic_load_pointer) [no atomic or sync]:
  1022. Fix to return void *.
  1023. 2014-05-08 Ian Lance Taylor <iant@google.com>
  1024. * mmap.c (backtrace_free): If freeing a large aligned block of
  1025. memory, call munmap rather than holding onto it.
  1026. (backtrace_vector_grow): When growing a vector, double the number
  1027. of pages requested. When releasing the old version of a grown
  1028. vector, pass the correct size to backtrace_free.
  1029. 2014-03-07 Ian Lance Taylor <iant@google.com>
  1030. * sort.c (backtrace_qsort): Use middle element as pivot.
  1031. 2014-03-06 Ian Lance Taylor <iant@google.com>
  1032. * sort.c: New file.
  1033. * stest.c: New file.
  1034. * internal.h (backtrace_qsort): Declare.
  1035. * dwarf.c (read_abbrevs): Call backtrace_qsort instead of qsort.
  1036. (read_line_info, read_function_entry): Likewise.
  1037. (read_function_info, build_dwarf_data): Likewise.
  1038. * elf.c (elf_initialize_syminfo): Likewise.
  1039. * Makefile.am (libbacktrace_la_SOURCES): Add sort.c.
  1040. (stest_SOURCES, stest_LDADD): Define.
  1041. (check_PROGRAMS): Add stest.
  1042. 2014-02-07 Misty De Meo <misty@brew.sh>
  1043. PR target/58710
  1044. * configure.ac: Use AC_LINK_IFELSE in check for
  1045. _Unwind_GetIPInfo.
  1046. * configure: Regenerate.
  1047. 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
  1048. Update copyright years
  1049. 2013-12-06 Jakub Jelinek <jakub@redhat.com>
  1050. * elf.c (ET_DYN): Undefine and define again.
  1051. (elf_add): Add exe argument, if true and ehdr.e_type is ET_DYN,
  1052. return early -1 without closing the descriptor.
  1053. (struct phdr_data): Add exe_descriptor.
  1054. (phdr_callback): If pd->exe_descriptor is not -1, for very first
  1055. call if dlpi_name is NULL just call elf_add with the exe_descriptor,
  1056. otherwise backtrace_close the exe_descriptor if not -1. Adjust
  1057. call to elf_add.
  1058. (backtrace_initialize): Adjust call to elf_add. If it returns
  1059. -1, set pd.exe_descriptor to descriptor, otherwise set it to -1.
  1060. 2013-12-05 Ian Lance Taylor <iant@google.com>
  1061. * alloc.c (backtrace_vector_finish): Add error_callback and data
  1062. parameters. Call backtrace_vector_release. Return address base.
  1063. * mmap.c (backtrace_vector_finish): Add error_callback and data
  1064. parameters. Return address base.
  1065. * dwarf.c (read_function_info): Get new address base from
  1066. backtrace_vector_finish.
  1067. * internal.h (backtrace_vector_finish): Update declaration.
  1068. 2013-11-27 Ian Lance Taylor <iant@google.com>
  1069. * dwarf.c (find_address_ranges): New static function, broken out
  1070. of build_address_map.
  1071. (build_address_map): Call it.
  1072. * btest.c (check): Check for missing filename or function, rather
  1073. than crashing.
  1074. (f3): Check that enough frames were returned.
  1075. 2013-11-19 Jakub Jelinek <jakub@redhat.com>
  1076. * backtrace.h (backtrace_syminfo_callback): Add symsize argument.
  1077. * elf.c (elf_syminfo): Pass 0 or sym->size to the callback as
  1078. last argument.
  1079. * btest.c (struct symdata): Add size field.
  1080. (callback_three): Add symsize argument. Copy it to the data->size
  1081. field.
  1082. (f23): Set symdata.size to 0.
  1083. (test5): Likewise. If sizeof (int) > 1, lookup address of
  1084. ((uintptr_t) &global) + 1. Verify symdata.val and symdata.size
  1085. values.
  1086. * atomic.c: Include sys/types.h.
  1087. 2013-11-18 Ian Lance Taylor <iant@google.com>
  1088. * configure.ac: Check for support of __atomic extensions.
  1089. * internal.h: Declare or #define atomic functions for use in
  1090. backtrace code.
  1091. * atomic.c: New file.
  1092. * dwarf.c (dwarf_lookup_pc): Use atomic functions.
  1093. (dwarf_fileline, backtrace_dwarf_add): Likewise.
  1094. * elf.c (elf_add_syminfo_data, elf_syminfo): Likewise.
  1095. (backtrace_initialize): Likewise.
  1096. * fileline.c (fileline_initialize): Likewise.
  1097. * Makefile.am (libbacktrace_la_SOURCES): Add atomic.c.
  1098. * configure, config.h.in, Makefile.in: Rebuild.
  1099. 2013-11-18 Jakub Jelinek <jakub@redhat.com>
  1100. * elf.c (SHN_UNDEF): Define.
  1101. (elf_initialize_syminfo): Add base_address argument. Ignore symbols
  1102. with st_shndx == SHN_UNDEF. Add base_address to address fields.
  1103. (elf_add): Adjust caller.
  1104. * elf.c (phdr_callback): Process info->dlpi_addr == 0 normally.
  1105. 2013-11-16 Ian Lance Taylor <iant@google.com>
  1106. * backtrace.h (backtrace_create_state): Correct comment about
  1107. threading.
  1108. 2013-11-15 Ian Lance Taylor <iant@google.com>
  1109. * backtrace.h (backtrace_syminfo): Update comment and parameter
  1110. name to take any address, not just a PC value.
  1111. * elf.c (STT_OBJECT): Define.
  1112. (elf_nosyms): Rename parameter pc to addr.
  1113. (elf_symbol_search): Rename local variable pc to addr.
  1114. (elf_initialize_syminfo): Add STT_OBJECT symbols to elf_symbols.
  1115. (elf_syminfo): Rename parameter pc to addr.
  1116. * btest.c (global): New global variable.
  1117. (test5): New test.
  1118. (main): Call test5.
  1119. 2013-10-17 Ian Lance Taylor <iant@google.com>
  1120. * elf.c (elf_add): Don't get the wrong offsets if a debug section
  1121. is missing.
  1122. 2013-10-15 David Malcolm <dmalcolm@redhat.com>
  1123. * configure.ac: Add --enable-host-shared, setting up
  1124. pre-existing PIC_FLAG variable within Makefile.am et al.
  1125. * configure: Regenerate.
  1126. 2013-09-20 Alan Modra <amodra@gmail.com>
  1127. * configure: Regenerate.
  1128. 2013-07-23 Alexander Monakov <amonakov@ispras.ru>
  1129. * elf.c (elf_syminfo): Loop over the elf_syminfo_data chain.
  1130. 2013-07-23 Alexander Monakov <amonakov@ispras.ru>
  1131. * elf.c (backtrace_initialize): Pass elf_fileline_fn to
  1132. dl_iterate_phdr callbacks.
  1133. 2013-03-25 Ian Lance Taylor <iant@google.com>
  1134. * alloc.c: #include <sys/types.h>.
  1135. * mmap.c: Likewise.
  1136. 2013-01-31 Ian Lance Taylor <iant@google.com>
  1137. * dwarf.c (read_function_info): Permit fvec parameter to be NULL.
  1138. (dwarf_lookup_pc): Don't use ddata->fvec if threaded.
  1139. 2013-01-25 Jakub Jelinek <jakub@redhat.com>
  1140. PR other/56076
  1141. * dwarf.c (read_line_header): Don't crash if DW_AT_comp_dir
  1142. attribute was not seen.
  1143. 2013-01-16 Ian Lance Taylor <iant@google.com>
  1144. * dwarf.c (struct unit): Add filename and abs_filename fields.
  1145. (build_address_map): Set new fields when reading unit.
  1146. (dwarf_lookup_pc): If we don't find an entry in the line table,
  1147. just return the main file name.
  1148. 2013-01-14 Richard Sandiford <rdsandiford@googlemail.com>
  1149. Update copyright years.
  1150. 2013-01-01 Ian Lance Taylor <iant@google.com>
  1151. PR bootstrap/54834
  1152. * Makefile.am (AM_CPPFLAGS): Remove -I ../gcc/include and -I
  1153. $(MULTIBUILDTOP)/../../gcc/include.
  1154. * Makefile.in: Rebuild.
  1155. 2013-01-01 Ian Lance Taylor <iant@google.com>
  1156. PR other/55536
  1157. * mmap.c (backtrace_alloc): Don't call sync functions if not
  1158. threaded.
  1159. (backtrace_free): Likewise.
  1160. 2012-12-12 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
  1161. * mmapio.c: Define MAP_FAILED if not defined.
  1162. 2012-12-11 Jakub Jelinek <jakub@redhat.com>
  1163. PR bootstrap/54926
  1164. * Makefile.am (AM_CFLAGS): Remove -frandom-seed=$@.
  1165. * configure.ac: If --with-target-subdir, add -frandom-seed=$@
  1166. to EXTRA_FLAGS unconditionally, otherwise check whether the compiler
  1167. accepts it.
  1168. * Makefile.in: Regenerated.
  1169. * configure: Regenerated.
  1170. 2012-12-07 Jakub Jelinek <jakub@redhat.com>
  1171. PR bootstrap/54926
  1172. * Makefile.am (AM_CFLAGS): Add -frandom-seed=$@.
  1173. * Makefile.in: Regenerated.
  1174. 2012-11-20 Ian Lance Taylor <iant@google.com>
  1175. * dwarf.c (read_attribute): Always clear val.
  1176. 2012-11-13 Ian Lance Taylor <iant@google.com>
  1177. PR other/55312
  1178. * configure.ac: Only add -Werror if building a target library.
  1179. * configure: Rebuild.
  1180. 2012-11-12 Ian Lance Taylor <iant@google.com>
  1181. Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
  1182. Gerald Pfeifer <gerald@pfeifer.com>
  1183. * configure.ac: Check for getexecname.
  1184. * fileline.c: #include <errno.h>. Define getexecname if not
  1185. available.
  1186. (fileline_initialize): Try to find the executable in a few
  1187. different ways.
  1188. * print.c (error_callback): Only print the filename if it came
  1189. from the backtrace state.
  1190. * configure, config.h.in: Rebuild.
  1191. 2012-10-29 Ian Lance Taylor <iant@google.com>
  1192. * mmap.c (backtrace_vector_release): Correct last patch: add
  1193. aligned, not size.
  1194. 2012-10-29 Ian Lance Taylor <iant@google.com>
  1195. * mmap.c (backtrace_vector_release): Make sure freed block is
  1196. aligned on 8-byte boundary.
  1197. 2012-10-26 Ian Lance Taylor <iant@google.com>
  1198. PR other/55087
  1199. * posix.c (backtrace_open): Add does_not_exist parameter.
  1200. * elf.c (phdr_callback): Do not warn if shared library could not
  1201. be opened.
  1202. * fileline.c (fileline_initialize): Update calls to
  1203. backtrace_open.
  1204. * internal.h (backtrace_open): Update declaration.
  1205. 2012-10-26 Jack Howarth <howarth@bromo.med.uc.edu>
  1206. PR target/55061
  1207. * configure.ac: Check for _Unwind_GetIPInfo function declaration.
  1208. * configure: Regenerate.
  1209. 2012-10-24 Ian Lance Taylor <iant@google.com>
  1210. PR target/55061
  1211. * configure.ac: Check whether -funwind-tables option works.
  1212. * configure: Rebuild.
  1213. 2012-10-11 Ian Lance Taylor <iant@google.com>
  1214. * configure.ac: Do not use dl_iterate_phdr on Solaris 10.
  1215. * configure: Rebuild.
  1216. 2012-10-10 Ian Lance Taylor <iant@google.com>
  1217. * elf.c: Rename all Elf typedefs to start with b_elf, and be all
  1218. lower case.
  1219. 2012-10-10 Hans-Peter Nilsson <hp@bitrange.com>
  1220. * elf.c (elf_add_syminfo_data): Add casts to avoid warning.
  1221. 2012-10-09 Ian Lance Taylor <iant@google.com>
  1222. * dwarf.c (dwarf_fileline): Add cast to avoid warning.
  1223. (backtrace_dwarf_add): Likewise.
  1224. 2012-10-09 Ian Lance Taylor <iant@google.com>
  1225. Add support for tracing through shared libraries.
  1226. * configure.ac: Check for link.h and dl_iterate_phdr.
  1227. * elf.c: #include <link.h> if system has dl_iterate_phdr. #undef
  1228. ELF macros before #defining them.
  1229. (dl_phdr_info, dl_iterate_phdr): Define if system does not have
  1230. dl_iterate_phdr.
  1231. (struct elf_syminfo_data): Add next field.
  1232. (elf_initialize_syminfo): Initialize next field.
  1233. (elf_add_syminfo_data): New static function.
  1234. (elf_add): New static function, broken out of
  1235. backtrace_initialize. Call backtrace_dwarf_add instead of
  1236. backtrace_dwarf_initialize.
  1237. (struct phdr_data): Define.
  1238. (phdr_callback): New static function.
  1239. (backtrace_initialize): Call elf_add.
  1240. * dwarf.c (struct dwarf_data): Add next and base_address fields.
  1241. (add_unit_addr): Add base_address parameter. Change all callers.
  1242. (add_unit_ranges, build_address_map): Likewise.
  1243. (add_line): Add ddata parameter. Change all callers.
  1244. (read_line_program, add_function_range): Likewise.
  1245. (dwarf_lookup_pc): New static function, broken out of
  1246. dwarf_fileline.
  1247. (dwarf_fileline): Call dwarf_lookup_pc.
  1248. (build_dwarf_data): New static function.
  1249. (backtrace_dwarf_add): New function.
  1250. (backtrace_dwarf_initialize): Remove.
  1251. * internal.h (backtrace_dwarf_initialize): Don't declare.
  1252. (backtrace_dwarf_add): Declare.
  1253. * configure, config.h.in: Rebuild.
  1254. 2012-10-04 Gerald Pfeifer <gerald@pfeifer.com>
  1255. * btest.c (f23): Avoid uninitialized variable warning.
  1256. 2012-10-04 Ian Lance Taylor <iant@google.com>
  1257. * dwarf.c: If the system header files do not declare strnlen,
  1258. provide our own version.
  1259. 2012-10-03 Ian Lance Taylor <iant@google.com>
  1260. * dwarf.c (read_uleb128): Fix overflow test.
  1261. (read_sleb128): Likewise.
  1262. (build_address_map): Don't change unit_buf.start.
  1263. 2012-10-02 Uros Bizjak <ubizjak@gmail.com>
  1264. PR other/54761
  1265. * configure.ac (EXTRA_FLAGS): New.
  1266. * Makefile.am (AM_FLAGS): Add $(EXTRA_FLAGS).
  1267. * configure, Makefile.in: Regenerate.
  1268. 2012-09-29 Ian Lance Taylor <iant@google.com>
  1269. PR other/54749
  1270. * fileline.c (fileline_initialize): Pass errnum as -1 when
  1271. reporting that we could not read executable information after a
  1272. previous failure.
  1273. 2012-09-27 Ian Lance Taylor <iant@google.com>
  1274. PR bootstrap/54732
  1275. * configure.ac: Add no-dependencies to AM_INIT_AUTOMAKE.
  1276. * Makefile.am: Add dependencies for all objects.
  1277. * configure, aclocal.m4, Makefile.in: Rebuild.
  1278. 2012-09-27 Ian Lance Taylor <iant@google.com>
  1279. PR other/54726
  1280. * elf.c (backtrace_initialize): Set *fileln_fn, not
  1281. state->fileln_fn.
  1282. 2012-09-19 Ian Lance Taylor <iant@google.com>
  1283. * configure.ac: Only use GCC_CHECK_UNWIND_GETIPINFO when compiled
  1284. as a target library.
  1285. * configure: Rebuild.
  1286. 2012-09-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
  1287. Ian Lance Taylor <iant@google.com>
  1288. * configure.ac (GCC_HEADER_STDINT): Invoke.
  1289. * backtrace.h: If we can't find <stdint.h>, use "gstdint.h".
  1290. * btest.c: Don't include <stdint.h>.
  1291. * dwarf.c: Likewise.
  1292. * configure, aclocal.m4, Makefile.in, config.h.in: Rebuild.
  1293. 2012-09-18 Ian Lance Taylor <iant@google.com>
  1294. PR bootstrap/54623
  1295. * Makefile.am (AM_CPPFLAGS): Define.
  1296. (AM_CFLAGS): Remove -I options.
  1297. * Makefile.in: Rebuild.
  1298. 2012-09-18 Ian Lance Taylor <iant@google.com>
  1299. * posix.c (O_BINARY): Define if not defined.
  1300. (backtrace_open): Pass O_BINARY to open. Only call fcntl if
  1301. HAVE_FCNTL is defined.
  1302. * configure.ac: Test for the fcntl function.
  1303. * configure, config.h.in: Rebuild.
  1304. 2012-09-18 Ian Lance Taylor <iant@google.com>
  1305. * btest.c (test1, test2, test3, test4): Add the unused attribute.
  1306. 2012-09-18 Ian Lance Taylor <iant@google.com>
  1307. * dwarf.c: Correct test of HAVE_DECL_STRNLEN.
  1308. 2012-09-18 Ian Lance Taylor <iant@google.com>
  1309. * configure.ac: Add AC_USE_SYSTEM_EXTENSIONS.
  1310. * mmapio.c: Don't define _GNU_SOURCE.
  1311. * configure, config.h.in: Rebuild.
  1312. 2012-09-18 Ian Lance Taylor <iant@google.com>
  1313. * configure.ac: Check whether strnlen is declared.
  1314. * dwarf.c: Declare strnlen if not declared.
  1315. * configure, config.h.in: Rebuild.
  1316. 2012-09-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
  1317. * fileline.c: Include <stdlib.h>.
  1318. * mmap.c: Likewise.
  1319. 2012-09-17 Ian Lance Taylor <iant@google.com>
  1320. PR bootstrap/54611
  1321. * nounwind.c (backtrace_full): Rename from backtrace. Add state
  1322. parameter.
  1323. 2012-09-17 Gerald Pfeifer <gerald@pfeifer.com>
  1324. PR bootstrap/54611
  1325. * nounwind.c (backtrace_simple): Add state parameter.
  1326. 2012-09-17 Ian Lance Taylor <iant@google.com>
  1327. PR bootstrap/54609
  1328. * unknown.c (unknown_fileline): Add state parameter, remove
  1329. fileline_data parameter, name error_callback parameter.
  1330. (backtrace_initialize): Add state parameter.
  1331. 2012-09-17 Ian Lance Taylor <iant@google.com>
  1332. * Initial implementation.
  1333. Copyright (C) 2012-2022 Free Software Foundation, Inc.
  1334. Copying and distribution of this file, with or without modification,
  1335. are permitted in any medium without royalty provided the copyright
  1336. notice and this notice are preserved.