Index: source/Host/common/Symbols.cpp =================================================================== --- source/Host/common/Symbols.cpp (revision 237751) +++ source/Host/common/Symbols.cpp (working copy) @@ -76,9 +76,20 @@ ModuleSpecList module_specs; ModuleSpec matched_module_spec; + + ModuleSpec uuid_match_only_module_spec; + const ModuleSpec *module_spec_for_search = &module_spec; + + // If the ModuleSpec includes a UUID, only compare the UUID when looking at the + // dSYM binary. + if (module_spec.GetUUID().IsValid()) + { + uuid_match_only_module_spec.GetUUID() = module_spec.GetUUID(); + module_spec_for_search = &uuid_match_only_module_spec; + } if (dsym_fspec.Exists() && ObjectFile::GetModuleSpecifications(dsym_fspec, 0, 0, module_specs) && - module_specs.FindMatchingModuleSpec(module_spec, matched_module_spec)) + module_specs.FindMatchingModuleSpec(*module_spec_for_search, matched_module_spec)) { return true; } @@ -95,10 +106,20 @@ *next_slash = '\0'; ::strncat(path, ".dSYM/Contents/Resources/DWARF/", sizeof(path) - strlen(path) - 1); ::strncat(path, exec_fspec->GetFilename().AsCString(), sizeof(path) - strlen(path) - 1); + module_spec_for_search = &module_spec; + + // If the ModuleSpec includes a UUID, only compare the UUID when looking at the + // dSYM binary. + if (module_spec.GetUUID().IsValid()) + { + uuid_match_only_module_spec.GetUUID() = module_spec.GetUUID(); + module_spec_for_search = &uuid_match_only_module_spec; + } + dsym_fspec.SetFile(path, false); if (dsym_fspec.Exists() && ObjectFile::GetModuleSpecifications(dsym_fspec, 0, 0, module_specs) && - module_specs.FindMatchingModuleSpec(module_spec, matched_module_spec)) + module_specs.FindMatchingModuleSpec(*module_spec_for_search, matched_module_spec)) { return true; }