dotnet / dotnet/diagnostics

libsosplugin cannot be loaded into lldb (macos arm64)

Open
#4,259 22 comments 1 reaction 1 assignee Claimed by @mikem8361 View on GitHub
sos tracking-external-issue
Dominant language
C++
Stars
1.3k
Forks
404
Avg merge
2d 3h
Merged PRs (30d)
38

Description

### Description

I try to install dotnet-sos to get an ability to debug dotnet programs on mac, but after installing it according to [this manual](https://github.com/dotnet/diagnostics/blob/main/documentation/building/osx-instructions.md), lldb shows error on startup:
```
$ lldb
error: this file does not represent a loadable dylib
error: 'setsymbolserver' is not a valid command.
(lldb)
```

Futher context:
```
$ cat .lldbinit
#START - ADDED BY SOS INSTALLER
plugin load /Users/yuraaka/.dotnet/sos/libsosplugin.dylib
setsymbolserver -ms
#END - ADDED BY SOS INSTALLER
```

Also, I tried to build libsosplugin [from source](https://github.com/dotnet/diagnostics), but got the same result.
What do I do wrong?

### Reproduction Steps

1. Install dotnet-sos
2. Run lldb
3. Get an error

### Expected behavior

No error is appeared

### Actual behavior

Error "this file does not represent a loadable dylib".

### Regression?

_No response_

### Known Workarounds

_No response_

### Configuration

- Apple M2 Max
- macOS Ventura 13.5.2
```
$ lldb -v
lldb-1403.0.17.67
Apple Swift version 5.8.1 (swiftlang-5.8.0.124.5 clang-1403.0.22.11.100)

$ dotnet-sos --version
7.0.442301+6245a3eeff5a12218eb5b615788d776027133e91
```

### Other information

_No response_

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.