@@ -141,7 +141,7 @@ class Target {
141141 }
142142 }
143143
144- init ( crashInfoAddr: UInt64 , limit: Int ? , top: Int ) {
144+ init ( crashInfoAddr: UInt64 , limit: Int ? , top: Int , cache : Bool ) {
145145 pid = getppid ( )
146146 if let parentTask = Self . getParentTask ( ) {
147147 task = parentTask
@@ -177,10 +177,10 @@ class Target {
177177 images = Backtrace . captureImages ( for: task)
178178 sharedCacheInfo = Backtrace . captureSharedCacheInfo ( for: task)
179179
180- fetchThreads ( limit: limit, top: top)
180+ fetchThreads ( limit: limit, top: top, cache : cache )
181181 }
182182
183- func fetchThreads( limit: Int ? , top: Int ) {
183+ func fetchThreads( limit: Int ? , top: Int , cache : Bool ) {
184184 var threadPorts : thread_act_array_t ? = nil
185185 var threadCount : mach_msg_type_number_t = 0
186186 let kr = task_threads ( task,
@@ -248,7 +248,8 @@ class Target {
248248 }
249249
250250 guard let symbolicated = backtrace. symbolicated ( with: images,
251- sharedCacheInfo: sharedCacheInfo) else {
251+ sharedCacheInfo: sharedCacheInfo,
252+ useSymbolCache: cache) else {
252253 print ( " unable to symbolicate backtrace from context for thread \( ndx) " )
253254 exit ( 1 )
254255 }
@@ -262,7 +263,7 @@ class Target {
262263 }
263264 }
264265
265- public func redoBacktraces( limit: Int ? , top: Int ) {
266+ public func redoBacktraces( limit: Int ? , top: Int , cache : Bool ) {
266267 for (ndx, thread) in threads. enumerated ( ) {
267268 guard let context = thread. context else {
268269 continue
@@ -277,7 +278,8 @@ class Target {
277278 }
278279
279280 guard let symbolicated = backtrace. symbolicated ( with: images,
280- sharedCacheInfo: sharedCacheInfo) else {
281+ sharedCacheInfo: sharedCacheInfo,
282+ useSymbolCache: cache) else {
281283 print ( " unable to symbolicate backtrace from context for thread \( ndx) " )
282284 continue
283285 }
0 commit comments