File tree Expand file tree Collapse file tree 1 file changed +8
-13
lines changed
lldb/source/Plugins/LanguageRuntime/Swift Expand file tree Collapse file tree 1 file changed +8
-13
lines changed Original file line number Diff line number Diff line change @@ -180,6 +180,14 @@ LLDBMemoryReader::resolvePointerAsSymbol(swift::remote::RemoteAddress address) {
180180 if (!target.GetSwiftUseReflectionSymbols ())
181181 return {};
182182
183+ auto &triple = m_process.GetTarget ().GetArchitecture ().GetTriple ();
184+ // On Linux, there seems to be a bug where we can't reliably look for symbols by address,
185+ // since these symbols have an actual size and can overlap.
186+ // This could be an LLDB bug or a compiler bug.
187+ // rdar://166344740
188+ if (triple.isOSLinux ())
189+ return {};
190+
183191 std::optional<Address> maybeAddr = remoteAddressToLLDBAddress (address);
184192 // This is not an assert, but should never happen.
185193 if (!maybeAddr)
@@ -195,19 +203,6 @@ LLDBMemoryReader::resolvePointerAsSymbol(swift::remote::RemoteAddress address) {
195203 return {};
196204 }
197205
198- if (auto section_sp = addr.GetSection ()) {
199- if (auto *obj_file = section_sp->GetObjectFile ()) {
200- auto obj_file_format_type =
201- obj_file->GetArchitecture ().GetTriple ().getObjectFormat ();
202- if (auto swift_obj_file_format =
203- GetSwiftObjectFileFormat (obj_file_format_type)) {
204- if (!swift_obj_file_format->sectionContainsReflectionData (
205- section_sp->GetName ().GetStringRef ()))
206- return {};
207- }
208- }
209- }
210-
211206 if (auto *symbol = addr.CalculateSymbolContextSymbol ()) {
212207 auto mangledName = symbol->GetMangled ().GetMangledName ().GetStringRef ();
213208 // MemoryReader requires this to be a Swift symbol. LLDB can also be
You can’t perform that action at this time.
0 commit comments