Author: rmottola
Date: Fri May 13 01:41:27 2016
New Revision: 39749

URL: http://svn.gna.org/viewcvs/gnustep?rev=39749&view=rev
Log:
parse GDB version from initial information

Modified:
    apps/projectcenter/trunk/Modules/Debuggers/ProjectCenter/PipeDelegate.m

Modified: 
apps/projectcenter/trunk/Modules/Debuggers/ProjectCenter/PipeDelegate.m
URL: 
http://svn.gna.org/viewcvs/gnustep/apps/projectcenter/trunk/Modules/Debuggers/ProjectCenter/PipeDelegate.m?rev=39749&r1=39748&r2=39749&view=diff
==============================================================================
--- apps/projectcenter/trunk/Modules/Debuggers/ProjectCenter/PipeDelegate.m     
(original)
+++ apps/projectcenter/trunk/Modules/Debuggers/ProjectCenter/PipeDelegate.m     
Fri May 13 01:41:27 2016
@@ -213,6 +213,28 @@
   [stringScanner scanString: @"~" intoString: &prefix];
   if(prefix != nil)
     {
+      if ([debugger gdbVersion] == 0.0)
+        {
+          NSString *str1 = nil;
+          NSString *str2 = nil;
+          
+          [stringScanner scanString: @"\"GNU gdb" intoString: &str1];
+          if (str1 != nil)
+            {
+              [stringScanner scanString: @" (GDB)" intoString: &str2];
+            }
+
+          if (str2 != nil || str1 != nil)
+            {
+              float v;
+
+              if ([stringScanner scanFloat:&v])
+                {
+                  NSLog(@"GDB version string: %f", v);
+                  [debugger setGdbVersion:v];
+                }
+            }
+        }
       return PCDBConsoleStreamRecord;
     }
 
@@ -288,7 +310,7 @@
   NSArray *components = [inputString componentsSeparatedByString:@"\n"];
   NSEnumerator *en = [components objectEnumerator];
   NSString *item = nil;
-  
+
   while((item = [en nextObject]) != nil) 
     {
       PCDebuggerOutputTypes outtype = [self parseStringLine: item];


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

Reply via email to