summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2011-03-07 18:51:54 +0000
committerGreg Clayton <gclayton@apple.com>2011-03-07 18:51:54 +0000
commit0bb165a7a7eb2b0102a5cbf4d610d47c88fc397e (patch)
tree54af46c6aa9c97f7e8641803c28561afb1511e0c
parentd6ffebb077db73705565a71e86d54c044cbcb9dd (diff)
downloadbcm5719-llvm-0bb165a7a7eb2b0102a5cbf4d610d47c88fc397e.tar.gz
bcm5719-llvm-0bb165a7a7eb2b0102a5cbf4d610d47c88fc397e.zip
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
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp17
1 files changed, 15 insertions, 2 deletions
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
index ee6e303f5e1..66140b6a9c9 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
@@ -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();
OpenPOWER on IntegriCloud