<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/106854>106854</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            could not find gdb-remote stub exe ''
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          torarnv
      </td>
    </tr>
</table>

<pre>
    I'm trying to do remote debugging from macOS to macOS, following the guide at https://lldb.llvm.org/use/remote.html

The Xcode command line tools installation on the remote system has `debugserver`:

```
admin@macos-15-0-0-beta-7 ~ % find /Library/Developer  | grep debugserver
/Library/Developer/CommandLineTools/Library/PrivateFrameworks/LLDB.framework/Versions/A/Resources/debugserver
```

And so does the Xcode install:

```
❯ find /Applications/Xcode.app | grep debugserver
/Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Versions/A/Resources/debugserver
```

But neither have the `lldb-server` binary mentioned in the guide.

I can install `llvm` via Homebrew, but that only provides the `lldb-server` binary, and is missing the `debugserver` binary. When attaching from the host system, I then get:

```
admin@macos-15-0-0-beta-7 ~ % lldb-server platform --server  --listen '*:1234' --log-channels "gdb-remote Process: lldb host"
Connection established.
GDBRemoteCommunication::StartDebugserverProcess(url=[172.20.10.14]:0, port=0)
shlib dir -> `/opt/homebrew/Cellar/llvm/18.1.8/bin/`
support exe dir -> `/opt/homebrew/Cellar/llvm/18.1.8/bin/`
GDBRemoteCommunication::StartDebugserverProcess() could not find gdb-remote stub exe ''
GDBRemoteCommunication::StartDebugserverProcess() failed: unable to locate debugserver
```

The only way I've found to make things work is to manually copy the `debugserver` binary from the Xcode command line tools into `/opt/homebrew/Cellar/llvm/18.1.8/bin/`.

1. Is there some way to run `lldb-server` via the binaries provided by the Xcode command line tools or full app?
2. Is there some way to tell the `lldb-server` binary from the Homebrew installed LLVM to launch itself in GDB server mode, instead of trying to find the `debugserver` binary? (assuming the two are doing the same thing?) Or Is this a packaging issue on the Homebrew side, where the package should include `debugserver` as well?
   
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy0Vk2P2zYQ_TX0ZSBBoix_HHzwrqN0gS0SJEHaKyWOLTYUKZCUXV_624uhLK8XSdwiaQFDsEhx5s0bvkcK79XBIG5Y-cDK3UwMobVuE6wTzhxntZXnzRPjyw6COytzgGBBWnDY2YAgsR4OBxreO9tBJ5p3H-mL-IfxR9hbre0prmsRDoOSCCJAG0LvWbFlvGK80lrWqdbHLrXuwHg1eGS8GlOkbeg0y3Ys247PTy3C742VCI3tOmEkaGUQgrXagzI-CK1FUNaANTHpBao_-4AdtMIDW2QRuEd3RMcWGSG5SUEj4y--Ctkpw-ZZJxrrk7xMsiRLagwiWcJfwHgJe2UkMF49q9oJd2a82uERte3RAbDlIxwc9nCbc8zzzRWMV49jZc_K4Ceq69WH7506ioCVEx2erPsSZ593D-l-GmG8-ozOK2tojtJ8QG8H1yC9fw3jdbnjc2skeGo1-sjiSPmF3_t8sTecrXdsW1152fa9Vk3sCiGIsVLR9_e5-d6qSJAJaAINf2yFQ_k_s_EwBDCoQosOWnHESAlbZLRzk-s2gloZ4c7QoSHQKEGZl32f3gZ8gkaYic4x0rGjEEcl4BfbYe3wRAKqhwChFQGs0WfonT0qeWnJ9_LTMtKF8tAp7yfxfbXrL5-n8FuLBkQIommvUqYVrfXhohuK-USDBg4YflYvN7Ch1yLsresgmUYgSbTyAQ0wvmR8y4ptzos540uasYekaYUxqD0wzg-yTi4Kf-9sg55sJSaI8BnnI6hHaww20RfQB1Fr5VuUl5683T18iDFIeIO5bDqqsth-DMKF3QtxUxa-GpxmxY6VD_mSpzxL8yzN56zcsWKbEV-9dYEVu4zx9ZjGt1rVIJWDhBVvqCGMV7YPjFftteXVI2otXLTFY8d4la_SPF0xXtXKkF9ONPuhpwyAf-J_FvPHiGB8DY0dtARjwyj6m7b4MNQRZOzm8mcT7YXSKKnJgxG1JucHb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