From 1dfc3c881dc1ca6a644c6d15e3f323f684088a0e Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Sun, 10 May 2009 10:46:16 -0400 Subject: [PATCH] Add NSLog()s around the send/receive stuff so we can track activity with Xdebug * MacGDBp.xcodeproj: In debug mode, define BLU_DEBUG as a C flag * Source/GDBpConnection.m: (createCommand:) (processData:) --- MacGDBp.xcodeproj/project.pbxproj | 1 + Source/GDBpConnection.m | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/MacGDBp.xcodeproj/project.pbxproj b/MacGDBp.xcodeproj/project.pbxproj index 7796895..f8c8e2a 100644 --- a/MacGDBp.xcodeproj/project.pbxproj +++ b/MacGDBp.xcodeproj/project.pbxproj @@ -502,6 +502,7 @@ GCC_C_LANGUAGE_STANDARD = c99; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; + OTHER_CFLAGS = "-DBLU_DEBUG"; PREBINDING = NO; SDKROOT = /Developer/SDKs/MacOSX10.5.sdk; }; diff --git a/Source/GDBpConnection.m b/Source/GDBpConnection.m index f4c4af3..45e8e92 100644 --- a/Source/GDBpConnection.m +++ b/Source/GDBpConnection.m @@ -281,6 +281,10 @@ NSString *kErrorOccurredNotif = @"GDBpConnection_ErrorOccured_Notification"; 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]; } @@ -311,6 +315,10 @@ NSString *kErrorOccurredNotif = @"GDBpConnection_ErrorOccured_Notification"; return nil; } +#ifdef BLU_DEBUG + NSLog(@"<-- %@", doc); +#endif + return [doc autorelease]; } -- 2.22.5