From 5ad25cd2bd45becced924e7faf80e0203d2fbd3e Mon Sep 17 00:00:00 2001 From: Markus Stange Date: Wed, 11 Jan 2023 22:00:51 +0000 Subject: [PATCH] Bug 1808982 - Add the macOS 13 dyld shared cache path. r=canaltinova This makes symbolication work on macOS 13+ for system libraries for which the Mozilla symbol server has no symbols, for example for system libraries from macOS Beta versions. It also makes the /asm/v1 endpoint work for system libraries on macOS 13+. The dyld shared cache moved to a new location in that version. This fix matches the fix for samply in https://github.com/mstange/samply/commit/da71321c597d4499730976923a7d0695147030b7 . Depends on D166227 Differential Revision: https://phabricator.services.mozilla.com/D166228 --- .../client/performance-new/symbolication-worker.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/devtools/client/performance-new/symbolication-worker.js b/devtools/client/performance-new/symbolication-worker.js index 7a2ece44f300..d50eb510ee01 100644 --- a/devtools/client/performance-new/symbolication-worker.js +++ b/devtools/client/performance-new/symbolication-worker.js @@ -122,6 +122,12 @@ class FileAndPathHelper { // system-wide cache file and not present as individual files. if (arch && (path.startsWith("/usr/") || path.startsWith("/System/"))) { // Use the special syntax `dyldcache::`. + + // Dyld cache location used on macOS 13+: + candidatePaths.push( + `dyldcache:/System/Volumes/Preboot/Cryptexes/OS/System/Library/dyld/dyld_shared_cache_${arch}:${path}` + ); + // Dyld cache location used on macOS 11 and 12: candidatePaths.push( `dyldcache:/System/Library/dyld/dyld_shared_cache_${arch}:${path}` ); @@ -181,6 +187,12 @@ class FileAndPathHelper { // system-wide cache file and not present as individual files. if (arch && (path.startsWith("/usr/") || path.startsWith("/System/"))) { // Use the special syntax `dyldcache::`. + + // Dyld cache location used on macOS 13+: + candidatePaths.push( + `dyldcache:/System/Volumes/Preboot/Cryptexes/OS/System/Library/dyld/dyld_shared_cache_${arch}:${path}` + ); + // Dyld cache location used on macOS 11 and 12: candidatePaths.push( `dyldcache:/System/Library/dyld/dyld_shared_cache_${arch}:${path}` );