浏览代码

Add ExeExt suffix to GDBProgramName if not specified

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

+ 7 - 1
ide/gdbmiproc.pas

@@ -47,6 +47,9 @@ var
 
 
 implementation
 implementation
 
 
+uses
+  fputils;
+
 var
 var
   DebugLogEnabled: Boolean = False;
   DebugLogEnabled: Boolean = False;
 
 
@@ -92,7 +95,10 @@ begin
   end;
   end;
   FProcess := TProcess.Create(nil);
   FProcess := TProcess.Create(nil);
   FProcess.Options := [poUsePipes, poStdErrToOutput];
   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');
   FProcess.Parameters.Add('--interpreter=mi');
   try
   try
     FProcess.Execute;
     FProcess.Execute;