authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-08-20 13:36:44-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-08-20 13:36:44-07:00
log3aeeb21b82915a3d03e75a88ded93049a5c1730c
treecb28e62864a524f517c669efcb4c514e1f87a6c0
parent1de2c647df4758e4250def78068f7e61e638c599

update libunwind to llvm11rc2


1 files changed, 6 insertions(+), 0 deletions(-)

lib/libunwind/src/AddressSpace.hpp+6
......@@ -452,10 +452,12 @@ struct _LIBUNWIND_HIDDEN dl_iterate_cb_data {
452452 #error "_LIBUNWIND_SUPPORT_DWARF_UNWIND requires _LIBUNWIND_SUPPORT_DWARF_INDEX on this platform."
453453 #endif
454454
455#if defined(_LIBUNWIND_USE_FRAME_HEADER_CACHE)
455456#include "FrameHeaderCache.hpp"
456457
457458// There should be just one of these per process.
458459static FrameHeaderCache ProcessFrameHeaderCache;
460#endif
459461
460462static bool checkAddrInSegment(const Elf_Phdr *phdr, size_t image_base,
461463 dl_iterate_cb_data *cbdata) {
......@@ -476,8 +478,10 @@ int findUnwindSectionsByPhdr(struct dl_phdr_info *pinfo, size_t pinfo_size,
476478 auto cbdata = static_cast<dl_iterate_cb_data *>(data);
477479 if (pinfo->dlpi_phnum == 0 || cbdata->targetAddr < pinfo->dlpi_addr)
478480 return 0;
481#if defined(_LIBUNWIND_USE_FRAME_HEADER_CACHE)
479482 if (ProcessFrameHeaderCache.find(pinfo, pinfo_size, data))
480483 return 1;
484#endif
481485
482486 Elf_Addr image_base = calculateImageBase(pinfo);
483487 bool found_obj = false;
......@@ -505,7 +509,9 @@ int findUnwindSectionsByPhdr(struct dl_phdr_info *pinfo, size_t pinfo_size,
505509 found_obj = checkAddrInSegment(phdr, image_base, cbdata);
506510 }
507511 if (found_obj && found_hdr) {
512#if defined(_LIBUNWIND_USE_FRAME_HEADER_CACHE)
508513 ProcessFrameHeaderCache.add(cbdata->sects);
514#endif
509515 return 1;
510516 }
511517 }