浏览代码

Add help message to About if GDB version retrieval does not work

git-svn-id: trunk@34433 -
pierre 9 年之前
父节点
当前提交
fb2a726dbd
共有 1 个文件被更改,包括 19 次插入1 次删除
  1. 19 1
      ide/gdbmiint.pas

+ 19 - 1
ide/gdbmiint.pas

@@ -131,6 +131,7 @@ var
   gdb_file: Text;
 
 function GDBVersion: string;
+function GDBVersionOK: boolean;
 function inferior_pid : longint;
 
 {$ifdef windows}
@@ -589,6 +590,7 @@ end;
 
 var
   CachedGDBVersion: string;
+  CachedGDBVersionOK : boolean;
 
 function GDBVersion: string;
 var
@@ -624,9 +626,25 @@ begin
   GDB.Free;
   CachedGDBVersion := GDBVersion;
   if GDBVersion = '' then
-    GDBVersion := 'GDB missing or does not work';
+    begin
+      GDBVersion := 'GDB missing or does not work'#13
+                   +#3'Consider using -G command line option'#13
+                   +#3'or set FPIDE_GDBPROC environment variable'#13
+                   +#3'to specify full path to GDB';
+      CachedGDBVersionOK := false;
+    end;
+end;
+
+function GDBVersionOK: boolean;
+var
+  S : string;
+begin
+  { Be sure GDBVersion is called }
+  S:=GDBVersion;
+  GDBVersionOK := CachedGDBVersionOK;
 end;
 
 begin
   CachedGDBVersion := '';
+  CachedGDBVersionOK := true;
 end.