Add ExeExt suffix to GDBProgramName if not specified

git-svn-id: trunk@34432 -
This commit is contained in:
pierre 2016-09-05 13:09:31 +00:00
parent 97c2067832
commit 6d6da7854c

View File

@ -47,6 +47,9 @@ var
implementation
uses
fputils;
var
DebugLogEnabled: Boolean = False;
@ -92,7 +95,10 @@ begin
end;
FProcess := TProcess.Create(nil);
FProcess.Options := [poUsePipes, poStdErrToOutput];
FProcess.Executable := GdbProgramName;
if (ExeExt<>'') and (pos(ExeExt,LowerCaseStr(GdbProgramName))=0) then
FProcess.Executable := GdbProgramName+ExeExt
else
FProcess.Executable := GdbProgramName;
FProcess.Parameters.Add('--interpreter=mi');
try
FProcess.Execute;