mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-09 11:48:34 +02:00
+ 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:
parent
d09389ac79
commit
b78e0db500
@ -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}
|
||||
|
Loading…
Reference in New Issue
Block a user