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:
Gregory John Casamento 2016-11-17 14:18:48 +00:00
parent db013f327c
commit b7fc2a0ccf
5 changed files with 29 additions and 2 deletions

View file

@ -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

View file

@ -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>
{

View file

@ -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

View file

@ -55,6 +55,8 @@ typedef enum PCDebuggerOutputType_enum {
NSColor *messageColor;
NSColor *errorColor;
NSColor *promptColor;
BOOL debuggerStarted;
}
- (void)logStdOut:(NSNotification *)aNotif;

View file

@ -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;
}