Create an error system that follows MVC
[macgdbp.git] / Source / GDBpConnection.h
1 /*
2 * MacGDBp
3 * Copyright (c) 2007 - 2008, Blue Static <http://www.bluestatic.org>
4 *
5 * This program is free software; you can redistribute it and/or modify it under the terms of the GNU
6 * General Public License as published by the Free Software Foundation; either version 2 of the
7 * License, or (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
10 * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 * General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License along with this program; if not,
14 * write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
15 */
16
17 #import <Cocoa/Cocoa.h>
18 #import "DebuggerController.h"
19 #import "SocketWrapper.h"
20 #import "Breakpoint.h"
21 #import "StackFrame.h"
22
23 extern NSString *kErrorOccurredNotif;
24
25 @interface GDBpConnection : NSObject
26 {
27 int port;
28 NSString *session;
29 BOOL connected;
30
31 DebuggerController *windowController;
32
33 SocketWrapper *socket;
34 }
35
36 @property(readonly) SocketWrapper *socket;
37 @property(readonly) DebuggerController *windowController;
38
39 // initializer
40 - (id)initWithWindowController:(DebuggerController *)wc port:(int)aPort session:(NSString *)aSession;
41
42 // getter
43 - (int)port;
44 - (NSString *)session;
45 - (NSString *)remoteHost;
46 - (BOOL)isConnected;
47
48 // communication
49 - (void)reconnect;
50 - (void)run;
51 - (StackFrame *)stepIn;
52 - (StackFrame *)stepOut;
53 - (StackFrame *)stepOver;
54 - (void)addBreakpoint:(Breakpoint *)bp;
55 - (void)removeBreakpoint:(Breakpoint *)bp;
56 - (void)refreshStatus;
57 - (void)updateStackTraceAndRegisters;
58
59 // helpers
60 - (NSArray *)getProperty:(NSString *)property;
61
62 @end