[Lldb-commits] [lldb] r183252 - Make sure a core file has thread contexts before we try and load it.
Greg Clayton
gclayton at apple.com
Tue Jun 4 14:34:37 PDT 2013
Author: gclayton
Date: Tue Jun 4 16:34:37 2013
New Revision: 183252
URL: http://llvm.org/viewvc/llvm-project?rev=183252&view=rev
Log:
Make sure a core file has thread contexts before we try and load it.
Modified:
lldb/trunk/source/Plugins/Process/mach-core/ProcessMachCore.cpp
Modified: lldb/trunk/source/Plugins/Process/mach-core/ProcessMachCore.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/mach-core/ProcessMachCore.cpp?rev=183252&r1=183251&r2=183252&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/mach-core/ProcessMachCore.cpp (original)
+++ lldb/trunk/source/Plugins/Process/mach-core/ProcessMachCore.cpp Tue Jun 4 16:34:37 2013
@@ -213,6 +213,13 @@ ProcessMachCore::DoLoadCore ()
error.SetErrorString ("invalid core object file");
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();
if (section_list == NULL)
{
More information about the lldb-commits
mailing list