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 {...@@ -452,10 +452,12 @@ struct _LIBUNWIND_HIDDEN dl_iterate_cb_data {
452 #error "_LIBUNWIND_SUPPORT_DWARF_UNWIND requires _LIBUNWIND_SUPPORT_DWARF_INDEX on this platform."452 #error "_LIBUNWIND_SUPPORT_DWARF_UNWIND requires _LIBUNWIND_SUPPORT_DWARF_INDEX on this platform."
453 #endif453 #endif
454454
455#if defined(_LIBUNWIND_USE_FRAME_HEADER_CACHE)
455#include "FrameHeaderCache.hpp"456#include "FrameHeaderCache.hpp"
456457
457// There should be just one of these per process.458// There should be just one of these per process.
458static FrameHeaderCache ProcessFrameHeaderCache;459static FrameHeaderCache ProcessFrameHeaderCache;
460#endif
459461
460static bool checkAddrInSegment(const Elf_Phdr *phdr, size_t image_base,462static bool checkAddrInSegment(const Elf_Phdr *phdr, size_t image_base,
461 dl_iterate_cb_data *cbdata) {463 dl_iterate_cb_data *cbdata) {
...@@ -476,8 +478,10 @@ int findUnwindSectionsByPhdr(struct dl_phdr_info *pinfo, size_t pinfo_size,...@@ -476,8 +478,10 @@ int findUnwindSectionsByPhdr(struct dl_phdr_info *pinfo, size_t pinfo_size,
476 auto cbdata = static_cast<dl_iterate_cb_data *>(data);478 auto cbdata = static_cast<dl_iterate_cb_data *>(data);
477 if (pinfo->dlpi_phnum == 0 || cbdata->targetAddr < pinfo->dlpi_addr)479 if (pinfo->dlpi_phnum == 0 || cbdata->targetAddr < pinfo->dlpi_addr)
478 return 0;480 return 0;
481#if defined(_LIBUNWIND_USE_FRAME_HEADER_CACHE)
479 if (ProcessFrameHeaderCache.find(pinfo, pinfo_size, data))482 if (ProcessFrameHeaderCache.find(pinfo, pinfo_size, data))
480 return 1;483 return 1;
484#endif
481485
482 Elf_Addr image_base = calculateImageBase(pinfo);486 Elf_Addr image_base = calculateImageBase(pinfo);
483 bool found_obj = false;487 bool found_obj = false;
...@@ -505,7 +509,9 @@ int findUnwindSectionsByPhdr(struct dl_phdr_info *pinfo, size_t pinfo_size,...@@ -505,7 +509,9 @@ int findUnwindSectionsByPhdr(struct dl_phdr_info *pinfo, size_t pinfo_size,
505 found_obj = checkAddrInSegment(phdr, image_base, cbdata);509 found_obj = checkAddrInSegment(phdr, image_base, cbdata);
506 }510 }
507 if (found_obj && found_hdr) {511 if (found_obj && found_hdr) {
512#if defined(_LIBUNWIND_USE_FRAME_HEADER_CACHE)
508 ProcessFrameHeaderCache.add(cbdata->sects);513 ProcessFrameHeaderCache.add(cbdata->sects);
514#endif
509 return 1;515 return 1;
510 }516 }
511 }517 }