endoli / endoli/lldb.rs

error: the platform is not currently connected

Open
#28 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
62
Forks
15
PR merge metrics
No merged PRs in 30d

Description

## Error

```
➜ ~ rust-lldb /redacted/target/debug/deps/project-6ae0aa7bbbe04010
Current executable set to '/redacted/target/debug/deps/project-6ae0aa7bbbe04010' (arm64).
(lldb) run
error: the platform is not currently connected

(lldb) platform status
Platform: remote-macosx
Connected: no
SDK Path: error: unable to locate SDK

(lldb) platform select host
Platform: host
Triple: x86_64-apple-macosx
OS Version: 14.2.1 (23C71)
Hostname: 127.0.0.1
WorkingDir: /redacted
Kernel: Darwin Kernel Version 23.2.0: Wed Nov 15 21:53:18 PST 2023; root:xnu-10002.61.3~2/RELEASE_ARM64_T6000

(lldb) platform status
Platform: remote-macosx
Connected: no
SDK Path: error: unable to locate SDK
```

## Comparison: `lldb`

```
➜ ~ lldb /redacted/target/debug/deps/project-6ae0aa7bbbe04010
(lldb) target create "/redacted/target/debug/deps/project-6ae0aa7bbbe04010"
Current executable set to '/redacted/target/debug/deps/project-6ae0aa7bbbe04010' (arm64).

(lldb) platform status
Platform: host
Triple: arm64-apple-macosx
OS Version: 14.2.1 (23C71)
Hostname: 127.0.0.1
WorkingDir: /redacted
Kernel: Darwin Kernel Version 23.2.0: Wed Nov 15 21:53:18 PST 2023; root:xnu-10002.61.3~2/RELEASE_ARM64_T6000
```

## Background

1. on OSX 14.2.1 (23C71) on M1 (arm)
2. `lldb` itself works as expected as shown above (`run` works out of the box), this problem only appears with `rust-lldb`
4. This is a test binary
5. I followed the readme step to set `DYLD_FRAMEWORK_PATH`
6. This [old, related issue](https://github.com/llvm/llvm-project/issues/25770) in the LLVM project doesn't add any information

## Version

```
➜ ~ rust-lldb --version
lldb-1500.0.200.58
Apple Swift version 5.9.2 (swiftlang-5.9.2.2.56 clang-1500.1.0.2.5)

➜ ~ lldb --version
lldb-1500.0.200.58
Apple Swift version 5.9.2 (swiftlang-5.9.2.2.56 clang-1500.1.0.2.5)
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the issue with rust-lldb and the test binary on macOS 14.2.1 on an M1, then compare its platform state with plain lldb using the commands and DYLD_FRAMEWORK_PATH setup shown here. Done means rust-lldb selects the host platform, locates the SDK, and allows the binary to run without the connection error.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.