Author: rmottola
Date: Tue May 3 18:37:37 2016
New Revision: 39714
URL: http://svn.gna.org/viewcvs/gnustep?rev=39714&view=rev
Log:
move interrupt method to the debugger class and add windows implementation
through tskill
Modified:
apps/projectcenter/trunk/Modules/Debuggers/ProjectCenter/PCDebugger.h
apps/projectcenter/trunk/Modules/Debuggers/ProjectCenter/PCDebugger.m
apps/projectcenter/trunk/Modules/Debuggers/ProjectCenter/PCDebuggerView.m
Modified: apps/projectcenter/trunk/Modules/Debuggers/ProjectCenter/PCDebugger.h
URL:
http://svn.gna.org/viewcvs/gnustep/apps/projectcenter/trunk/Modules/Debuggers/ProjectCenter/PCDebugger.h?rev=39714&r1=39713&r2=39714&view=diff
==============================================================================
--- apps/projectcenter/trunk/Modules/Debuggers/ProjectCenter/PCDebugger.h
(original)
+++ apps/projectcenter/trunk/Modules/Debuggers/ProjectCenter/PCDebugger.h
Tue May 3 18:37:37 2016
@@ -40,5 +40,6 @@
- (NSString *) status;
- (NSString *)executablePath;
- (void)setExecutablePath:(NSString *)p;
+- (void) interrupt;
@end
Modified: apps/projectcenter/trunk/Modules/Debuggers/ProjectCenter/PCDebugger.m
URL:
http://svn.gna.org/viewcvs/gnustep/apps/projectcenter/trunk/Modules/Debuggers/ProjectCenter/PCDebugger.m?rev=39714&r1=39713&r2=39714&view=diff
==============================================================================
--- apps/projectcenter/trunk/Modules/Debuggers/ProjectCenter/PCDebugger.m
(original)
+++ apps/projectcenter/trunk/Modules/Debuggers/ProjectCenter/PCDebugger.m
Tue May 3 18:37:37 2016
@@ -208,6 +208,28 @@
ASSIGN(executablePath,p);
}
+// kill process
+- (void) interrupt
+{
+ int pid = [debuggerView subProcessId];
+ if(pid != 0)
+ {
+#ifndef __MINGW32__
+ kill(pid,SIGINT);
+#else
+ // on windows we run tskill as a shell command
+ NSTask *t;
+ NSArray *args;
+
+ args = [NSArray arrayWithObjects:[NSString stringWithFormat:@"%d", pid],
nil];
+ t = [NSTask new];
+ [t setLaunchPath:@"tskill.exe"];
+ [t launch];
+ [t release];
+#endif
+ }
+}
+
// action methods for toolbar...
- (void) go: (id) sender
{
Modified:
apps/projectcenter/trunk/Modules/Debuggers/ProjectCenter/PCDebuggerView.m
URL:
http://svn.gna.org/viewcvs/gnustep/apps/projectcenter/trunk/Modules/Debuggers/ProjectCenter/PCDebuggerView.m?rev=39714&r1=39713&r2=39714&view=diff
==============================================================================
--- apps/projectcenter/trunk/Modules/Debuggers/ProjectCenter/PCDebuggerView.m
(original)
+++ apps/projectcenter/trunk/Modules/Debuggers/ProjectCenter/PCDebuggerView.m
Tue May 3 18:37:37 2016
@@ -175,18 +175,6 @@
return subProcessId;
}
-- (void) interrupt
-{
- int pid = [self subProcessId];
- if(pid != 0)
- {
-#ifndef __MINGW32__
- kill(pid,SIGINT);
-#endif
- }
- [viewDelegate putString:@"-exec-interrupt"];
-}
-
- (void) terminate
{
[viewDelegate terminate];
_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs