Lines Matching +full:unit +full:- +full:address
1 //===-- CompileUnit.cpp ---------------------------------------------------===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
45 sc->comp_unit = this;
46 GetModule()->CalculateSymbolContext(sc);
54 GetModule()->DumpSymbolContext(s);
55 s->Printf(", CompileUnit{0x%8.8" PRIx64 "}", GetID());
62 << this->GetPrimaryFile() << "\", language = \"" << language << '"';
73 return a->GetID() < b->GetID();
90 SymbolFile *symbol_file = module->GetSymbolFile();
96 symbol_file->ParseFunctions(*this);
118 s->Printf("%p: ", static_cast<const void *>(this));
119 s->Indent();
126 s->IndentMore();
127 m_variables->Dump(s, show_context);
128 s->IndentLess();
132 s->IndentMore();
134 f->Dump(s, show_context);
138 s->IndentLess();
139 s->EOL();
143 // Add a function to this compile unit
145 m_functions_by_uid[funcSP->GetID()] = funcSP;
152 return it->second;
159 if (SymbolFile *symfile = GetModule()->GetSymbolFile())
160 m_language = symfile->ParseLanguage(*this);
170 if (SymbolFile *symfile = GetModule()->GetSymbolFile())
171 symfile->ParseLineTable(*this);
189 if (SymbolFile *symfile = GetModule()->GetSymbolFile())
190 symfile->ParseDebugMacros(*this);
210 sc.module_sp->GetSymbolFile()->ParseVariablesForContext(sc);
219 uint32_t idx = -1;
243 return line_table->FindLineEntryIndexByFileIndex(
259 FileSpec::Match(file_spec, this->GetPrimaryFile());
272 // file and line and if the file spec matches that of the compile unit
284 // Found a matching source file in this compile unit load its debug info.
285 GetModule()->GetSymbolFile()->SetLoadDebugInfoEnabled();
287 LineTable *line_table = sc.comp_unit->GetLineTable();
303 line_idx = line_table->FindLineEntryIndexByFileIndex(
309 line_idx = line_table->FindLineEntryIndexByFileIndex(
338 // address back to the same compile unit and/or line entry. If the compile
339 // unit changed, then revert back to just the compile unit and line entry.
341 // the address, and then it would clear compile unit and the line entry in
343 // we have a valid line table entry in this compile unit. The address
345 // unit if the DWARF has overlappging address ranges. So if we end up with
346 // no compile unit or a different one after the above function call,
353 // Only report an error if we don't map back to any compile unit. With
355 // units that have the same address range due to function outlining
356 // or other link time optimizations. If the compile unit is NULL, then
357 // address resolving is completely failing and more deserving of an
359 resolved_sc.module_sp->ReportError(
360 "unable to resolve a line table file address {0:x16} back "
361 "to a compile unit, please file a bug and attach the address "
370 line_idx = line_table->FindLineEntryIndexByFileIndex(
373 line_idx = line_table->FindLineEntryIndexByFileIndex(
381 if (SymbolFile *symfile = GetModule()->GetSymbolFile()) {
382 if (symfile->ParseIsOptimized(*this))
397 if (SymbolFile *symfile = GetModule()->GetSymbolFile()) {
400 symfile->ParseImportedModules(sc, m_imported_modules);
409 if (SymbolFile *symfile = GetModule()->GetSymbolFile())
410 return symfile->ForEachExternalModule(*this, visited_symbol_files, lambda);
418 if (SymbolFile *symfile = GetModule()->GetSymbolFile())
419 symfile->ParseSupportFiles(*this, m_support_files);