Skip to content

Commit f2ce515

Browse files
authored
Merge pull request swiftlang#41889 from apple/fix-swift-inspect-watchos2
[swift-inspect] Fix taskToThread dictionary on watchOS.
2 parents 07e54bf + 0b32adc commit f2ce515

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tools/swift-inspect/Sources/swift-inspect/Operations/DumpConcurrency.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ fileprivate class ConcurrencyDumper {
323323
print("warning: unable to decode is-running state of target tasks, running state and async backtraces will not be printed")
324324
}
325325

326-
let taskToThread: [swift_addr_t: swift_reflection_ptr_t] =
326+
let taskToThread: [swift_addr_t: UInt64] =
327327
Dictionary(threadCurrentTasks.map{ ($1, $0) }, uniquingKeysWith: { $1 })
328328

329329
var lastChilds: [Bool] = []
@@ -364,7 +364,7 @@ fileprivate class ConcurrencyDumper {
364364
let flags = decodeTaskFlags(task)
365365

366366
output("Task \(hex: task.id) - flags=\(flags) enqueuePriority=\(hex: task.enqueuePriority) maxPriority=\(hex: task.maxPriority) address=\(hex: task.address)")
367-
if let thread = taskToThread[task.address] {
367+
if let thread = taskToThread[swift_addr_t(task.address)] {
368368
output("current task on thread \(hex: thread)")
369369
}
370370
if let parent = task.parent {

0 commit comments

Comments
 (0)