+ Always try to find Compiler in same directory first

git-svn-id: trunk@15763 -
This commit is contained in:
pierre 2010-08-10 11:37:06 +00:00
parent 874e69bcf8
commit 45b11561cf

View File

@ -44,10 +44,12 @@ const
GDBExeName = 'gdbpas'; GDBExeName = 'gdbpas';
GDBIniName = '.gdbinit'; GDBIniName = '.gdbinit';
DefaultCompilerName = 'ppc386'; DefaultCompilerName = 'ppc386';
PathSep=':';
{$else} {$else}
GDBExeName = 'gdbpas.exe'; GDBExeName = 'gdbpas.exe';
GDBIniName = 'gdb.ini'; GDBIniName = 'gdb.ini';
DefaultCompilerName = 'ppc386.exe'; DefaultCompilerName = 'ppc386.exe';
PathSep=';';
{$endif not linux} {$endif not linux}
{ If you add a gdb.fpc file in a given directory } { If you add a gdb.fpc file in a given directory }
@ -72,7 +74,7 @@ begin
{ support for info functions directly : used in makefiles } { support for info functions directly : used in makefiles }
if (paramcount=1) and (pos('-i',Paramstr(1))=1) then if (paramcount=1) and (pos('-i',Paramstr(1))=1) then
begin begin
Exec(fsearch(CompilerName,GetEnv('PATH')),Paramstr(1)); Exec(fsearch(CompilerName,Dir+PathSep+GetEnv('PATH')),Paramstr(1));
exit; exit;
end; end;
@ -114,7 +116,7 @@ begin
Writeln(fpcgdbini,'end'); Writeln(fpcgdbini,'end');
Close(fpcgdbini); Close(fpcgdbini);
Exec(fsearch(GDBExeName,GetEnv('PATH')), Exec(fsearch(GDBExeName,Dir+PathSep+GetEnv('PATH')),
{$ifdef win32} {$ifdef win32}
'--nw '+ '--nw '+
{$endif win32} {$endif win32}