[all-commits] [llvm/llvm-project] c22c7a: [lldb] Fix platform selection on Apple Silicon (ag...

Jonas Devlieghere via All-commits all-commits at lists.llvm.org
Tue Mar 15 09:07:17 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c22c7a61b6d9c90d5d4292205c63cd576f4fd05b
      https://github.com/llvm/llvm-project/commit/c22c7a61b6d9c90d5d4292205c63cd576f4fd05b
  Author: Jonas Devlieghere <jonas at devlieghere.com>
  Date:   2022-03-15 (Tue, 15 Mar 2022)

  Changed paths:
    A lldb/lldb/test/API/functionalities/gdb_remote_client/TestPlatformMacOSX.py
    A lldb/lldb/unittests/Platform/PlatformMacOSXTest.cpp
    M lldb/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp
    A lldb/test/API/functionalities/gdb_remote_client/TestPlatformMacOSX.py
    M lldb/unittests/Platform/CMakeLists.txt
    A lldb/unittests/Platform/PlatformMacOSXTest.cpp

  Log Message:
  -----------
  [lldb] Fix platform selection on Apple Silicon (again)

This patch is another attempt to fix platform selection on Apple
Silicon. It partially undoes D117340 which tried to fix the issue by
always instantiating a remote-ios platform for "iPhone and iPad Apps on
Apple Silicon Macs".

While the previous patch worked for attaching, it broke launching and
everything else that expects the remote platform to be connected. I made
an attempt to work around that, but quickly found out that there were
just too may places that had this assumption baked in.

This patch takes a different approach and reverts back to marking the
host platform compatible with iOS triples. This brings us back to the
original situation where platform selection was broken for remote iOS
debugging on Apple Silicon. To fix that, we now look at the process'
host architecture to differentiate between iOS binaries running remotely
and iOS binaries running locally.

I tested the following scenarios, which now all uses the desired
platform:

  - Launching an iOS binary on macOS: uses the host platform
  - Attaching to an iOS binary on macOS: uses the host platform
  - Attaching to a remote iOS binary: uses the remote-ios platform

rdar://89840215

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




More information about the All-commits mailing list