diff --git a/src/common/dwarf_cu_to_module.cc b/src/common/dwarf_cu_to_module.cc index 04d19479..4bd71564 100644 --- a/src/common/dwarf_cu_to_module.cc +++ b/src/common/dwarf_cu_to_module.cc @@ -652,6 +652,11 @@ void DwarfCUToModule::InlineHandler::Finish() { } } + // Ignore DW_TAG_inlined_subroutine with empty range. + if (ranges.empty()) { + return; + } + // Every DW_TAG_inlined_subroutine should have a DW_AT_abstract_origin. assert(specification_offset_ != 0); diff --git a/src/processor/basic_source_line_resolver.cc b/src/processor/basic_source_line_resolver.cc index 4a565f11..dccbd74b 100644 --- a/src/processor/basic_source_line_resolver.cc +++ b/src/processor/basic_source_line_resolver.cc @@ -128,6 +128,7 @@ bool BasicSourceLineResolver::Module::LoadMapFromMemory( linked_ptr cur_func; int line_number = 0; int num_errors = 0; + int inline_num_errors = 0; char* save_ptr; // If the length is 0, we can still pretend we have a symbol file. This is @@ -208,12 +209,13 @@ bool BasicSourceLineResolver::Module::LoadMapFromMemory( } else if (strncmp(buffer, "INLINE ", 7) == 0) { linked_ptr in = ParseInline(buffer); if (!in.get()) - LogParseError("ParseInline failed", line_number, &num_errors); + LogParseError("ParseInline failed", line_number, &inline_num_errors); else cur_func->AppendInline(in); } else if (strncmp(buffer, "INLINE_ORIGIN ", 14) == 0) { if (!ParseInlineOrigin(buffer)) { - LogParseError("ParseInlineOrigin failed", line_number, &num_errors); + LogParseError("ParseInlineOrigin failed", line_number, + &inline_num_errors); } } else { if (!cur_func.get()) {