From 04563f922c958e6124cfef7a28b15ad042f90aa5 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Fri, 24 Dec 2010 11:29:13 -0500 Subject: [PATCH] Don't fetch source in |-[DebuggerBackEnd loadStackFrame:]| for empy filenames. Doing so wedges the write queue because the error comes back without a transasction ID. --- Source/DebuggerBackEnd.m | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Source/DebuggerBackEnd.m b/Source/DebuggerBackEnd.m index 8e6c53c..42d8f88 100644 --- a/Source/DebuggerBackEnd.m +++ b/Source/DebuggerBackEnd.m @@ -153,12 +153,15 @@ return; NSNumber* routingNumber = [NSNumber numberWithInt:frame.routingID]; + NSNumber* transaction = nil; // Get the source code of the file. Escape % in URL chars. - NSString* escapedFilename = [frame.filename stringByReplacingOccurrencesOfString:@"%" withString:@"%%"]; - NSNumber* transaction = [connection_ sendCommandWithFormat:@"source -f %@", escapedFilename]; - [self recordCallback:@selector(setSource:) forTransaction:transaction]; - [callbackContext_ setObject:routingNumber forKey:transaction]; + if ([frame.filename length]) { + NSString* escapedFilename = [frame.filename stringByReplacingOccurrencesOfString:@"%" withString:@"%%"]; + transaction = [connection_ sendCommandWithFormat:@"source -f %@", escapedFilename]; + [self recordCallback:@selector(setSource:) forTransaction:transaction]; + [callbackContext_ setObject:routingNumber forKey:transaction]; + } // Get the names of all the contexts. transaction = [connection_ sendCommandWithFormat:@"context_names -d %d", frame.index]; -- 2.22.5