[all-commits] [llvm/llvm-project] bf3e32: [lldb] Unify Platform::ResolveExecutable (#96256)

Jonas Devlieghere via All-commits all-commits at lists.llvm.org
Fri Jun 21 11:30:11 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: bf3e3289d67cb0fe136b0660cac39c24c9f65069
      https://github.com/llvm/llvm-project/commit/bf3e3289d67cb0fe136b0660cac39c24c9f65069
  Author: Jonas Devlieghere <jonas at devlieghere.com>
  Date:   2024-06-21 (Fri, 21 Jun 2024)

  Changed paths:
    M lldb/include/lldb/Target/Platform.h
    M lldb/include/lldb/Target/RemoteAwarePlatform.h
    M lldb/source/Plugins/Platform/MacOSX/PlatformAppleSimulator.cpp
    M lldb/source/Plugins/Platform/MacOSX/PlatformAppleSimulator.h
    M lldb/source/Plugins/Platform/MacOSX/PlatformRemoteDarwinDevice.cpp
    M lldb/source/Plugins/Platform/MacOSX/PlatformRemoteDarwinDevice.h
    M lldb/source/Target/Platform.cpp
    M lldb/source/Target/RemoteAwarePlatform.cpp
    M lldb/test/API/assert_messages_test/TestAssertMessages.py
    M lldb/test/API/tools/lldb-dap/launch/TestDAP_launch.py
    M lldb/unittests/Target/RemoteAwarePlatformTest.cpp

  Log Message:
  -----------
  [lldb] Unify Platform::ResolveExecutable (#96256)

The Platform class currently has two functions to resolve an executable:
`ResolveExecutable` and `ResolveRemoteExecutable`. The former strictly
deals with local files while the latter can handle potentially remote
files. I couldn't figure out why the distinction matters, at the latter
is a super-set of the former.

To make things even more confusion, we had a similar but not identical
implementation in RemoteAwarePlatform where its implementation of
`ResolveExecutable` could handle remote files. To top it all off, we had
copy-pasted implementation, dead code included in
`PlatformAppleSimulator` and `PlatformRemoteDarwinDevice`.

I went ahead and unified all the different implementation on the
original `ResolveRemoteExecutable` implementation. As far as I can tell,
it should work for every other platform, and the test suite (on macOS)
seems to agree with me, except for a small wording change.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list