Author: Raphael Isemann Date: 2020-03-06T11:21:00-08:00 New Revision: 3b2c4e7178c3ca868589c11ceaabe65c7454115d
URL: https://github.com/llvm/llvm-project/commit/3b2c4e7178c3ca868589c11ceaabe65c7454115d DIFF: https://github.com/llvm/llvm-project/commit/3b2c4e7178c3ca868589c11ceaabe65c7454115d.diff LOG: [lldb] Remove some #ifdef LLDB_CONFIGURATION_DEBUG around asserts Summary: Otherwise this code won't run on the Release+Asserts builds we have on the CI. Fixes rdar://problem/59867885 (partly) Reviewers: aprantl Reviewed By: aprantl Subscribers: JDevlieghere, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D75493 Added: Modified: lldb/source/Core/Section.cpp lldb/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.h Removed: ################################################################################ diff --git a/lldb/source/Core/Section.cpp b/lldb/source/Core/Section.cpp index 94adab29b880..3809604566e9 100644 --- a/lldb/source/Core/Section.cpp +++ b/lldb/source/Core/Section.cpp @@ -267,11 +267,8 @@ bool Section::ResolveContainedAddress(addr_t offset, Address &so_addr, 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. + // Ensure that there are no orphaned (i.e., moduleless) sections. assert(GetModule().get()); -#endif return true; } diff --git a/lldb/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp b/lldb/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp index d8b3b046855f..5afd84aa65ee 100644 --- a/lldb/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp +++ b/lldb/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp @@ -77,11 +77,9 @@ bool CommunicationKDP::SendRequestAndGetReply( } std::lock_guard<std::recursive_mutex> guard(m_sequence_mutex); -#ifdef LLDB_CONFIGURATION_DEBUG // NOTE: this only works for packets that are in native endian byte order assert(request_packet.GetSize() == *((const uint16_t *)(request_packet.GetData() + 2))); -#endif lldb::offset_t offset = 1; const uint32_t num_retries = 3; for (uint32_t i = 0; i < num_retries; ++i) { diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.h b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.h index 8ccf54091d9c..87e492e72911 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.h +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.h @@ -88,9 +88,7 @@ class GDBRemoteRegisterContext : public RegisterContext { void SetAllRegisterValid(bool b); bool GetRegisterIsValid(uint32_t reg) const { -#if defined(LLDB_CONFIGURATION_DEBUG) assert(reg < m_reg_valid.size()); -#endif if (reg < m_reg_valid.size()) return m_reg_valid[reg]; return false; @@ -103,9 +101,7 @@ class GDBRemoteRegisterContext : public RegisterContext { } void SetRegisterIsValid(uint32_t reg, bool valid) { -#if defined(LLDB_CONFIGURATION_DEBUG) assert(reg < m_reg_valid.size()); -#endif if (reg < m_reg_valid.size()) m_reg_valid[reg] = valid; } _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits