summaryrefslogtreecommitdiffstats
path: root/lldb/source/Host/macosx/Symbols.cpp
diff options
context:
space:
mode:
authorJason Molenda <jmolenda@apple.com>2016-11-09 03:42:12 +0000
committerJason Molenda <jmolenda@apple.com>2016-11-09 03:42:12 +0000
commit73184de2d3b1ba8a78e3d0de2e638f6135d3836a (patch)
tree0fcd5be20c7b89d5aecdff8460dd7d087329aef6 /lldb/source/Host/macosx/Symbols.cpp
parent48c84f9596b87a96a7b22e56c4dce3adf1c489cc (diff)
downloadbcm5719-llvm-73184de2d3b1ba8a78e3d0de2e638f6135d3836a.tar.gz
bcm5719-llvm-73184de2d3b1ba8a78e3d0de2e638f6135d3836a.zip
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> llvm-svn: 286335
Diffstat (limited to 'lldb/source/Host/macosx/Symbols.cpp')
-rw-r--r--lldb/source/Host/macosx/Symbols.cpp19
1 files changed, 13 insertions, 6 deletions
diff --git a/lldb/source/Host/macosx/Symbols.cpp b/lldb/source/Host/macosx/Symbols.cpp
index e6b31c61837..c428377eb7d 100644
--- a/lldb/source/Host/macosx/Symbols.cpp
+++ b/lldb/source/Host/macosx/Symbols.cpp
@@ -350,15 +350,22 @@ static bool GetModuleSpecInfoFromUUIDDictionary(CFDictionaryRef uuid_dict,
cf_dict = (CFDictionaryRef)CFDictionaryGetValue(
(CFDictionaryRef)uuid_dict, CFSTR("DBGSourcePathRemapping"));
if (cf_dict && CFGetTypeID(cf_dict) == CFDictionaryGetTypeID()) {
- // If we see DBGVersion with any kind of value, this is a new style
+ // If we see DBGVersion with a value of 2 or higher, this is a new style
// DBGSourcePathRemapping dictionary
bool new_style_source_remapping_dictionary = false;
std::string original_DBGSourcePath_value = DBGSourcePath;
- const void *version_value;
- version_value =
- CFDictionaryGetValue((CFDictionaryRef)uuid_dict, CFSTR("DBGVersion"));
- if (version_value)
- new_style_source_remapping_dictionary = true;
+ cf_str = (CFStringRef)CFDictionaryGetValue((CFDictionaryRef)uuid_dict,
+ CFSTR("DBGVersion"));
+ if (cf_str && CFGetTypeID(cf_str) == CFStringGetTypeID()) {
+ std::string version;
+ CFCString::FileSystemRepresentation(cf_str, version);
+ if (!version.empty() && isdigit(version[0])) {
+ int version_number = atoi(version.c_str());
+ if (version_number > 1) {
+ new_style_source_remapping_dictionary = true;
+ }
+ }
+ }
CFIndex kv_pair_count = CFDictionaryGetCount((CFDictionaryRef)uuid_dict);
if (kv_pair_count > 0) {
OpenPOWER on IntegriCloud