From fb2a726dbd66b912fc31883eef9face7a9cbb2b6 Mon Sep 17 00:00:00 2001 From: pierre Date: Mon, 5 Sep 2016 13:10:17 +0000 Subject: [PATCH] Add help message to About if GDB version retrieval does not work git-svn-id: trunk@34433 - --- ide/gdbmiint.pas | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/ide/gdbmiint.pas b/ide/gdbmiint.pas index 103bda0cfb..874d6be8e0 100644 --- a/ide/gdbmiint.pas +++ b/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.