generalize gdb version to debugger version

This commit is contained in:
Riccardo Mottola 2021-06-22 01:49:12 +02:00
parent 17b6359ba9
commit 0375286dcf
3 changed files with 15 additions and 11 deletions

View file

@ -45,7 +45,7 @@ extern NSString *PCDBDebuggerStartedNotification;
NSString *executablePath;
NSString *debuggerPath;
int subProcessId;
float gdbVersion;
float debuggerVersion;
NSDictionary *lastInfoParsed;
NSString *lastFileNameParsed;
NSUInteger lastLineNumberParsed;
@ -59,8 +59,8 @@ extern NSString *PCDBDebuggerStartedNotification;
- (void) interrupt;
- (int) subProcessId;
- (void) setSubProcessId:(int)pid;
- (float) gdbVersion;
- (void) setGdbVersion:(float)ver;
- (float) debuggerVersion;
- (void) setDebuggerVersion:(float)ver;
- (NSDictionary *)lastInfoParsed;
- (void)setSetInfoParsed: (NSDictionary *)dict;
- (NSString *)lastFileNameParsed;

View file

@ -156,7 +156,11 @@ NSString *PCDBDebuggerStartedNotification = @"PCDBDebuggerStartedNotification";
[debuggerView setFont: [self consoleFont]];
subProcessId = 0;
gdbVersion = 0.0;
debuggerVersion = 0.0;
lastInfoParsed = nil;
lastFileNameParsed = nil;
lastLineNumberParsed = NSNotFound;
breakpoints = nil;
@ -277,14 +281,14 @@ NSString *PCDBDebuggerStartedNotification = @"PCDBDebuggerStartedNotification";
subProcessId = pid;
}
- (float) gdbVersion
- (float) debuggerVersion
{
return gdbVersion;
return debuggerVersion;
}
- (void) setGdbVersion:(float)ver
- (void) setDebuggerVersion:(float)ver
{
gdbVersion = ver;
debuggerVersion = ver;
}
- (NSDictionary *)lastInfoParsed

View file

@ -289,7 +289,7 @@
[stringScanner scanString: @"~" intoString: &prefix];
if(prefix != nil)
{
if ([debugger gdbVersion] == 0.0)
if ([debugger debuggerVersion] == 0.0)
{
NSString *str1 = nil;
NSString *str2 = nil;
@ -307,11 +307,11 @@
if ([stringScanner scanFloat:&v])
{
NSLog(@"GDB version string: %f", v);
[debugger setGdbVersion:v];
[debugger setDebuggerVersion:v];
}
}
}
if (([debugger gdbVersion] < 7) && [debugger subProcessId] == 0)
if (([debugger debuggerVersion] < 7) && [debugger subProcessId] == 0)
{
NSString *str1;
// we attempt to parse: [New thread 6800.0x18ec]