summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/ObjectFile
diff options
context:
space:
mode:
authorJason Molenda <jmolenda@apple.com>2013-04-16 21:42:58 +0000
committerJason Molenda <jmolenda@apple.com>2013-04-16 21:42:58 +0000
commitc9cb7d2462d9e849cd6bc80889637ce2b7b31706 (patch)
tree0ab349e32d0ac597765cc2feb12e19f08e4dd9d3 /lldb/source/Plugins/ObjectFile
parent9a20da75ef1147e4d79506ee012da6cdc942a890 (diff)
downloadbcm5719-llvm-c9cb7d2462d9e849cd6bc80889637ce2b7b31706.tar.gz
bcm5719-llvm-c9cb7d2462d9e849cd6bc80889637ce2b7b31706.zip
Add warning messages for the cases where the inferior process shared cache
differs from lldb's own shared cache, and where the inferior process shared cache does not match up with the on-disk shared cache file. Simplify the code where lldb gets its own shared cache uuid a little bit. llvm-svn: 179633
Diffstat (limited to 'lldb/source/Plugins/ObjectFile')
-rw-r--r--lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
index 7ec1b48b0c3..fd651048e4f 100644
--- a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
+++ b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
@@ -1395,6 +1395,10 @@ ObjectFileMachO::ParseSymtab (bool minimize)
if (lldb_shared_cache.IsValid() && process_shared_cache.IsValid() && lldb_shared_cache != process_shared_cache)
{
use_lldb_cache = false;
+ ModuleSP module_sp (GetModule());
+ if (module_sp)
+ module_sp->ReportWarning ("shared cache in process does not match lldb's own shared cache, startup will be slow.");
+
}
PlatformSP platform_sp (target.GetPlatform());
@@ -1722,6 +1726,9 @@ ObjectFileMachO::ParseSymtab (bool minimize)
// The on-disk dyld_shared_cache file is not the same as the one in this
// process' memory, don't use it.
uuid_match = false;
+ ModuleSP module_sp (GetModule());
+ if (module_sp)
+ module_sp->ReportWarning ("process shared cache does not match on-disk dyld_shared_cache file, some symbol names will be missing.");
}
}
@@ -4035,12 +4042,10 @@ ObjectFileMachO::GetLLDBSharedCacheUUID ()
uint8_t *dyld_all_image_infos_address = dyld_get_all_image_infos();
if (dyld_all_image_infos_address)
{
- uint32_t version;
- memcpy (&version, dyld_all_image_infos_address, 4);
- if (version >= 13)
+ uint32_t *version = (uint32_t*) dyld_all_image_infos_address; // version <mach-o/dyld_images.h>
+ if (*version >= 13)
{
- uint8_t *sharedCacheUUID_address = 0;
- sharedCacheUUID_address = dyld_all_image_infos_address + 84; // sharedCacheUUID <mach-o/dyld_images.h>
+ uuid_t *sharedCacheUUID_address = (uuid_t*) dyld_all_image_infos_address + 84; // sharedCacheUUID <mach-o/dyld_images.h>
uuid.SetBytes (sharedCacheUUID_address);
}
}
OpenPOWER on IntegriCloud