[Lldb-commits] [lldb] r160141 - /lldb/trunk/source/Core/Section.cpp

Sean Callanan scallanan at apple.com
Thu Jul 12 13:44:21 PDT 2012


Author: spyffe
Date: Thu Jul 12 15:44:21 2012
New Revision: 160141

URL: http://llvm.org/viewvc/llvm-project?rev=160141&view=rev
Log:
Added a check to the Section to make sure we don't
return sections that don't have valid modules.

<rdar://problem/11605824>

Modified:
    lldb/trunk/source/Core/Section.cpp

Modified: lldb/trunk/source/Core/Section.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Section.cpp?rev=160141&r1=160140&r2=160141&view=diff
==============================================================================
--- lldb/trunk/source/Core/Section.cpp (original)
+++ lldb/trunk/source/Core/Section.cpp Thu Jul 12 15:44:21 2012
@@ -184,6 +184,11 @@
     {
         so_addr.SetOffset(offset);
         so_addr.SetSection(const_cast<Section *>(this)->shared_from_this());
+        
+#ifdef LLDB_CONFIGURATION_DEBUG
+        // For debug builds, ensure that there are no orphaned (i.e., moduleless) sections.
+        assert(GetModule().get());
+#endif
     }
     return true;
 }





More information about the lldb-commits mailing list