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.
llvm-svn: 157078
This commit is contained in:
parent
5158f3de24
commit
6c59661e4f
|
|
@ -502,6 +502,28 @@ SymbolFileDWARF::CalculateAbilities ()
|
|||
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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue