#import <Cocoa/Cocoa.h>
-#import "Breakpoint.h"
#import "ProtocolClient.h"
-#import "StackFrame.h"
-@protocol DebuggerBackEndDelegate;
+@class Breakpoint;
@class DebuggerModel;
+@class StackFrame;
@class VariableNode;
// The DebuggerBackEnd is the communication layer between the application
// and the back-end debugger. Clients issue debugger commands via this class,
// which are sent in an asynchronous manner. Reads are also asynchronous and
-// the primary client of this class should set itself as the delegate. The
-// primary unit that this class deals with is the StackFrame; clients should
-// maintain a stack structure and the BackEnd will inform the delegate when
-// a new frame is created or the stack should be destroyed.
+// the primary client of this class should set a model object, which will be
+// updated as data arrive.
@interface DebuggerBackEnd : NSObject<ProtocolClientDelegate>
-// Whether the debugger should detach immediately after being contacted by the
-// backend. YES means all debugger connections will be dropped.
+// Whether the debugger should listen for and attach to connections.
@property(assign, nonatomic) BOOL autoAttach;
// The model object to update in response to changes in the debugger.
#import "DebuggerBackEnd.h"
#import "AppDelegate.h"
+#import "Breakpoint.h"
#import "DebuggerModel.h"
#import "modp_b64.h"
#import "NSXMLElementAdditions.h"
+#import "StackFrame.h"
@implementation DebuggerBackEnd {
// The connection to the debugger engine.
ProtocolClient* _client;
}
-@synthesize autoAttach = _autoAttach;
-@synthesize model = _model;
-
- (instancetype)initWithPort:(NSUInteger)aPort autoAttach:(BOOL)doAttach
{
if (self = [super init]) {
#import "DebuggerModel.h"
#import "EvalController.h"
#import "NSXMLElementAdditions.h"
+#import "StackFrame.h"
@interface DebuggerController (Private)
- (void)updateSourceViewer;
@class StackFrame;
+// This class represents the state of an active debugging session. It is
+// typically updated by the DebuggerBackEnd in response to various commands.
+// All of the properties are KVO-compliant.
@interface DebuggerModel : NSObject
// Whether or not the debugger is currently connected.