* Dotted filenames for package gdbint

This commit is contained in:
Michaël Van Canneyt 2023-03-06 14:58:05 +01:00
parent e55c2b0fb7
commit ca8b0f0948
8 changed files with 65 additions and 6 deletions

View File

@ -18,12 +18,15 @@ var
GdbLibFound: boolean;
GdbintTarget, GdbVerTarget: TTarget;
Opts : TStrings;
Prefix : String;
begin
P := Sender as TPackage;
// Search for a libgdb file.
Prefix:='';
if Defaults.Namespaces then
Prefix:='Api.';
// Search for a libgdb file.
GdbLibFound:=false;
// First try the environment setting GDBLIBDIR
GdbLibDir := GetEnvironmentVariable('GDBLIBDIR');
if (GdbLibDir<>'') then
@ -62,7 +65,7 @@ begin
end;
GdbVerTarget:=TTarget(p.Targets.ItemByName('gdbver'));
GdbintTarget:=TTarget(p.Targets.ItemByName('gdbint'));
GdbintTarget:=TTarget(p.Targets.ItemByName(Prefix+'gdbint'));
if GdbLibFound then
Installer.BuildEngine.Log(vlCommand,'File libgdb.a found ('+GdbLibFile+')')

View File

@ -0,0 +1,3 @@
unit Api.Freadlin;
{$DEFINE FPC_DOTTEDUNITS}
{$i freadlin.pp}

View File

@ -0,0 +1,3 @@
unit Api.Gdbcon;
{$DEFINE FPC_DOTTEDUNITS}
{$i gdbcon.pp}

View File

@ -0,0 +1,3 @@
unit Api.Gdbint;
{$DEFINE FPC_DOTTEDUNITS}
{$i gdbint.pp}

View File

@ -0,0 +1,5 @@
src/freadlin.pp=namespaced/Api.Freadlin.pp
{s*:src/}=namespaced/
{i+:src/}
src/gdbint.pp=namespaced/Api.Gdbint.pp
src/gdbcon.pp=namespaced/Api.Gdbcon.pp

View File

@ -1,4 +1,6 @@
{$IFNDEF FPC_DOTTEDUNITS}
unit freadlin;
{$ENDIF FPC_DOTTEDUNITS}
{**********************************************************************
Copyright (c) 2007 by Daniel Mantione
@ -20,7 +22,11 @@ interface
implementation
{$IFDEF FPC_DOTTEDUNITS}
uses System.CTypes;
{$ELSE FPC_DOTTEDUNITS}
uses ctypes;
{$ENDIF FPC_DOTTEDUNITS}
var rl_end:cint;public name 'rl_end'; {The number of characters in the readline buffer.}
rl_point:cint;public name 'rl_point'; {The cursor position in the readline buffer.}
@ -236,4 +242,4 @@ begin
rl_completion_display_matches_hook:=nil;
rl_ignore_completion_duplicates:=0;
rl_print_completions_horizontally:=0;
end.
end.

View File

@ -11,7 +11,9 @@
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
**********************************************************************}
{$IFNDEF FPC_DOTTEDUNITS}
unit GDBCon;
{$ENDIF FPC_DOTTEDUNITS}
{$ifdef USE_GDBLIBINC}
{$i gdblib.inc}
@ -21,8 +23,13 @@ unit GDBCon;
interface
{$IFDEF FPC_DOTTEDUNITS}
uses
Api.Gdbint;
{$ELSE FPC_DOTTEDUNITS}
uses
GDBInt;
{$ENDIF FPC_DOTTEDUNITS}
type
TBreakpointFlags = set of (bfTemporary, bfHardware);
@ -100,12 +107,21 @@ procedure UnixDir(var s : ShortString);
implementation
{$IFDEF FPC_DOTTEDUNITS}
uses
{$ifdef win32}
WinApi.Windows,
{$endif win32}
TP.DOS,
System.Strings;
{$ELSE FPC_DOTTEDUNITS}
uses
{$ifdef win32}
windows,
{$endif win32}
dos,
strings;
{$ENDIF FPC_DOTTEDUNITS}
{$ifdef win32}
const

View File

@ -11,13 +11,14 @@
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
**********************************************************************}
{$IFNDEF FPC_DOTTEDUNITS}
unit GdbInt;
{$ENDIF FPC_DOTTEDUNITS}
{$mode objfpc}
{$smartlink off}
{$define NotImplemented}
{$define COMPILING_GDBINT_UNIT}
{$ifdef USE_GDBLIBINC}
{$i gdblib.inc}
@ -1068,6 +1069,24 @@ function cli_out_new (stream : pui_file):ui_out;cdecl;external;
implementation
{$IFDEF FPC_DOTTEDUNITS}
uses
{$ifdef win32}
{$ifdef USE_MINGW_GDB}
{$else not USE_MINGW_GDB}
initc,
{$endif not USE_MINGW_GDB}
{$endif win32}
{$ifdef unix}
UnixApi.Base,
{$endif}
{$ifdef go32v2}
DOSApi.GO32,
DOSApi.dpmiexcp,
System.InitC,
{$endif}
System.Strings;
{$ELSE FPC_DOTTEDUNITS}
uses
{$ifdef win32}
{$ifdef USE_MINGW_GDB}
@ -1084,6 +1103,7 @@ uses
initc,
{$endif}
strings;
{$ENDIF FPC_DOTTEDUNITS}
{*****************************************************************************
Types used by libgdb.a