summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core/Module.cpp
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2013-08-13 16:46:35 +0000
committerGreg Clayton <gclayton@apple.com>2013-08-13 16:46:35 +0000
commit540fbbfa7a2c0864b59a8d6b5f51e14ea63274a6 (patch)
tree9a54bd931b34859325a18a3a085a99860da385ce /lldb/source/Core/Module.cpp
parent9960e764aafdd56f43ac74345eed3aabfba0d3fb (diff)
downloadbcm5719-llvm-540fbbfa7a2c0864b59a8d6b5f51e14ea63274a6.tar.gz
bcm5719-llvm-540fbbfa7a2c0864b59a8d6b5f51e14ea63274a6.zip
When adding a dSYM file, don't remove all sections for the Module's object file if the symbol vendor used the same object file.
llvm-svn: 188289
Diffstat (limited to 'lldb/source/Core/Module.cpp')
-rw-r--r--lldb/source/Core/Module.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lldb/source/Core/Module.cpp b/lldb/source/Core/Module.cpp
index f8e5b4e410c..4252ed4cb6c 100644
--- a/lldb/source/Core/Module.cpp
+++ b/lldb/source/Core/Module.cpp
@@ -1262,7 +1262,9 @@ Module::SetSymbolFileFileSpec (const FileSpec &file)
if (section_list && symbol_file)
{
ObjectFile *obj_file = symbol_file->GetObjectFile();
- if (obj_file)
+ // Make sure we have an object file and that the symbol vendor's objfile isn't
+ // the same as the module's objfile before we remove any sections for it...
+ if (obj_file && obj_file != m_objfile_sp.get())
{
size_t num_sections = section_list->GetNumSections (0);
for (size_t idx = num_sections; idx > 0; --idx)
OpenPOWER on IntegriCloud