OSDN Git Service

Ignore DBGArchitecture from dsymForUUID's plist
authorJason Molenda <jason@molenda.com>
Wed, 9 Dec 2020 22:12:15 +0000 (14:12 -0800)
committerJason Molenda <jason@molenda.com>
Wed, 9 Dec 2020 22:19:55 +0000 (14:19 -0800)
When the architecture from the returned plist differs from the
architecture lldb will pick when loading the binary file, lldb will
reject the binary as not matching.  We are working with UUID's in
this case, so an architecture is not disambiguating anything; it
just opens this possibility for failing to load the specified binary.
Stop reading the architecture from the plist.

<rdar://problem/71612561>
Differential revision: https://reviews.llvm.org/D92692

lldb/source/Symbol/LocateSymbolFileMacOSX.cpp
lldb/test/API/macosx/lc-note/firmware-corefile/TestFirmwareCorefiles.py

index 344bac8..2655e4d 100644 (file)
@@ -342,13 +342,6 @@ static bool GetModuleSpecInfoFromUUIDDictionary(CFDictionaryRef uuid_dict,
       }
     }
 
-    cf_str = (CFStringRef)CFDictionaryGetValue((CFDictionaryRef)uuid_dict,
-                                               CFSTR("DBGArchitecture"));
-    if (cf_str && CFGetTypeID(cf_str) == CFStringGetTypeID()) {
-      if (CFCString::FileSystemRepresentation(cf_str, str))
-        module_spec.GetArchitecture().SetTriple(str.c_str());
-    }
-
     std::string DBGBuildSourcePath;
     std::string DBGSourcePath;
 
index 79a7905..7055fa6 100644 (file)
@@ -85,7 +85,7 @@ class TestFirmwareCorefiles(TestBase):
                 'fi',
                 'echo "<dict><key>$uuid</key><dict>"',
                 '',
-                'echo "<key>DBGArchitecture</key><string>x86_64</string>"',
+                'echo "<key>DBGArchitecture</key><string>i386</string>"',
                 'echo "<key>DBGDSYMPath</key><string>$dsym</string>"',
                 'echo "<key>DBGSymbolRichExecutable</key><string>$bin</string>"',
                 'echo "</dict></dict></plist>"',