+ Also look for gdb if gdbpas is not found.

+ AdaptToGDB procedure to convert filenames with dirtectories
  to the format GDB expects.

git-svn-id: trunk@17853 -
This commit is contained in:
pierre 2011-06-28 10:12:19 +00:00
parent d09389ac79
commit b78e0db500

View File

@ -44,12 +44,14 @@ uses
const
{$ifdef Unix}
GDBExeName : String = 'gdbpas';
GDBAltExeName = 'gdb';
GDBIniName = '.gdbinit';
DefaultCompilerName = 'ppc386';
PathSep=':';
DirSep = '/';
{$else}
GDBExeName : String = 'gdbpas.exe';
GDBAltExeName = 'gdb.exe';
GDBIniName = 'gdb.ini';
DefaultCompilerName = 'ppc386.exe';
PathSep=';';
@ -62,6 +64,17 @@ const
FpcGDBIniName = 'gdb.fpc';
GDBIniTempName : string = 'gdb4fpc.ini';
{ Dos/Windows GDB still need forward slashes }
procedure AdaptToGDB(var filename : string);
var
i : longint;
begin
for i:=1 to length(filename) do
if filename[i]='\' then
filename[i]:='/';
end;
var
fpcgdbini : text;
CompilerName,Dir,Name,Ext : String;
@ -144,6 +157,11 @@ begin
{$endif}
GDBExeName:=fsearch(GDBExeName,Dir+PathSep+GetEnv('PATH'));
if GDBExeName='' then
GDBExeName:=fsearch(GDBAltExeName,Dir+PathSep+GetEnv('PATH'));
AdaptToGDB(CompilerName);
AdaptToGDB(GDBIniTempName);
{$ifdef EXTDEBUG}
Writeln(stderr,'Starting ',GDBExeName,
{$ifdef win32}