[all-commits] [llvm/llvm-project] ecda40: [lldb] Read from the Rosetta shared cache with Xco...

Jonas Devlieghere via All-commits all-commits at lists.llvm.org
Wed Jul 27 15:26:59 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ecda408178fc6486ea568263cdda6624f5bcb8c7
      https://github.com/llvm/llvm-project/commit/ecda408178fc6486ea568263cdda6624f5bcb8c7
  Author: Jonas Devlieghere <jonas at devlieghere.com>
  Date:   2022-07-27 (Wed, 27 Jul 2022)

  Changed paths:
    M lldb/packages/Python/lldbsuite/test/decorators.py
    M lldb/source/Plugins/Platform/MacOSX/PlatformDarwinDevice.cpp
    A lldb/test/API/macosx/rosetta/Makefile
    A lldb/test/API/macosx/rosetta/TestRosetta.py
    A lldb/test/API/macosx/rosetta/main.c

  Log Message:
  -----------
  [lldb] Read from the Rosetta shared cache with Xcode 14

Xcode 14 no longer puts the Rosetta expanded shared cache in a directory
named "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 might end up picking
the wrong one in GetSDKDirectoryForCurrentOSVersion. The problem is that
without the build string we have no way to differentiate between
multiple directories with the same version number. This patch fixes the
problem by using GetOSBuildString which, as the name implies, returns
the build string if known.

This also adds a test for Rosetta debugging on Apple Silicon. Depending
on whether the Rosetta expanded shared cache is present, the test
ensures that there is or isn't a diagnostic about reading out of memory.

rdar://97576121

Differential revision: https://reviews.llvm.org/D130540




More information about the All-commits mailing list