summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSean Callanan <scallanan@apple.com>2012-07-12 20:44:21 +0000
committerSean Callanan <scallanan@apple.com>2012-07-12 20:44:21 +0000
commit27e02d07fd54ddcbeeb7635fdfb1d67cce574e75 (patch)
tree7a1b65c760298406c16d66917fd5b9c0de986745
parent4e0fe8ab95763b90e5fed11bc9598d82a1316d01 (diff)
downloadbcm5719-llvm-27e02d07fd54ddcbeeb7635fdfb1d67cce574e75.tar.gz
bcm5719-llvm-27e02d07fd54ddcbeeb7635fdfb1d67cce574e75.zip
Added a check to the Section to make sure we don't
return sections that don't have valid modules. <rdar://problem/11605824> llvm-svn: 160141
-rw-r--r--lldb/source/Core/Section.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lldb/source/Core/Section.cpp b/lldb/source/Core/Section.cpp
index ec198808e40..6d984f4478e 100644
--- a/lldb/source/Core/Section.cpp
+++ b/lldb/source/Core/Section.cpp
@@ -184,6 +184,11 @@ Section::ResolveContainedAddress (addr_t offset, Address &so_addr) const
{
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;
}
OpenPOWER on IntegriCloud