summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/guide/sharedcache.md14
-rw-r--r--view/sharedcache/core/SharedCacheView.cpp38
2 files changed, 30 insertions, 22 deletions
diff --git a/docs/guide/sharedcache.md b/docs/guide/sharedcache.md
index 979af70d..2f3a6eb1 100644
--- a/docs/guide/sharedcache.md
+++ b/docs/guide/sharedcache.md
@@ -9,11 +9,15 @@ Our support for `dyld_shared_cache` is largely open source. The supporting code
List of supported features for the given shared cache targets:
-| Platform | Arch | Versions | Features |
-|----------|--------|----------|-----------------------------|
-| macOS | x86_64 | 11 - 15 | Core, Objective-C, Workflow |
-| macOS | arm64 | 11 - 15 | Core, Objective-C, Workflow |
-| iOS | arm64 | 11 - 18 | Core, Objective-C, Workflow |
+| Platform | Arch | Versions | Features | Notes |
+|----------|--------|----------|-----------------------------------|--------------------------------|
+| macOS | x86_64 | 11 - 15 | Core, Objective-C, Workflow | |
+| macOS | arm64 | 11 - 15 | Core, Objective-C, Workflow | |
+| iOS | arm64 | 11 - 18 | Core, Objective-C, Workflow | |
+| iOS | arm64 | 10 | Core, _~Objective-C_, Workflow | Some objective-c parsing fails |
+| iOS | arm64 | 7 - 9 | _~Core_, _~Objective-C_, Workflow | Missing slide info adjustments |
+
+> Features marked with **~** are partially supported and non-critical issues can occur.
- **Core**: Core functionality, such as loading, navigating, and analyzing `dyld_shared_cache` files.
- **Objective-C**: Support for analyzing Objective-C information and symbols within the shared cache.
diff --git a/view/sharedcache/core/SharedCacheView.cpp b/view/sharedcache/core/SharedCacheView.cpp
index 0cd4d82e..77f6e633 100644
--- a/view/sharedcache/core/SharedCacheView.cpp
+++ b/view/sharedcache/core/SharedCacheView.cpp
@@ -176,11 +176,27 @@ bool SharedCacheView::Init()
m_logger = new Logger("SharedCache.View", GetFile()->GetSessionId());
uint32_t platform;
+ // NOTE: This entry only exists on ios 11 and later, older versions will just assume iOS.
GetParentView()->Read(&platform, 0xd8, 4);
char magic[17];
GetParentView()->Read(&magic, 0, 16);
magic[16] = 0;
+ if (std::string(magic) == "dyld_v1 arm64" || std::string(magic) == "dyld_v1 arm64e"
+ || std::string(magic) == "dyld_v1arm64_32")
+ {
+ arch = "aarch64";
+ }
+ else if (std::string(magic) == "dyld_v1 x86_64" || std::string(magic) == "dyld_v1 x86_64h")
+ {
+ arch = "x86_64";
+ }
+ else
+ {
+ m_logger->LogError("Unknown magic: %s", magic);
+ return false;
+ }
+
// TODO: Do we want to add any warnings about platform support here?
// TODO: Do we still consider macos experimental?
switch (platform)
@@ -200,24 +216,12 @@ bool SharedCacheView::Init()
case DSCPlatformWatchOS:
case DSCPlatformWatchOSSimulator:
case DSCPlatformBridgeOS:
- default:
- m_logger->LogError("Unknown platform: %d", platform);
- return false;
- }
-
- if (std::string(magic) == "dyld_v1 arm64" || std::string(magic) == "dyld_v1 arm64e"
- || std::string(magic) == "dyld_v1arm64_32")
- {
- arch = "aarch64";
- }
- else if (std::string(magic) == "dyld_v1 x86_64" || std::string(magic) == "dyld_v1 x86_64h")
- {
- arch = "x86_64";
- }
- else
- {
- m_logger->LogError("Unknown magic: %s", magic);
+ m_logger->LogError("Unsupported platform: %d", platform);
return false;
+ default:
+ m_logger->LogWarn("Unknown platform: %d selecting iOS...", platform);
+ os = "ios";
+ break;
}
SetDefaultPlatform(Platform::GetByName(os + "-" + arch));