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 {
3737 self . linkMap = try LinkMap ( for: process)
3838 var symbolLookup : SymbolLookup = [ : ]
3939 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 }
4341 let symbolMap = try elfFile. loadSymbols ( baseAddress: linkMapEntry. baseAddress)
4442 symbolLookup [ linkMapEntry. moduleName] = symbolMap
4543 }
Original file line number Diff line number Diff line change 112112 self . symbolCache = try SwiftInspectLinux . SymbolCache ( for: process)
113113 self . memoryMap = try SwiftInspectLinux . MemoryMap ( for: processId)
114114 } catch {
115- fputs ( " failed initialization for process \( processId) : \( error) \n " , stderr )
115+ fatalError ( " failed initialization for process \( processId) : \( error) " )
116116 return nil
117117 }
118118
152152 }
153153
154154 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 " )
156156 }
157157 }
158158#endif // os(Linux)
You can’t perform that action at this time.
0 commit comments