mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Merge pull request #79582 from mikeash/dont-inspect-non-swift
[swift-inspect] On Darwin, don't try to inspect processes that don't have Swift.
This commit is contained in:
@@ -163,6 +163,11 @@ internal final class DarwinRemoteProcess: RemoteProcess {
|
||||
self.swiftCore =
|
||||
CSSymbolicatorGetSymbolOwnerWithNameAtTime(self.symbolicator,
|
||||
"libswiftCore.dylib", kCSNow)
|
||||
if CSIsNull(self.swiftCore) {
|
||||
print("pid \(processId) does not have libswiftCore.dylib loaded")
|
||||
return nil
|
||||
}
|
||||
|
||||
self.swiftConcurrency = CSSymbolicatorGetSymbolOwnerWithNameAtTime(
|
||||
symbolicator, "libswift_Concurrency.dylib", kCSNow)
|
||||
_ = task_start_peeking(self.task)
|
||||
|
||||
Reference in New Issue
Block a user