diff options
-rw-r--r-- | lldb/source/Core/Section.cpp | 5 |
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; } |