]> src.bluestatic.org Git - macgdbp.git/blob - Source/DebuggerBackEnd.h
CFBundleVersion is no longer incremented by gitcrement.
[macgdbp.git] / Source / DebuggerBackEnd.h
1 /*
2 * MacGDBp
3 * Copyright (c) 2007 - 2011, 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
19 #import "ProtocolClient.h"
20
21 @class Breakpoint;
22 @class DebuggerModel;
23 @class StackFrame;
24 @class VariableNode;
25
26 // The DebuggerBackEnd is the communication layer between the application
27 // and the back-end debugger. Clients issue debugger commands via this class,
28 // which are sent in an asynchronous manner. Reads are also asynchronous and
29 // the primary client of this class should set a model object, which will be
30 // updated as data arrive.
31 @interface DebuggerBackEnd : NSObject<ProtocolClientDelegate>
32
33 // Whether the debugger should listen for and attach to connections.
34 @property(assign, nonatomic) BOOL autoAttach;
35
36 // The model object to update in response to changes in the debugger.
37 @property(assign, nonatomic) DebuggerModel* model;
38
39 // Designated initializer. Sets up a connection on |aPort| and will
40 // initialize it if |autoAttach| is YES.
41 - (instancetype)initWithPort:(NSUInteger)aPort autoAttach:(BOOL)doAttach;
42
43 // getter
44 - (uint16_t)port;
45
46 // communication
47 - (void)run;
48 - (void)stepIn;
49 - (void)stepOut;
50 - (void)stepOver;
51 - (void)stop;
52 - (void)detach;
53
54 // Takes a partially loaded stack frame and fetches the rest of the information.
55 - (void)loadStackFrame:(StackFrame*)frame;
56
57 // Ensures that a variable node's immediate children are loaded, and fetches
58 // any that are not. This is done within the scope of the given stack frame.
59 - (void)loadVariableNode:(VariableNode*)variable
60 forStackFrame:(StackFrame*)frame;
61
62 // Breakpoint management.
63 - (void)addBreakpoint:(Breakpoint*)bp;
64 - (void)removeBreakpoint:(Breakpoint*)bp;
65
66 // Evaluates a given string in the current execution context.
67 - (void)evalScript:(NSString*)str callback:(void (^)(NSString*))callback;
68
69 @end