/**
* Send an add breakpoint command
*/
- - (void)addBreakpoint:(Breakpoint *)bp
+ - (void)addBreakpoint:(Breakpoint*)bp
{
if (!connected)
- {
return;
- }
- NSString *cmd = [self createCommand:[NSString stringWithFormat:@"breakpoint_set -t line -f '%@' -n %i", [bp transformedPath], [bp line]]];
- NSString* cmd = [self createCommand:[NSString stringWithFormat:@"breakpoint_set -t line -f %@ -n %i", [bp transformedPath], [bp line]]];
++ NSString* cmd = [self createCommand:[NSString stringWithFormat:@"breakpoint_set -t line -f '%@' -n %i", [bp transformedPath], [bp line]]];
[socket send:cmd];
- NSXMLDocument *info = [self processData:[socket receive]];
+ NSXMLDocument* info = [self processData:[socket receive]];
[bp setDebuggerId:[[[[info rootElement] attributeForName:@"id"] stringValue] intValue]];
}
// collect varargs
va_list argList;
va_start(argList, cmd);
- NSString *format = [[NSString alloc] initWithFormat:cmd arguments:argList]; // format the command
+ NSString* format = [[NSString alloc] initWithFormat:cmd arguments:argList]; // format the command
va_end(argList);
+#ifdef BLU_DEBUG
+ NSLog(@"--> %@", format);
+#endif
+
return [NSString stringWithFormat:@"%@ -i %@", [format autorelease], session];
}
}
// get the source
++<<<<<<< HEAD:Source/GDBpConnection.m
+ NSString *filename = [[xmlframe attributeForName:@"filename"] stringValue];
+ filename = [filename stringByReplacingOccurrencesOfString:@"%" withString:@"%%"]; // escape % in URL chars
++=======
+ NSString* filename = [[xmlframe attributeForName:@"filename"] stringValue];
++>>>>>>> cosmetics:Source/GDBpConnection.m
[socket send:[self createCommand:[NSString stringWithFormat:@"source -f %@", filename]]];
- NSString *source = [[[self processData:[socket receive]] rootElement] value]; // decode base64
+ NSString* source = [[[self processData:[socket receive]] rootElement] value]; // decode base64
// create stack frame
- StackFrame *frame = [[StackFrame alloc]
- initWithIndex:0
+ StackFrame* frame = [[StackFrame alloc]
+ initWithIndex:stackDepth
withFilename:filename
withSource:source
atLine:[[[xmlframe attributeForName:@"lineno"] stringValue] intValue]