Author: rmottola
Date: Tue May  3 23:26:31 2016
New Revision: 39716

URL: http://svn.gna.org/viewcvs/gnustep?rev=39716&view=rev
Log:
move process id into the debugger from the view

Modified:
    apps/projectcenter/trunk/Modules/Debuggers/ProjectCenter/PCDebugger.h
    apps/projectcenter/trunk/Modules/Debuggers/ProjectCenter/PCDebugger.m
    apps/projectcenter/trunk/Modules/Debuggers/ProjectCenter/PCDebuggerView.h
    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=39716&r1=39715&r2=39716&view=diff
==============================================================================
--- apps/projectcenter/trunk/Modules/Debuggers/ProjectCenter/PCDebugger.h       
(original)
+++ apps/projectcenter/trunk/Modules/Debuggers/ProjectCenter/PCDebugger.h       
Tue May  3 23:26:31 2016
@@ -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

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=39716&r1=39715&r2=39716&view=diff
==============================================================================
--- apps/projectcenter/trunk/Modules/Debuggers/ProjectCenter/PCDebugger.m       
(original)
+++ apps/projectcenter/trunk/Modules/Debuggers/ProjectCenter/PCDebugger.m       
Tue May  3 23:26:31 2016
@@ -208,6 +208,16 @@
   ASSIGN(executablePath,p);
 }
 
+- (int) subProcessId
+{
+  return subProcessId;
+}
+
+- (void) setSubProcessId: (int)pid
+{
+  subProcessId = pid;
+}
+
 // kill process
 - (void) interrupt
 {

Modified: 
apps/projectcenter/trunk/Modules/Debuggers/ProjectCenter/PCDebuggerView.h
URL: 
http://svn.gna.org/viewcvs/gnustep/apps/projectcenter/trunk/Modules/Debuggers/ProjectCenter/PCDebuggerView.h?rev=39716&r1=39715&r2=39716&view=diff
==============================================================================
--- apps/projectcenter/trunk/Modules/Debuggers/ProjectCenter/PCDebuggerView.h   
(original)
+++ apps/projectcenter/trunk/Modules/Debuggers/ProjectCenter/PCDebuggerView.h   
Tue May  3 23:26:31 2016
@@ -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

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=39716&r1=39715&r2=39716&view=diff
==============================================================================
--- apps/projectcenter/trunk/Modules/Debuggers/ProjectCenter/PCDebuggerView.m   
(original)
+++ apps/projectcenter/trunk/Modules/Debuggers/ProjectCenter/PCDebuggerView.m   
Tue May  3 23:26:31 2016
@@ -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
 {


_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs

Reply via email to