From 3aeb0b86fca7420dadb38708b4c38d669045e9fb Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Sat, 18 Dec 2010 13:24:47 -0500 Subject: [PATCH] Renaming because there's too many Debugger* classes DebuggerProcessor -> DebuggerBackEnd DebuggerConnection -> NetworkConnection --- MacGDBp.xcodeproj/project.pbxproj | 24 +++++++++---------- Source/BreakpointManager.h | 6 ++--- ...{DebuggerProcessor.h => DebuggerBackEnd.h} | 18 +++++++------- ...{DebuggerProcessor.m => DebuggerBackEnd.m} | 12 +++++----- Source/DebuggerController.h | 8 +++---- Source/DebuggerController.m | 2 +- Source/LoggingController.h | 2 +- ...buggerConnection.h => NetworkConnection.h} | 14 +++++------ ...buggerConnection.m => NetworkConnection.m} | 16 ++++++------- 9 files changed, 51 insertions(+), 51 deletions(-) rename Source/{DebuggerProcessor.h => DebuggerBackEnd.h} (89%) rename Source/{DebuggerProcessor.m => DebuggerBackEnd.m} (97%) rename Source/{DebuggerConnection.h => NetworkConnection.h} (91%) rename Source/{DebuggerConnection.m => NetworkConnection.m} (98%) diff --git a/MacGDBp.xcodeproj/project.pbxproj b/MacGDBp.xcodeproj/project.pbxproj index f6cbd1b..b815f24 100644 --- a/MacGDBp.xcodeproj/project.pbxproj +++ b/MacGDBp.xcodeproj/project.pbxproj @@ -10,9 +10,9 @@ 1E027F0A0D36F23F00885DEE /* Run.png in Resources */ = {isa = PBXBuildFile; fileRef = 1E027F080D36F23F00885DEE /* Run.png */; }; 1E027F0B0D36F23F00885DEE /* StepOver.png in Resources */ = {isa = PBXBuildFile; fileRef = 1E027F090D36F23F00885DEE /* StepOver.png */; }; 1E02C3D50C60EC2C006F1752 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1E02C3D40C60EC2C006F1752 /* AppDelegate.m */; }; - 1E02C5710C610158006F1752 /* DebuggerProcessor.m in Sources */ = {isa = PBXBuildFile; fileRef = 1E02C5700C610158006F1752 /* DebuggerProcessor.m */; }; + 1E02C5710C610158006F1752 /* DebuggerBackEnd.m in Sources */ = {isa = PBXBuildFile; fileRef = 1E02C5700C610158006F1752 /* DebuggerBackEnd.m */; }; 1E02C5F60C610724006F1752 /* DebuggerController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1E02C5F50C610724006F1752 /* DebuggerController.m */; }; - 1E0724E311B47BCC0017AD3C /* DebuggerConnection.m in Sources */ = {isa = PBXBuildFile; fileRef = 1E0724E211B47BCC0017AD3C /* DebuggerConnection.m */; }; + 1E0724E311B47BCC0017AD3C /* NetworkConnection.m in Sources */ = {isa = PBXBuildFile; fileRef = 1E0724E211B47BCC0017AD3C /* NetworkConnection.m */; }; 1E0AFBB90FC2518700C67031 /* HUDIcon.png in Resources */ = {isa = PBXBuildFile; fileRef = 1E0AFBB80FC2518700C67031 /* HUDIcon.png */; }; 1E1E53030DF9B89800D334F9 /* Breakpoints.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1E1E53010DF9B89800D334F9 /* Breakpoints.xib */; }; 1E35FC760C6579CA0030F527 /* NSXMLElementAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 1E35FC750C6579CA0030F527 /* NSXMLElementAdditions.m */; }; @@ -70,12 +70,12 @@ 1E027F090D36F23F00885DEE /* StepOver.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = StepOver.png; path = Icons/StepOver.png; sourceTree = ""; }; 1E02C3D30C60EC2C006F1752 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = Source/AppDelegate.h; sourceTree = ""; }; 1E02C3D40C60EC2C006F1752 /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = Source/AppDelegate.m; sourceTree = ""; }; - 1E02C56F0C610158006F1752 /* DebuggerProcessor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DebuggerProcessor.h; path = Source/DebuggerProcessor.h; sourceTree = ""; }; - 1E02C5700C610158006F1752 /* DebuggerProcessor.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = DebuggerProcessor.m; path = Source/DebuggerProcessor.m; sourceTree = ""; }; + 1E02C56F0C610158006F1752 /* DebuggerBackEnd.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DebuggerBackEnd.h; path = Source/DebuggerBackEnd.h; sourceTree = ""; }; + 1E02C5700C610158006F1752 /* DebuggerBackEnd.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = DebuggerBackEnd.m; path = Source/DebuggerBackEnd.m; sourceTree = ""; }; 1E02C5F40C610724006F1752 /* DebuggerController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DebuggerController.h; path = Source/DebuggerController.h; sourceTree = ""; }; 1E02C5F50C610724006F1752 /* DebuggerController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = DebuggerController.m; path = Source/DebuggerController.m; sourceTree = ""; }; - 1E0724E111B47BCC0017AD3C /* DebuggerConnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DebuggerConnection.h; path = Source/DebuggerConnection.h; sourceTree = ""; }; - 1E0724E211B47BCC0017AD3C /* DebuggerConnection.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = DebuggerConnection.m; path = Source/DebuggerConnection.m; sourceTree = ""; }; + 1E0724E111B47BCC0017AD3C /* NetworkConnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NetworkConnection.h; path = Source/NetworkConnection.h; sourceTree = ""; }; + 1E0724E211B47BCC0017AD3C /* NetworkConnection.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = NetworkConnection.m; path = Source/NetworkConnection.m; sourceTree = ""; }; 1E0AFBB80FC2518700C67031 /* HUDIcon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = HUDIcon.png; path = Icons/HUDIcon.png; sourceTree = ""; }; 1E1E53020DF9B89800D334F9 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/Breakpoints.xib; sourceTree = ""; }; 1E35FC750C6579CA0030F527 /* NSXMLElementAdditions.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = NSXMLElementAdditions.m; path = Source/NSXMLElementAdditions.m; sourceTree = ""; }; @@ -212,10 +212,10 @@ 1E1E52C10DF9B1FB00D334F9 /* Connection */ = { isa = PBXGroup; children = ( - 1E0724E111B47BCC0017AD3C /* DebuggerConnection.h */, - 1E0724E211B47BCC0017AD3C /* DebuggerConnection.m */, - 1E02C56F0C610158006F1752 /* DebuggerProcessor.h */, - 1E02C5700C610158006F1752 /* DebuggerProcessor.m */, + 1E0724E111B47BCC0017AD3C /* NetworkConnection.h */, + 1E0724E211B47BCC0017AD3C /* NetworkConnection.m */, + 1E02C56F0C610158006F1752 /* DebuggerBackEnd.h */, + 1E02C5700C610158006F1752 /* DebuggerBackEnd.m */, 1E35FFB00C65A74C0030F527 /* NSXMLElementAdditions.h */, 1E35FC750C6579CA0030F527 /* NSXMLElementAdditions.m */, 1E6B5945116106FE001189D2 /* LoggingController.h */, @@ -432,7 +432,7 @@ files = ( 8D11072D0486CEB800E47090 /* main.m in Sources */, 1E02C3D50C60EC2C006F1752 /* AppDelegate.m in Sources */, - 1E02C5710C610158006F1752 /* DebuggerProcessor.m in Sources */, + 1E02C5710C610158006F1752 /* DebuggerBackEnd.m in Sources */, 1E02C5F60C610724006F1752 /* DebuggerController.m in Sources */, 1E35FC760C6579CA0030F527 /* NSXMLElementAdditions.m in Sources */, 1EEBFD090D3599E8008F835B /* BSSplitView.m in Sources */, @@ -447,7 +447,7 @@ 1EBF4D5D0EE35F0700B62769 /* StackController.m in Sources */, 1E67E6FD0F3C052000E68F1B /* PreferencesPathsArrayController.m in Sources */, 1E6B5947116106FE001189D2 /* LoggingController.m in Sources */, - 1E0724E311B47BCC0017AD3C /* DebuggerConnection.m in Sources */, + 1E0724E311B47BCC0017AD3C /* NetworkConnection.m in Sources */, 1EC1337E127DBB00007946FC /* VariableNode.m in Sources */, 1EC6965812BBC6A700A8D984 /* modp_b64.cc in Sources */, ); diff --git a/Source/BreakpointManager.h b/Source/BreakpointManager.h index c9fe2f1..e18b0f3 100644 --- a/Source/BreakpointManager.h +++ b/Source/BreakpointManager.h @@ -16,17 +16,17 @@ #import #import "Breakpoint.h" -#import "DebuggerProcessor.h" +#import "DebuggerBackEnd.h" @interface BreakpointManager : NSObject { NSMutableArray* breakpoints; NSMutableArray* savedBreakpoints; - DebuggerProcessor* connection; + DebuggerBackEnd* connection; } -@property(readwrite, assign) DebuggerProcessor* connection; +@property(readwrite, assign) DebuggerBackEnd* connection; @property(readonly) NSMutableArray* breakpoints; + (BreakpointManager*)sharedManager; diff --git a/Source/DebuggerProcessor.h b/Source/DebuggerBackEnd.h similarity index 89% rename from Source/DebuggerProcessor.h rename to Source/DebuggerBackEnd.h index 9fca3b4..2e54020 100644 --- a/Source/DebuggerProcessor.h +++ b/Source/DebuggerBackEnd.h @@ -17,23 +17,23 @@ #import #import "Breakpoint.h" -#import "DebuggerConnection.h" +#import "NetworkConnection.h" #import "StackFrame.h" -@protocol DebuggerProcessorDelegate; +@protocol DebuggerBackEndDelegate; @class VariableNode; -// The DebuggerProcessor is the communication layer between the application +// 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 Connection will inform the delegate when +// maintain a stack structure and the BackEnd will inform the delegate when // a new frame is created or the stack should be destroyed. -@interface DebuggerProcessor : NSObject +@interface DebuggerBackEnd : NSObject { // The connection to the debugger engine. - DebuggerConnection* connection_; + NetworkConnection* connection_; // Human-readable status of the connection. NSString* status; @@ -44,7 +44,7 @@ BOOL attached_; // The connection's delegate. - id delegate; + id delegate; // A dictionary that maps routingIDs to StackFrame objects. NSMutableDictionary* stackFrames_; @@ -66,7 +66,7 @@ @property (readonly, copy) NSString* status; @property (assign) BOOL attached; -@property (assign) id delegate; +@property (assign) id delegate; // initializer - (id)initWithPort:(NSUInteger)aPort; @@ -95,7 +95,7 @@ // Delegate //////////////////////////////////////////////////////////////////// -@protocol DebuggerProcessorDelegate +@protocol DebuggerBackEndDelegate // Passes up errors from SocketWrapper and any other errors generated by the // GDBpConnection. diff --git a/Source/DebuggerProcessor.m b/Source/DebuggerBackEnd.m similarity index 97% rename from Source/DebuggerProcessor.m rename to Source/DebuggerBackEnd.m index 18fb24b..8e6c53c 100644 --- a/Source/DebuggerProcessor.m +++ b/Source/DebuggerBackEnd.m @@ -14,14 +14,14 @@ * write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -#import "DebuggerProcessor.h" +#import "DebuggerBackEnd.h" #import "AppDelegate.h" #import "NSXMLElementAdditions.h" // GDBpConnection (Private) //////////////////////////////////////////////////// -@interface DebuggerProcessor () +@interface DebuggerBackEnd () @property (readwrite, copy) NSString* status; - (void)recordCallback:(SEL)callback forTransaction:(NSNumber*)txn; @@ -39,14 +39,14 @@ // GDBpConnection ////////////////////////////////////////////////////////////// -@implementation DebuggerProcessor +@implementation DebuggerBackEnd @synthesize status; @synthesize attached = attached_; @synthesize delegate; /** - * Creates a new DebuggerConnection and initializes the socket from the given connection + * Creates a new DebuggerBackEnd and initializes the socket from the given connection * paramters. */ - (id)initWithPort:(NSUInteger)aPort @@ -58,7 +58,7 @@ callTable_ = [NSMutableDictionary new]; [[BreakpointManager sharedManager] setConnection:self]; - connection_ = [[DebuggerConnection alloc] initWithPort:aPort]; + connection_ = [[NetworkConnection alloc] initWithPort:aPort]; connection_.delegate = self; [connection_ connect]; } @@ -200,7 +200,7 @@ // Specific Response Handlers ////////////////////////////////////////////////// #pragma mark Response Handlers -- (void)connectionDidAccept:(DebuggerConnection*)cx +- (void)connectionDidAccept:(NetworkConnection*)cx { if (!self.attached) [connection_ sendCommandWithFormat:@"detach"]; diff --git a/Source/DebuggerController.h b/Source/DebuggerController.h index 72dccd4..5fab7a6 100644 --- a/Source/DebuggerController.h +++ b/Source/DebuggerController.h @@ -16,13 +16,13 @@ #import #import "BSSourceView.h" -#import "DebuggerProcessor.h" +#import "DebuggerBackEnd.h" #import "StackController.h" #include "VariableNode.h" -@interface DebuggerController : NSWindowController +@interface DebuggerController : NSWindowController { - DebuggerProcessor* connection; + DebuggerBackEnd* connection; // This is true when the |connection| has told us to clobber. We will do // so upon receipt of the first new stack frame. @@ -50,7 +50,7 @@ IBOutlet BSSourceView* sourceViewer; } -@property(readonly) DebuggerProcessor* connection; +@property(readonly) DebuggerBackEnd* connection; @property(readonly) BSSourceView* sourceViewer; @property(readonly) NSWindow* inspector; diff --git a/Source/DebuggerController.m b/Source/DebuggerController.m index f604869..6dbf567 100644 --- a/Source/DebuggerController.m +++ b/Source/DebuggerController.m @@ -42,7 +42,7 @@ NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults]; - connection = [[DebuggerProcessor alloc] initWithPort:[defaults integerForKey:@"Port"]]; + connection = [[DebuggerBackEnd alloc] initWithPort:[defaults integerForKey:@"Port"]]; connection.delegate = self; expandedVariables = [[NSMutableSet alloc] init]; [[self window] makeKeyAndOrderFront:nil]; diff --git a/Source/LoggingController.h b/Source/LoggingController.h index cb104de..b8e653a 100644 --- a/Source/LoggingController.h +++ b/Source/LoggingController.h @@ -19,7 +19,7 @@ @class LogEntry; // The LoggingController manages the communication log with the debugger engine. -// Whenever a command or a response received, the DebuggerConnection notifies +// Whenever a command or a response received, the NetworkConnection notifies // this class to record the relevant information. @interface LoggingController : NSWindowController { diff --git a/Source/DebuggerConnection.h b/Source/NetworkConnection.h similarity index 91% rename from Source/DebuggerConnection.h rename to Source/NetworkConnection.h index b05c366..c357866 100644 --- a/Source/DebuggerConnection.h +++ b/Source/NetworkConnection.h @@ -16,14 +16,14 @@ #import -@protocol DebuggerConnectionDelegate; +@protocol NetworkConnectionDelegate; @class LoggingController; // This class is the lowest level component to the network. It deals with all // the intricacies of network and stream programming. Almost all the work this // class does is on a background thread, which is created when the connection is // asked to connect and shutdown when asked to close. -@interface DebuggerConnection : NSObject +@interface NetworkConnection : NSObject { // The port to connect on. NSUInteger port_; @@ -76,12 +76,12 @@ int currentPacketIndex_; // The delegate. All methods are executed on the main thread. - NSObject* delegate_; + NSObject* delegate_; } @property (readonly) NSUInteger port; @property (readonly) BOOL connected; -@property (assign) id delegate; +@property (assign) id delegate; - (id)initWithPort:(NSUInteger)aPort; @@ -100,12 +100,12 @@ // Delegate //////////////////////////////////////////////////////////////////// -@protocol DebuggerConnectionDelegate +@protocol NetworkConnectionDelegate @optional -- (void)connectionDidAccept:(DebuggerConnection*)cx; -- (void)connectionDidClose:(DebuggerConnection*)cx; +- (void)connectionDidAccept:(NetworkConnection*)cx; +- (void)connectionDidClose:(NetworkConnection*)cx; - (void)handleInitialResponse:(NSXMLDocument*)response; diff --git a/Source/DebuggerConnection.m b/Source/NetworkConnection.m similarity index 98% rename from Source/DebuggerConnection.m rename to Source/NetworkConnection.m index a34cbb2..adb2191 100644 --- a/Source/DebuggerConnection.m +++ b/Source/NetworkConnection.m @@ -14,7 +14,7 @@ * write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -#import "DebuggerConnection.h" +#import "NetworkConnection.h" #import #import @@ -22,9 +22,9 @@ #import "AppDelegate.h" #import "LoggingController.h" -// DebuggerConnection (Private) //////////////////////////////////////////////// +// NetworkConnection (Private) ///////////////////////////////////////////////// -@interface DebuggerConnection () +@interface NetworkConnection () @property (assign) CFSocketRef socket; @property (assign) CFReadStreamRef readStream; @@ -61,7 +61,7 @@ void ReadStreamCallback(CFReadStreamRef stream, CFStreamEventType eventType, void* connectionRaw) { - DebuggerConnection* connection = (DebuggerConnection*)connectionRaw; + NetworkConnection* connection = (NetworkConnection*)connectionRaw; switch (eventType) { case kCFStreamEventHasBytesAvailable: @@ -89,7 +89,7 @@ void ReadStreamCallback(CFReadStreamRef stream, CFStreamEventType eventType, voi void WriteStreamCallback(CFWriteStreamRef stream, CFStreamEventType eventType, void* connectionRaw) { - DebuggerConnection* connection = (DebuggerConnection*)connectionRaw; + NetworkConnection* connection = (NetworkConnection*)connectionRaw; switch (eventType) { case kCFStreamEventCanAcceptBytes: @@ -122,7 +122,7 @@ void SocketAcceptCallback(CFSocketRef socket, void* connectionRaw) { assert(callbackType == kCFSocketAcceptCallBack); - DebuggerConnection* connection = (DebuggerConnection*)connectionRaw; + NetworkConnection* connection = (NetworkConnection*)connectionRaw; CFReadStreamRef readStream; CFWriteStreamRef writeStream; @@ -190,13 +190,13 @@ void SocketAcceptCallback(CFSocketRef socket, void PerformQuitSignal(void* info) { - DebuggerConnection* obj = (DebuggerConnection*)info; + NetworkConnection* obj = (NetworkConnection*)info; [obj performQuitSignal]; } //////////////////////////////////////////////////////////////////////////////// -@implementation DebuggerConnection +@implementation NetworkConnection @synthesize port = port_; @synthesize connected = connected_; -- 2.22.5