mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-10 13:29:16 +02:00
+ Add (not yet implemented) inferior_pid function to allow compilation of windebug unit
+ Add using_cygwin_gdb boolean, set by parsing version output git-svn-id: trunk@29728 -
This commit is contained in:
parent
6e2b97a15c
commit
95f0791b97
@ -118,7 +118,13 @@ var
|
|||||||
gdb_file: Text;
|
gdb_file: Text;
|
||||||
|
|
||||||
function GDBVersion: string;
|
function GDBVersion: string;
|
||||||
|
function inferior_pid : longint;
|
||||||
|
|
||||||
|
{$ifdef windows}
|
||||||
|
{ We need to do some path conversions if we are using Cygwin GDB }
|
||||||
|
var
|
||||||
|
using_cygwin_gdb : boolean;
|
||||||
|
{$endif windows}
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
uses
|
uses
|
||||||
@ -426,12 +432,22 @@ begin
|
|||||||
AllowQuit := True;
|
AllowQuit := True;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function inferior_pid : longint;
|
||||||
|
begin
|
||||||
|
inferior_pid:=0; {inferior_ptid.pid; }
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
var
|
var
|
||||||
CachedGDBVersion: string;
|
CachedGDBVersion: string;
|
||||||
|
|
||||||
function GDBVersion: string;
|
function GDBVersion: string;
|
||||||
var
|
var
|
||||||
GDB: TGDBWrapper;
|
GDB: TGDBWrapper;
|
||||||
|
{$ifdef windows}
|
||||||
|
i : longint;
|
||||||
|
line :string;
|
||||||
|
{$endif windows}
|
||||||
begin
|
begin
|
||||||
if CachedGDBVersion <> '' then
|
if CachedGDBVersion <> '' then
|
||||||
begin
|
begin
|
||||||
@ -445,6 +461,17 @@ begin
|
|||||||
GDBVersion := GDB.ConsoleStream[0];
|
GDBVersion := GDB.ConsoleStream[0];
|
||||||
if (GDBVersion <> '') and (GDBVersion[Length(GDBVersion)]=#10) then
|
if (GDBVersion <> '') and (GDBVersion[Length(GDBVersion)]=#10) then
|
||||||
Delete(GDBVersion, Length(GDBVersion), 1);
|
Delete(GDBVersion, Length(GDBVersion), 1);
|
||||||
|
{$ifdef windows}
|
||||||
|
i:=0;
|
||||||
|
using_cygwin_gdb:=false;
|
||||||
|
while i < GDB.ConsoleStream.Count do
|
||||||
|
begin
|
||||||
|
line:=GDB.ConsoleStream[i];
|
||||||
|
if pos('This GDB was configured',line) > 0 then
|
||||||
|
using_cygwin_gdb:=pos('cygwin',line) > 0;
|
||||||
|
inc(i);
|
||||||
|
end;
|
||||||
|
{$endif windows}
|
||||||
GDB.Free;
|
GDB.Free;
|
||||||
CachedGDBVersion := GDBVersion;
|
CachedGDBVersion := GDBVersion;
|
||||||
if GDBVersion = '' then
|
if GDBVersion = '' then
|
||||||
|
Loading…
Reference in New Issue
Block a user