[Lldb-commits] [lldb] r157078 - /lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
Greg Clayton
gclayton at apple.com
Fri May 18 14:47:20 PDT 2012
Author: gclayton
Date: Fri May 18 16:47:20 2012
New Revision: 157078
URL: http://llvm.org/viewvc/llvm-project?rev=157078&view=rev
Log:
Warn when we detect a valid dSYM file that is empty. This can happen when a dSYM file is created from a binary with no debug info, that has been stripped, or when the .o files are not available when the dSYM is created.
Modified:
lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp?rev=157078&r1=157077&r2=157078&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp Fri May 18 16:47:20 2012
@@ -502,6 +502,28 @@
else
m_flags.Set (flagsGotDebugStrData);
}
+ else
+ {
+ const char *symfile_dir_cstr = m_obj_file->GetFileSpec().GetDirectory().GetCString();
+ if (symfile_dir_cstr)
+ {
+ if (strcasestr(symfile_dir_cstr, ".dsym"))
+ {
+ if (m_obj_file->GetType() == ObjectFile::eTypeDebugInfo)
+ {
+ // We have a dSYM file that didn't have a any debug info.
+ // If the string table has a size of 1, then it was made from
+ // an executable with no debug info, or from an executable that
+ // was stripped.
+ section = section_list->FindSectionByType (eSectionTypeDWARFDebugStr, true).get();
+ if (section && section->GetFileSize() == 1)
+ {
+ m_obj_file->GetModule()->ReportWarning ("empty dSYM file detected, dSYM was created with an executable with no debug info.");
+ }
+ }
+ }
+ }
+ }
if (debug_abbrev_file_size > 0 && debug_info_file_size > 0)
abilities |= CompileUnits | Functions | Blocks | GlobalVariables | LocalVariables | VariableTypes;
More information about the lldb-commits
mailing list