Make sure a core file has thread contexts before we try and load it.

llvm-svn: 183252
This commit is contained in:
Greg Clayton 2013-06-04 21:34:37 +00:00
parent 3758f9d0f1
commit 9645e82ce2
1 changed files with 7 additions and 0 deletions

View File

@ -213,6 +213,13 @@ ProcessMachCore::DoLoadCore ()
error.SetErrorString ("invalid core object file"); error.SetErrorString ("invalid core object file");
return error; return error;
} }
if (core_objfile->GetNumThreadContexts() == 0)
{
error.SetErrorString ("core file doesn't contain any recognized thread contexts");
return error;
}
SectionList *section_list = core_objfile->GetSectionList(); SectionList *section_list = core_objfile->GetSectionList();
if (section_list == NULL) if (section_list == NULL)
{ {