diff options
-rw-r--r-- | src/3rdparty/libbacktrace/libbacktrace/config.h | 1 | ||||
-rw-r--r-- | src/3rdparty/libbacktrace/libbacktrace/dwarf.c | 35 | ||||
-rw-r--r-- | src/3rdparty/libbacktrace/libbacktrace/elf.c | 9 | ||||
-rw-r--r-- | src/3rdparty/libbacktrace/libbacktrace/macho.c | 2 | ||||
-rw-r--r-- | src/3rdparty/libbacktrace/qt_attribution.json | 4 |
5 files changed, 35 insertions, 16 deletions
diff --git a/src/3rdparty/libbacktrace/libbacktrace/config.h b/src/3rdparty/libbacktrace/libbacktrace/config.h index c7a9e18c..88f27c9b 100644 --- a/src/3rdparty/libbacktrace/libbacktrace/config.h +++ b/src/3rdparty/libbacktrace/libbacktrace/config.h @@ -6,4 +6,5 @@ #define HAVE_GETIPINFO 1 #define HAVE_SYNC_FUNCTIONS 1 #define HAVE_LIBDWARF_DWARF_H 1 +#define HAVE_LINK_H 1 diff --git a/src/3rdparty/libbacktrace/libbacktrace/dwarf.c b/src/3rdparty/libbacktrace/libbacktrace/dwarf.c index 362eb60d..5b2724e6 100644 --- a/src/3rdparty/libbacktrace/libbacktrace/dwarf.c +++ b/src/3rdparty/libbacktrace/libbacktrace/dwarf.c @@ -49,6 +49,7 @@ enum dwarf_tag { DW_TAG_compile_unit = 0x11, DW_TAG_inlined_subroutine = 0x1d, DW_TAG_subprogram = 0x2e, + DW_TAG_skeleton_unit = 0x4a, }; enum dwarf_form { @@ -2322,14 +2323,16 @@ find_address_ranges (struct backtrace_state *state, uintptr_t base_address, break; case DW_AT_stmt_list: - if (abbrev->tag == DW_TAG_compile_unit + if ((abbrev->tag == DW_TAG_compile_unit + || abbrev->tag == DW_TAG_skeleton_unit) && (val.encoding == ATTR_VAL_UINT || val.encoding == ATTR_VAL_REF_SECTION)) u->lineoff = val.u.uint; break; case DW_AT_name: - if (abbrev->tag == DW_TAG_compile_unit) + if (abbrev->tag == DW_TAG_compile_unit + || abbrev->tag == DW_TAG_skeleton_unit) { name_val = val; have_name_val = 1; @@ -2337,7 +2340,8 @@ find_address_ranges (struct backtrace_state *state, uintptr_t base_address, break; case DW_AT_comp_dir: - if (abbrev->tag == DW_TAG_compile_unit) + if (abbrev->tag == DW_TAG_compile_unit + || abbrev->tag == DW_TAG_skeleton_unit) { comp_dir_val = val; have_comp_dir_val = 1; @@ -2345,19 +2349,22 @@ find_address_ranges (struct backtrace_state *state, uintptr_t base_address, break; case DW_AT_str_offsets_base: - if (abbrev->tag == DW_TAG_compile_unit + if ((abbrev->tag == DW_TAG_compile_unit + || abbrev->tag == DW_TAG_skeleton_unit) && val.encoding == ATTR_VAL_REF_SECTION) u->str_offsets_base = val.u.uint; break; case DW_AT_addr_base: - if (abbrev->tag == DW_TAG_compile_unit + if ((abbrev->tag == DW_TAG_compile_unit + || abbrev->tag == DW_TAG_skeleton_unit) && val.encoding == ATTR_VAL_REF_SECTION) u->addr_base = val.u.uint; break; case DW_AT_rnglists_base: - if (abbrev->tag == DW_TAG_compile_unit + if ((abbrev->tag == DW_TAG_compile_unit + || abbrev->tag == DW_TAG_skeleton_unit) && val.encoding == ATTR_VAL_REF_SECTION) u->rnglists_base = val.u.uint; break; @@ -2385,7 +2392,8 @@ find_address_ranges (struct backtrace_state *state, uintptr_t base_address, } if (abbrev->tag == DW_TAG_compile_unit - || abbrev->tag == DW_TAG_subprogram) + || abbrev->tag == DW_TAG_subprogram + || abbrev->tag == DW_TAG_skeleton_unit) { if (!add_ranges (state, dwarf_sections, base_address, is_bigendian, u, pcrange.lowpc, &pcrange, @@ -2393,9 +2401,10 @@ find_address_ranges (struct backtrace_state *state, uintptr_t base_address, (void *) addrs)) return 0; - /* If we found the PC range in the DW_TAG_compile_unit, we - can stop now. */ - if (abbrev->tag == DW_TAG_compile_unit + /* If we found the PC range in the DW_TAG_compile_unit or + DW_TAG_skeleton_unit, we can stop now. */ + if ((abbrev->tag == DW_TAG_compile_unit + || abbrev->tag == DW_TAG_skeleton_unit) && (pcrange.have_ranges || (pcrange.have_lowpc && pcrange.have_highpc))) return 1; @@ -2554,6 +2563,9 @@ build_address_map (struct backtrace_state *state, uintptr_t base_address, u->comp_dir = NULL; u->abs_filename = NULL; u->lineoff = 0; + u->str_offsets_base = 0; + u->addr_base = 0; + u->rnglists_base = 0; /* The actual line number mappings will be read as needed. */ u->lines = NULL; @@ -3604,7 +3616,8 @@ read_function_entry (struct backtrace_state *state, struct dwarf_data *ddata, /* The compile unit sets the base address for any address ranges in the function entries. */ - if (abbrev->tag == DW_TAG_compile_unit + if ((abbrev->tag == DW_TAG_compile_unit + || abbrev->tag == DW_TAG_skeleton_unit) && abbrev->attrs[i].name == DW_AT_low_pc) { if (val.encoding == ATTR_VAL_ADDRESS) diff --git a/src/3rdparty/libbacktrace/libbacktrace/elf.c b/src/3rdparty/libbacktrace/libbacktrace/elf.c index 79d56146..61014562 100644 --- a/src/3rdparty/libbacktrace/libbacktrace/elf.c +++ b/src/3rdparty/libbacktrace/libbacktrace/elf.c @@ -40,7 +40,12 @@ POSSIBILITY OF SUCH DAMAGE. */ #include <unistd.h> #ifdef HAVE_DL_ITERATE_PHDR -#include <link.h> + #ifdef HAVE_LINK_H + #include <link.h> + #endif + #ifdef HAVE_SYS_LINK_H + #include <sys/link.h> + #endif #endif #include "backtrace.h" @@ -1796,7 +1801,7 @@ elf_zlib_inflate (const unsigned char *pin, size_t sin, uint16_t *zdebug_table, /* An uncompressed block. */ /* If we've read ahead more than a byte, back up. */ - while (bits > 8) + while (bits >= 8) { --pin; bits -= 8; diff --git a/src/3rdparty/libbacktrace/libbacktrace/macho.c b/src/3rdparty/libbacktrace/libbacktrace/macho.c index 66e101e0..d00aea9b 100644 --- a/src/3rdparty/libbacktrace/libbacktrace/macho.c +++ b/src/3rdparty/libbacktrace/libbacktrace/macho.c @@ -1268,7 +1268,7 @@ backtrace_initialize (struct backtrace_state *state, const char *filename, mff = macho_nodebug; if (!macho_add (state, name, d, 0, NULL, base_address, 0, error_callback, data, &mff, &mfs)) - return 0; + continue; if (mff != macho_nodebug) macho_fileline_fn = mff; diff --git a/src/3rdparty/libbacktrace/qt_attribution.json b/src/3rdparty/libbacktrace/qt_attribution.json index 5aeb3304..2030c593 100644 --- a/src/3rdparty/libbacktrace/qt_attribution.json +++ b/src/3rdparty/libbacktrace/qt_attribution.json @@ -6,10 +6,10 @@ "Description": "A C library that may be linked into a C/C++ program to produce symbolic backtraces.", "Homepage": "https://github.com/ianlancetaylor/libbacktrace", - "Version": "2021-05-31", + "Version": "2022-07-09", "License": "BSD 3-clause \"New\" or \"Revised\" License", "LicenseId": "BSD-3-Clause", "LicenseFile": "LICENSE", - "Copyright": "Copyright (C) 2012-2021 Free Software Foundation, Inc." + "Copyright": "Copyright (C) 2012-2022 Free Software Foundation, Inc." } |