diff --git a/src/common/dwarf/dwarf2enums.h b/src/common/dwarf/dwarf2enums.h index b9aae059..e3622585 100644 --- a/src/common/dwarf/dwarf2enums.h +++ b/src/common/dwarf/dwarf2enums.h @@ -95,6 +95,10 @@ enum DwarfTag { DW_TAG_unspecified_type = 0x3b, DW_TAG_partial_unit = 0x3c, DW_TAG_imported_unit = 0x3d, + // DWARF 4. + DW_TAG_type_unit = 0x41, + // DWARF 5. + DW_TAG_skeleton_unit = 0x4a, // SGI/MIPS Extensions. DW_TAG_MIPS_loop = 0x4081, // HP extensions. See: @@ -271,8 +275,10 @@ enum DwarfAttribute { // DWARF 4 DW_AT_linkage_name = 0x6e, // DWARF 5 + DW_AT_str_offsets_base = 0x72, DW_AT_addr_base = 0x73, DW_AT_rnglists_base = 0x74, + DW_AT_dwo_name = 0x76, // SGI/MIPS extensions. DW_AT_MIPS_fde = 0x2001, DW_AT_MIPS_loop_begin = 0x2002, diff --git a/src/common/dwarf/dwarf2reader.cc b/src/common/dwarf/dwarf2reader.cc index 367d936f..be004134 100644 --- a/src/common/dwarf/dwarf2reader.cc +++ b/src/common/dwarf/dwarf2reader.cc @@ -1203,7 +1203,7 @@ void LineInfo::ReadFileRow(const uint8_t** lineptr, // MD5 entries help a debugger sort different versions of files with // the same name. It is always paired with a DW_FORM_data16 and is // unused in this case. - lineptr += 16; + *lineptr += 16; break; default: fprintf(stderr, "Unrecognized form in line table header. %d\n", diff --git a/src/common/dwarf/dwarf2reader.h b/src/common/dwarf/dwarf2reader.h index 7ee80f02..4f90d920 100644 --- a/src/common/dwarf/dwarf2reader.h +++ b/src/common/dwarf/dwarf2reader.h @@ -554,7 +554,7 @@ class CompilationUnit { if (attr == DW_AT_GNU_dwo_id) { dwo_id_ = data; } - else if (attr == DW_AT_GNU_addr_base) { + else if (attr == DW_AT_GNU_addr_base || attr == DW_AT_addr_base) { addr_base_ = data; } else if (attr == DW_AT_GNU_ranges_base || attr == DW_AT_rnglists_base) { @@ -611,7 +611,7 @@ class CompilationUnit { enum DwarfAttribute attr, enum DwarfForm form, const char* data) { - if (attr == DW_AT_GNU_dwo_name) + if (attr == DW_AT_GNU_dwo_name || attr == DW_AT_dwo_name) dwo_name_ = data; handler_->ProcessAttributeString(offset, attr, form, data); } diff --git a/src/common/dwarf_cu_to_module.cc b/src/common/dwarf_cu_to_module.cc index 168c4665..e70adc11 100644 --- a/src/common/dwarf_cu_to_module.cc +++ b/src/common/dwarf_cu_to_module.cc @@ -1333,7 +1333,8 @@ bool DwarfCUToModule::StartCompilationUnit(uint64_t offset, bool DwarfCUToModule::StartRootDIE(uint64_t offset, enum DwarfTag tag) { // We don't deal with partial compilation units (the only other tag // likely to be used for root DIE). - return tag == dwarf2reader::DW_TAG_compile_unit; + return (tag == dwarf2reader::DW_TAG_compile_unit + || tag == dwarf2reader::DW_TAG_skeleton_unit); } } // namespace google_breakpad