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];
*/
#import <Cocoa/Cocoa.h>
-#import "DebuggerController.h"
#import "SocketWrapper.h"
#import "Breakpoint.h"
#import "StackFrame.h"
*/
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;
@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])
{
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];
{
[socket release];
[session release];
- [windowController release];
[super dealloc];
}
{
connected = YES;
[socket receive];
- [self refreshStatus];
+ [self updateStatus];
// register any breakpoints that exist offline
for (Breakpoint *bp in [[BreakpointManager sharedManager] breakpoints])
{
[socket close];
self.status = @"Connecting";
- [windowController resetDisplays];
[socket connect];
}