From a70217fa17f4d9d874ef9ec9e9f3b42e52bcaee6 Mon Sep 17 00:00:00 2001 From: Augusto Noronha Date: Fri, 5 Dec 2025 17:16:08 -0800 Subject: [PATCH] [lldb] Allow LLDBMemoryReader to provide symbols outside refl. sections There are swift metadata symbols outside the "__swift_" sections. For example, swift context descriptors live in the "const" sections. Allow LLDBMemoryReader::resolvePointerAsSymbol to return any symbol that it finds. rdar://165950673 --- .../LanguageRuntime/Swift/LLDBMemoryReader.cpp | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/lldb/source/Plugins/LanguageRuntime/Swift/LLDBMemoryReader.cpp b/lldb/source/Plugins/LanguageRuntime/Swift/LLDBMemoryReader.cpp index 13146fffa73fb..7e617608c6d2f 100644 --- a/lldb/source/Plugins/LanguageRuntime/Swift/LLDBMemoryReader.cpp +++ b/lldb/source/Plugins/LanguageRuntime/Swift/LLDBMemoryReader.cpp @@ -195,19 +195,6 @@ LLDBMemoryReader::resolvePointerAsSymbol(swift::remote::RemoteAddress address) { return {}; } - if (auto section_sp = addr.GetSection()) { - if (auto *obj_file = section_sp->GetObjectFile()) { - auto obj_file_format_type = - obj_file->GetArchitecture().GetTriple().getObjectFormat(); - if (auto swift_obj_file_format = - GetSwiftObjectFileFormat(obj_file_format_type)) { - if (!swift_obj_file_format->sectionContainsReflectionData( - section_sp->GetName().GetStringRef())) - return {}; - } - } - } - if (auto *symbol = addr.CalculateSymbolContextSymbol()) { auto mangledName = symbol->GetMangled().GetMangledName().GetStringRef(); // MemoryReader requires this to be a Swift symbol. LLDB can also be