mirror of
https://github.com/gnustep/apps-projectcenter.git
synced 2025-03-14 06:31:31 +00:00
Added notification to fix breakpoint loading.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@40221 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
db013f327c
commit
b7fc2a0ccf
5 changed files with 29 additions and 2 deletions
|
@ -1,3 +1,11 @@
|
|||
2016-11-17 09:18-EST Gregory John Casamento <greg.casamento@gmail.com>
|
||||
|
||||
* Modules/Debuggers/ProjectCenter/PCDebugger.h
|
||||
* Modules/Debuggers/ProjectCenter/PCDebugger.m
|
||||
* Modules/Debuggers/ProjectCenter/PipeDelegate.h
|
||||
* Modules/Debuggers/ProjectCenter/PipeDelegate.m: Added notification
|
||||
to fix breakpoint loading.
|
||||
|
||||
2016-09-29 Riccardo Mottola <rm@gnu.org>
|
||||
|
||||
* Modules/Debuggers/ProjectCenter/PCDebugger.h
|
||||
|
|
|
@ -34,6 +34,7 @@ extern NSString *PCBreakTypeMethod;
|
|||
extern const NSString *PCBreakMethod;
|
||||
extern const NSString *PCBreakFilename;
|
||||
extern const NSString *PCBreakLineNumber;
|
||||
extern NSString *PCDBDebuggerStartedNotification;
|
||||
|
||||
@interface PCDebugger : NSObject <CodeDebugger>
|
||||
{
|
||||
|
|
|
@ -59,6 +59,7 @@ NSString *PCBreakTypeMethod = @"BreakTypeMethod";
|
|||
const NSString *PCBreakMethod = @"BreakMethod";
|
||||
const NSString *PCBreakFilename = @"BreakFilename";
|
||||
const NSString *PCBreakLineNumber = @"BreakLineNumber";
|
||||
NSString *PCDBDebuggerStartedNotification = @"PCDBDebuggerStartedNotification";
|
||||
|
||||
@implementation PCDebugger
|
||||
+ (void) initialize
|
||||
|
@ -161,6 +162,11 @@ const NSString *PCBreakLineNumber = @"BreakLineNumber";
|
|||
gdbVersion = 0.0;
|
||||
|
||||
breakpoints = nil;
|
||||
|
||||
[[NSNotificationCenter defaultCenter] addObserver: self
|
||||
selector: @selector(handleNotification:)
|
||||
name: PCDBDebuggerStartedNotification
|
||||
object: nil];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
@ -187,8 +193,11 @@ const NSString *PCBreakLineNumber = @"BreakLineNumber";
|
|||
withArguments: [[NSArray alloc] initWithObjects: @"--interpreter=mi", @"-f", executablePath, nil]
|
||||
logStandardError: YES];
|
||||
|
||||
// is this really the best place?
|
||||
[self initBreakpoints];
|
||||
}
|
||||
|
||||
- (void) handleNotification: (NSNotification *)notification
|
||||
{
|
||||
[self initBreakpoints];
|
||||
}
|
||||
|
||||
- (void) initBreakpoints
|
||||
|
|
|
@ -55,6 +55,8 @@ typedef enum PCDebuggerOutputType_enum {
|
|||
NSColor *messageColor;
|
||||
NSColor *errorColor;
|
||||
NSColor *promptColor;
|
||||
|
||||
BOOL debuggerStarted;
|
||||
}
|
||||
|
||||
- (void)logStdOut:(NSNotification *)aNotif;
|
||||
|
|
|
@ -54,6 +54,8 @@
|
|||
messageColor = [[NSColor brownColor] retain];
|
||||
errorColor = [[NSColor redColor] retain];
|
||||
promptColor = [[NSColor purpleColor] retain];
|
||||
|
||||
debuggerStarted = NO;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
@ -152,6 +154,11 @@
|
|||
[stringScanner scanString: @"(gdb)" intoString: &prefix];
|
||||
if(prefix != nil)
|
||||
{
|
||||
if(debuggerStarted == NO)
|
||||
{
|
||||
[NOTIFICATION_CENTER postNotificationName:PCDBDebuggerStartedNotification
|
||||
object: nil];
|
||||
}
|
||||
return PCDBPromptRecord;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue