skip and report empty lines as PCDBEmptyRecord

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@40234 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Riccardo Mottola 2016-11-25 15:51:28 +00:00
parent 6e70451153
commit 340d101ffd
3 changed files with 16 additions and 3 deletions

View file

@ -1,3 +1,9 @@
2016-11-25 Riccardo Mottola <rm@gnu.org>
* Modules/Debuggers/ProjectCenter/PipeDelegate.h
* Modules/Debuggers/ProjectCenter/PipeDelegate.m
skip and report empty lines as PCDBEmptyRecord
2016-11-19 11:22-EST Gregory John Casamento <greg.casamento@gmail.com>
* Modules/Debuggers/ProjectCenter/PCDebugger.m

View file

@ -38,7 +38,8 @@ typedef enum PCDebuggerOutputType_enum {
PCDBBreakpointRecord,
PCDBFrameRecord,
PCDBThreadRecord,
PCDBAdaExceptionRecord
PCDBAdaExceptionRecord,
PCDBEmptyRecord
} PCDebuggerOutputTypes;
@interface PipeDelegate : NSObject <PCDebuggerViewDelegateProtocol>

View file

@ -148,9 +148,15 @@
- (PCDebuggerOutputTypes) parseStringLine: (NSString *)stringInput
{
BOOL found = NO;
NSScanner *stringScanner = [NSScanner scannerWithString: stringInput];
NSScanner *stringScanner;
NSString *prefix = NULL;
if ([stringInput length] == 0)
return PCDBEmptyRecord;
stringScanner = [NSScanner scannerWithString: stringInput];
//NSLog(@"parsing: |%@|", stringInput);
[stringScanner scanString: @"(gdb)" intoString: &prefix];
if(prefix != nil)
{
@ -310,7 +316,7 @@
}
return PCDBResultRecord;
}
NSLog(@"No match found parse: |%@|", stringInput);
return PCDBNotFoundRecord;
}