From 1f87c4a732fa5175218549b4d7053112dbd57894 Mon Sep 17 00:00:00 2001 From: "ted.mielczarek@gmail.com" Date: Wed, 23 Jan 2013 18:01:28 +0000 Subject: Include the compilation directory for FILE entries, making them absolute instead of relative A=Ryan Sleevi R=mark,ted at https://breakpad.appspot.com/385001/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1106 4c0a9323-5329-0410-9bdc-e9ce6186880e --- src/common/dwarf_cu_to_module.cc | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'src/common/dwarf_cu_to_module.cc') diff --git a/src/common/dwarf_cu_to_module.cc b/src/common/dwarf_cu_to_module.cc index 127beacb..55f69130 100644 --- a/src/common/dwarf_cu_to_module.cc +++ b/src/common/dwarf_cu_to_module.cc @@ -623,7 +623,7 @@ void DwarfCUToModule::WarningReporter::UnnamedFunction(uint64 offset) { } DwarfCUToModule::DwarfCUToModule(FileContext *file_context, - LineToModuleFunctor *line_reader, + LineToModuleHandler *line_reader, WarningReporter *reporter) : line_reader_(line_reader), has_source_line_info_(false) { cu_context_ = new CUContext(file_context, reporter); @@ -666,8 +666,16 @@ void DwarfCUToModule::ProcessAttributeUnsigned(enum DwarfAttribute attr, void DwarfCUToModule::ProcessAttributeString(enum DwarfAttribute attr, enum DwarfForm form, const string &data) { - if (attr == dwarf2reader::DW_AT_name) - cu_context_->reporter->SetCUName(data); + switch (attr) { + case dwarf2reader::DW_AT_name: + cu_context_->reporter->SetCUName(data); + break; + case dwarf2reader::DW_AT_comp_dir: + line_reader_->StartCompilationUnit(data); + break; + default: + break; + } } bool DwarfCUToModule::EndAttributes() { @@ -744,8 +752,8 @@ void DwarfCUToModule::ReadSourceLines(uint64 offset) { cu_context_->reporter->BadLineInfoOffset(offset); return; } - (*line_reader_)(section_start + offset, section_length - offset, - cu_context_->file_context->module, &lines_); + line_reader_->ReadProgram(section_start + offset, section_length - offset, + cu_context_->file_context->module, &lines_); } namespace { -- cgit v1.2.1