move process id into the debugger from the view

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@39716 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Riccardo Mottola 2016-05-03 21:26:31 +00:00
parent 1ab5955e3d
commit 55b4d1a424
4 changed files with 14 additions and 20 deletions

View file

@ -34,6 +34,7 @@
id statusField;
NSString *executablePath;
NSString *debuggerPath;
int subProcessId;
}
- (void) setStatus: (NSString *) status;
@ -41,5 +42,7 @@
- (NSString *)executablePath;
- (void)setExecutablePath:(NSString *)p;
- (void) interrupt;
- (int) subProcessId;
- (void) setSubProcessId:(int)pid;
@end

View file

@ -208,6 +208,16 @@ static NSImage *downImage = nil;
ASSIGN(executablePath,p);
}
- (int) subProcessId
{
return subProcessId;
}
- (void) setSubProcessId: (int)pid
{
subProcessId = pid;
}
// kill process
- (void) interrupt
{

View file

@ -33,14 +33,13 @@
PCDebugger *debugger;
id <PCDebuggerViewDelegateProtocol> viewDelegate;
NSString *currentFile;
int subProcessId;
}
- (void) setDebugger:(PCDebugger *)theDebugger;
- (void) setDelegate:(id <PCDebuggerViewDelegateProtocol>) vd;
- (void) setCurrentFile: (NSString *)fileName;
- (NSString *) currentFile;
- (int) subProcessId;
- (void) runProgram: (NSString *)path
inCurrentDirectory: (NSString *)directory

View file

@ -104,20 +104,6 @@
}
}
// NOTE: This works on certain versions of gdb, but we need to come up with another way of getting
// the process id in a more generic way.
range = [str rangeOfString: @"[New Thread"];
if (range.location != NSNotFound)
{
NSScanner *scanner = [NSScanner scannerWithString: str];
NSString *process = nil;
[scanner scanUpToString: @"(LWP" intoString: NULL];
[scanner scanString: @"(LWP" intoString: NULL];
[scanner scanUpToString: @")" intoString: &process];
subProcessId = [process intValue];
}
// Check certain status messages from GDB and set the state correctly.
range = [str rangeOfString: @"Starting program:"];
if (range.location != NSNotFound)
@ -170,10 +156,6 @@
return currentFile;
}
- (int) subProcessId
{
return subProcessId;
}
- (void) terminate
{