<string key="IBDocument.HIToolboxVersion">352.00</string>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
- <integer value="15"/>
+ <integer value="8"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
<string key="NSKeyPath">arrangedObjects.index</string>
<object class="NSDictionary" key="NSOptions">
<string key="NS.key.0">NSConditionallySetsEditable</string>
- <integer value="1" key="NS.object.0" id="5"/>
+ <integer value="1" key="NS.object.0" id="9"/>
</object>
<int key="NSNibBindingConnectorVersion">2</int>
</object>
<string key="NSKeyPath">arrangedObjects.lineNumber</string>
<object class="NSDictionary" key="NSOptions">
<string key="NS.key.0">NSConditionallySetsEditable</string>
- <reference key="NS.object.0" ref="5"/>
+ <reference key="NS.object.0" ref="9"/>
</object>
<int key="NSNibBindingConnectorVersion">2</int>
</object>
<string key="NSKeyPath">arrangedObjects.function</string>
<object class="NSDictionary" key="NSOptions">
<string key="NS.key.0">NSConditionallySetsEditable</string>
- <reference key="NS.object.0" ref="5"/>
+ <reference key="NS.object.0" ref="9"/>
</object>
<int key="NSNibBindingConnectorVersion">2</int>
</object>
</object>
<int key="connectionID">563</int>
</object>
+ <object class="IBConnectionRecord">
+ <object class="IBBindingConnection" key="connection">
+ <string key="label">value: connection.status</string>
+ <reference key="source" ref="915016159"/>
+ <reference key="destination" ref="78922448"/>
+ <object class="NSNibBindingConnector" key="connector">
+ <reference key="NSSource" ref="915016159"/>
+ <reference key="NSDestination" ref="78922448"/>
+ <string key="NSLabel">value: connection.status</string>
+ <string key="NSBinding">value</string>
+ <string key="NSKeyPath">connection.status</string>
+ <int key="NSNibBindingConnectorVersion">2</int>
+ </object>
+ </object>
+ <int key="connectionID">564</int>
+ </object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1" id="9"/>
+ <reference ref="9"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<reference ref="9"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
</object>
</object>
<nil key="sourceID"/>
- <int key="maxID">563</int>
+ <int key="maxID">564</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
<string>runButton</string>
<string>sourceViewer</string>
<string>stackArrayController</string>
- <string>stackController2</string>
<string>statusmsg</string>
<string>stepInButton</string>
<string>stepOutButton</string>
<string>NSToolbarItem</string>
<string>BSSourceView</string>
<string>NSArrayController</string>
- <string>NSArrayController</string>
<string>NSTextField</string>
<string>NSToolbarItem</string>
<string>NSToolbarItem</string>
NSString *kErrorOccurredNotif = @"GDBpConnection_ErrorOccured_Notification";
-@interface GDBpConnection (Private)
+@interface GDBpConnection()
+@property(readwrite, copy) NSString *status;
+
- (NSString *)createCommand:(NSString *)cmd;
- (NSXMLDocument *)processData:(NSString *)data;
- (StackFrame *)createStackFrame;
+- (void)updateStatus;
@end
@implementation GDBpConnection
-@synthesize socket, windowController;
+@synthesize socket, windowController, status;
/**
* Creates a new DebuggerConnection and initializes the socket from the given connection
*/
- (void)refreshStatus
{
- [socket send:[self createCommand:@"status"]];
-
- NSXMLDocument *doc = [self processData:[socket receive]];
- NSString *status = [[[doc rootElement] attributeForName:@"status"] stringValue];
- [windowController setStatus:[status capitalizedString]];
-
- if ([status isEqualToString:@"break"])
+ [self updateStatus];
+ if ([status isEqualToString:@"Break"])
{
[self updateStackTraceAndRegisters];
}
- else if ([status isEqualToString:@"stopped"] || [status isEqualToString:@"stopping"])
- {
- connected = NO;
- [socket close];
- [windowController setStatus:@"Stopped"];
- }
}
/**
return [frame autorelease];
}
+/**
+ * Fetches the value of and sets the status instance variable
+ */
+- (void)updateStatus
+{
+ [socket send:[self createCommand:@"status"]];
+ NSXMLDocument *doc = [self processData:[socket receive]];
+ self.status = [[[[doc rootElement] attributeForName:@"status"] stringValue] capitalizedString];
+
+ if ([status isEqualToString:@"Stopped"] || [status isEqualToString:@"Stopping"])
+ {
+ connected = NO;
+ [socket close];
+ self.status = @"Stopped";
+ }
+}
+
@end