<rdar://problem/14717184>

Improve the documentation for the new target.memory-module-load-level setting, and also return an error when there is no nlist data when appropriate.

llvm-svn: 188317
diff --git a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
index ff66ba9..e8d3118 100644
--- a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
+++ b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
@@ -1555,11 +1555,13 @@
         ProcessSP process_sp (m_process_wp.lock());
         Process *process = process_sp.get();
         
+        uint32_t memory_module_load_level = eMemoryModuleLoadLevelComplete;
+
         if (process)
         {
             Target &target = process->GetTarget();
             
-            const uint32_t memory_module_load_level = target.GetMemoryModuleLoadLevel();
+            memory_module_load_level = target.GetMemoryModuleLoadLevel();
 
             SectionSP linkedit_section_sp(section_list->FindSectionByName(GetSegmentNameLINKEDIT()));
             // Reading mach file from memory in a process or core file...
@@ -1674,6 +1676,14 @@
             }
         }
 
+        if (nlist_data.GetByteSize() == 0 && memory_module_load_level == eMemoryModuleLoadLevelComplete)
+        {
+            if (log)
+                module_sp->LogMessage(log, "failed to read nlist data");
+            return 0;
+        }
+
+
         const bool have_strtab_data = strtab_data.GetByteSize() > 0;
         if (!have_strtab_data)
         {