Don't cache .o files in the debug map + DWARF in .o files. If we cache them
then we end up using older .o files with out of date section remappings if we debug, compile + fix, and debug again. llvm-svn: 127166
This commit is contained in:
parent
d6ffebb077
commit
0bb165a7a7
|
@ -165,7 +165,18 @@ SymbolFileDWARFDebugMap::GetModuleByCompUnitInfo (CompileUnitInfo *comp_unit_inf
|
|||
if (oso_symbol)
|
||||
{
|
||||
FileSpec oso_file_spec(oso_symbol->GetMangled().GetName().AsCString(), true);
|
||||
|
||||
//#define SYMBOL_FILE_DWARF_DEBUG_MODULES 1
|
||||
#if defined (SYMBOL_FILE_DWARF_DEBUG_MODULES)
|
||||
// Normally we don't want the .o files we open added to the shared
|
||||
// module list. This is because we will add our own section
|
||||
// remappning to each .o file, and if the executable changes, yet
|
||||
// the .o file does not change, we can't have the old remapped
|
||||
// sections in the .o file since they can be out of date. But when
|
||||
// debugging issues in the debug map + DWARF in .o files, it is nice
|
||||
// to be able to use the "image XXX" commands to look at the symbol
|
||||
// tables and sections in the .o files, so the SYMBOL_FILE_DWARF_DEBUG_MODULES
|
||||
// can be used when debugging issues, but it shouldn't be left in
|
||||
// for normal debugging.
|
||||
ModuleList::GetSharedModule (oso_file_spec,
|
||||
m_obj_file->GetModule()->GetArchitecture(),
|
||||
NULL, // lldb_private::UUID pointer
|
||||
|
@ -174,7 +185,9 @@ SymbolFileDWARFDebugMap::GetModuleByCompUnitInfo (CompileUnitInfo *comp_unit_inf
|
|||
comp_unit_info->oso_module_sp,
|
||||
NULL,
|
||||
NULL);
|
||||
//comp_unit_info->oso_module_sp.reset(new Module (oso_file_spec, m_obj_file->GetModule()->GetArchitecture()));
|
||||
#else
|
||||
comp_unit_info->oso_module_sp.reset(new Module (oso_file_spec, m_obj_file->GetModule()->GetArchitecture()));
|
||||
#endif
|
||||
}
|
||||
}
|
||||
return comp_unit_info->oso_module_sp.get();
|
||||
|
|
Loading…
Reference in New Issue