From 4c930a4b1e5ffed7545c15e4c9319733eab63d94 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Mon, 1 Dec 2008 10:17:12 -0500 Subject: [PATCH] Remove all references of the window controller from GDBpConnection * Source/GDBpConnection.h: Removed the windowController ivar and prop * Source/GDBpConnection.m: (initWithWindowController:port:session): Renamed to -[initWithPort:session:] (dealloc): No more windowController (socketDidAccept:): Change a -[refreshStatus] to an -[updateStatus] (reconnect): Don't make a call on windowController * Source/DebuggerController.m: (init): Use the updated init method for GDBpConnection --- Source/DebuggerController.m | 4 +--- Source/GDBpConnection.h | 6 +----- Source/GDBpConnection.m | 10 +++------- 3 files changed, 5 insertions(+), 15 deletions(-) diff --git a/Source/DebuggerController.m b/Source/DebuggerController.m index a8c5ded..b3be45e 100644 --- a/Source/DebuggerController.m +++ b/Source/DebuggerController.m @@ -40,9 +40,7 @@ stackController = [[StackController alloc] init]; NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; - connection = [[GDBpConnection alloc] initWithWindowController:self - port:[defaults integerForKey:@"Port"] - session:[defaults stringForKey:@"IDEKey"]]; + connection = [[GDBpConnection alloc] initWithPort:[defaults integerForKey:@"Port"] session:[defaults stringForKey:@"IDEKey"]]; expandedRegisters = [[NSMutableSet alloc] init]; [[self window] makeKeyAndOrderFront:nil]; [[self window] setDelegate:self]; diff --git a/Source/GDBpConnection.h b/Source/GDBpConnection.h index c5ec8e8..09f270f 100644 --- a/Source/GDBpConnection.h +++ b/Source/GDBpConnection.h @@ -15,7 +15,6 @@ */ #import -#import "DebuggerController.h" #import "SocketWrapper.h" #import "Breakpoint.h" #import "StackFrame.h" @@ -33,17 +32,14 @@ extern NSString *kErrorOccurredNotif; */ NSString *status; - DebuggerController *windowController; - SocketWrapper *socket; } @property(readonly, copy) NSString *status; @property(readonly) SocketWrapper *socket; -@property(readonly) DebuggerController *windowController; // initializer -- (id)initWithWindowController:(DebuggerController *)wc port:(int)aPort session:(NSString *)aSession; +- (id)initWithPort:(int)aPort session:(NSString *)aSession; // getter - (int)port; diff --git a/Source/GDBpConnection.m b/Source/GDBpConnection.m index 346285c..c06f6f8 100644 --- a/Source/GDBpConnection.m +++ b/Source/GDBpConnection.m @@ -30,13 +30,13 @@ NSString *kErrorOccurredNotif = @"GDBpConnection_ErrorOccured_Notification"; @implementation GDBpConnection -@synthesize socket, windowController, status; +@synthesize socket, status; /** * Creates a new DebuggerConnection and initializes the socket from the given connection * paramters. */ -- (id)initWithWindowController:(DebuggerController *)wc port:(int)aPort session:(NSString *)aSession; +- (id)initWithPort:(int)aPort session:(NSString *)aSession; { if (self = [super init]) { @@ -44,8 +44,6 @@ NSString *kErrorOccurredNotif = @"GDBpConnection_ErrorOccured_Notification"; session = [aSession retain]; connected = NO; - windowController = [wc retain]; - // now that we have our host information, open the socket socket = [[SocketWrapper alloc] initWithConnection:self]; [socket setDelegate:self]; @@ -63,7 +61,6 @@ NSString *kErrorOccurredNotif = @"GDBpConnection_ErrorOccured_Notification"; { [socket release]; [session release]; - [windowController release]; [super dealloc]; } @@ -112,7 +109,7 @@ NSString *kErrorOccurredNotif = @"GDBpConnection_ErrorOccured_Notification"; { connected = YES; [socket receive]; - [self refreshStatus]; + [self updateStatus]; // register any breakpoints that exist offline for (Breakpoint *bp in [[BreakpointManager sharedManager] breakpoints]) @@ -144,7 +141,6 @@ NSString *kErrorOccurredNotif = @"GDBpConnection_ErrorOccured_Notification"; { [socket close]; self.status = @"Connecting"; - [windowController resetDisplays]; [socket connect]; } -- 2.43.5