[Lldb-commits] [PATCH] D130540: [lldb] Read from the Rosetta shared cache with Xcode 14

Jonas Devlieghere via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Jul 25 20:26:31 PDT 2022


JDevlieghere created this revision.
JDevlieghere added reviewers: aprantl, jasonmolenda, mib.
Herald added subscribers: jsji, ctetreau, pengfei.
Herald added a project: All.
JDevlieghere requested review of this revision.

Xcode 14 no longer puts the Rosetta expanded shared cache under `16.0`. Instead, it includes the real version number (e.g. 13.0), the build string  and the architecture, similar to the device support directory names for iOS, tvOS and watchOS.

Currently, when there are multiple directories, we end up picking the wrong one in `GetSDKDirectoryForCurrentOSVersion`. The problem is that without the build string we have no way to differentiate between directories with the same version number.

  13.0 (22A111) x86_64/
  13.0 (22A222) x86_64/
  13.0 (22A333) x86_64/

This patch fixes the problem by using `GetOSBuildString` which, as the name implies, returns the build string if it's known. For the host platform this returns the host build string while for a remote platform this returns the remote build string.


https://reviews.llvm.org/D130540

Files:
  lldb/source/Plugins/Platform/MacOSX/PlatformDarwinDevice.cpp
  lldb/test/API/macosx/rosetta/Makefile
  lldb/test/API/macosx/rosetta/TestRosetta.py
  lldb/test/API/macosx/rosetta/main.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D130540.447537.patch
Type: text/x-patch
Size: 4419 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20220726/686a6a2d/attachment-0001.bin>


More information about the lldb-commits mailing list