diff options
author | Jason Molenda <jmolenda@apple.com> | 2016-11-09 03:42:12 +0000 |
---|---|---|
committer | Jason Molenda <jmolenda@apple.com> | 2016-11-09 03:42:12 +0000 |
commit | e51a85177a50909077613f5bb605dbb93be3e4ad (patch) | |
tree | a2c5aa8ca3e628ea63909266da56c1f408cb5bfe /lldb/source/Plugins/SymbolVendor | |
parent | 60ba9a18da9b3f11a33ab69720ab0fd0bdc344d0 (diff) |
When deciding whether to use the source remapping dictionary from
a dSYM per-uuid plist, only use it when the DBGVersion key has a
value of 2 or greater.
<rdar://problem/28889578>
<rdar://problem/29131339>
Diffstat (limited to 'lldb/source/Plugins/SymbolVendor')
-rw-r--r-- | lldb/source/Plugins/SymbolVendor/MacOSX/SymbolVendorMacOSX.cpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/lldb/source/Plugins/SymbolVendor/MacOSX/SymbolVendorMacOSX.cpp b/lldb/source/Plugins/SymbolVendor/MacOSX/SymbolVendorMacOSX.cpp index 4309d32af64..5e1953e0320 100644 --- a/lldb/source/Plugins/SymbolVendor/MacOSX/SymbolVendorMacOSX.cpp +++ b/lldb/source/Plugins/SymbolVendor/MacOSX/SymbolVendorMacOSX.cpp @@ -209,8 +209,7 @@ SymbolVendorMacOSX::CreateInstance(const lldb::ModuleSP &module_sp, // DBGSourcePath // values were incorrect. If we have a newer style // DBGSourcePathRemapping, there will be a DBGVersion - // key in the plist - // (we don't care about the value at this point). + // key in the plist with version 2 or higher. // // If this is an old style DBGSourcePathRemapping, // ignore the @@ -221,7 +220,17 @@ SymbolVendorMacOSX::CreateInstance(const lldb::ModuleSP &module_sp, std::string original_DBGSourcePath_value = DBGSourcePath; if (plist_sp->GetAsDictionary()->HasKey("DBGVersion")) { - new_style_source_remapping_dictionary = true; + std::string version_string = + plist_sp->GetAsDictionary() + ->GetValueForKey("DBGVersion") + ->GetStringValue(""); + if (!version_string.empty() && + isdigit(version_string[0])) { + int version_number = atoi(version_string.c_str()); + if (version_number > 1) { + new_style_source_remapping_dictionary = true; + } + } } StructuredData::Dictionary *remappings_dict = |