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
This commit is contained in:
Sean Callanan
2012-07-12 20:44:21 +00:00
parent 4e0fe8ab95
commit 27e02d07fd

View File

@@ -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;
}