File tree Expand file tree Collapse file tree 2 files changed +3
-5
lines changed
tools/swift-inspect/Sources Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -37,9 +37,7 @@ public class SymbolCache {
37
37
self . linkMap = try LinkMap ( for: process)
38
38
var symbolLookup : SymbolLookup = [ : ]
39
39
for linkMapEntry in linkMap. entries {
40
- guard FileManager . default. fileExists ( atPath: linkMapEntry. moduleName) else { continue }
41
-
42
- let elfFile = try ElfFile ( filePath: linkMapEntry. moduleName)
40
+ guard let elfFile = try ? ElfFile ( filePath: linkMapEntry. moduleName) else { continue }
43
41
let symbolMap = try elfFile. loadSymbols ( baseAddress: linkMapEntry. baseAddress)
44
42
symbolLookup [ linkMapEntry. moduleName] = symbolMap
45
43
}
Original file line number Diff line number Diff line change 112
112
self . symbolCache = try SwiftInspectLinux . SymbolCache ( for: process)
113
113
self . memoryMap = try SwiftInspectLinux . MemoryMap ( for: processId)
114
114
} catch {
115
- fputs ( " failed initialization for process \( processId) : \( error) \n " , stderr )
115
+ fatalError ( " failed initialization for process \( processId) : \( error) " )
116
116
return nil
117
117
}
118
118
152
152
}
153
153
154
154
internal func iterateHeap( _ body: ( swift_addr_t , UInt64 ) -> Void ) {
155
- fputs ( " heap iteration is not supported on Linux \n " , stderr )
155
+ fatalError ( " heap iteration is not supported on Linux " )
156
156
}
157
157
}
158
158
#endif // os(Linux)
You can’t perform that action at this time.
0 commit comments