mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 12:49:09 +02:00
Fix compilation of GDB version 7.12.1
git-svn-id: trunk@42086 -
This commit is contained in:
parent
c0f064a35c
commit
fb2a8e23d0
@ -70,6 +70,9 @@ interface
|
|||||||
{$info using gdb 7.12.x}
|
{$info using gdb 7.12.x}
|
||||||
{$define GDB_VERSION_RECOGNIZED}
|
{$define GDB_VERSION_RECOGNIZED}
|
||||||
{$define GDB_VER_GE_712}
|
{$define GDB_VER_GE_712}
|
||||||
|
{$define GDB_NO_INSTREAM_VAR}
|
||||||
|
{$define GDB_CURRENT_UIOUT_MACRO}
|
||||||
|
{$define GDB_NEW_UI}
|
||||||
{$endif}
|
{$endif}
|
||||||
|
|
||||||
{$ifdef GDB_VER_GE_712}
|
{$ifdef GDB_VER_GE_712}
|
||||||
@ -81,6 +84,7 @@ interface
|
|||||||
{$info using gdb 7.11.x}
|
{$info using gdb 7.11.x}
|
||||||
{$define GDB_VERSION_RECOGNIZED}
|
{$define GDB_VERSION_RECOGNIZED}
|
||||||
{$define GDB_VER_GE_711}
|
{$define GDB_VER_GE_711}
|
||||||
|
{$define GDB_HAS_SAVED_COMMAND_LINE_SIZE}
|
||||||
{$endif}
|
{$endif}
|
||||||
|
|
||||||
{$ifdef GDB_VER_GE_711}
|
{$ifdef GDB_VER_GE_711}
|
||||||
@ -1009,6 +1013,32 @@ function inferior_pid : longint;
|
|||||||
{$ifdef GDB_V6}
|
{$ifdef GDB_V6}
|
||||||
type
|
type
|
||||||
ui_out = pointer;
|
ui_out = pointer;
|
||||||
|
{$ifdef GDB_CURRENT_UIOUT_MACRO}
|
||||||
|
type
|
||||||
|
pui_out = ^ui_out;
|
||||||
|
function current_ui_current_uiout_ptr : ui_out;cdecl;external;
|
||||||
|
var
|
||||||
|
cli_uiout : ui_out;
|
||||||
|
current_uiout : ui_out;
|
||||||
|
{ out local copy for catch_exceptions call }
|
||||||
|
our_uiout : ui_out;
|
||||||
|
|
||||||
|
type
|
||||||
|
pui = ^ui;
|
||||||
|
ui = record
|
||||||
|
{ ui record }
|
||||||
|
next : pui;
|
||||||
|
num : longint;
|
||||||
|
end;
|
||||||
|
|
||||||
|
{$ifdef GDB_NEW_UI}
|
||||||
|
var
|
||||||
|
local_ui : pui;
|
||||||
|
|
||||||
|
function new_ui (instream, outstream,errstream: pui_file) : pui; cdecl;external;
|
||||||
|
{$endif GDB_NEW_UI}
|
||||||
|
|
||||||
|
{$else not GDB_CURRENT_UIOUT_MACRO}
|
||||||
{$ifndef GDB_NO_UIOUT}
|
{$ifndef GDB_NO_UIOUT}
|
||||||
var
|
var
|
||||||
uiout : ui_out;cvar;external;
|
uiout : ui_out;cvar;external;
|
||||||
@ -1019,6 +1049,7 @@ var
|
|||||||
{ out local copy for catch_exceptions call }
|
{ out local copy for catch_exceptions call }
|
||||||
our_uiout : ui_out;
|
our_uiout : ui_out;
|
||||||
{$endif GDB_NO_UIOUT}
|
{$endif GDB_NO_UIOUT}
|
||||||
|
{$endif not GDB_CURRENT_UIOUT_MACRO}
|
||||||
function cli_out_new (stream : pui_file):ui_out;cdecl;external;
|
function cli_out_new (stream : pui_file):ui_out;cdecl;external;
|
||||||
{$endif GDB_V6}
|
{$endif GDB_V6}
|
||||||
|
|
||||||
@ -1838,16 +1869,23 @@ var
|
|||||||
{$endif GDB_HAS_DB_COMMANDS}
|
{$endif GDB_HAS_DB_COMMANDS}
|
||||||
|
|
||||||
{$ifdef GDB_NEEDS_SET_INSTREAM}
|
{$ifdef GDB_NEEDS_SET_INSTREAM}
|
||||||
|
{$ifndef GDB_NO_INSTREAM_VAR}
|
||||||
var
|
var
|
||||||
instream : P_C_FILE;cvar;external;
|
instream : P_C_FILE;cvar;external;
|
||||||
|
{$endif not GDB_NO_INSTREAM_VAR}
|
||||||
|
|
||||||
function gdb_fopen (filename : pchar; mode : pchar) : pui_file;cdecl;external;
|
function gdb_fopen (filename : pchar; mode : pchar) : pui_file;cdecl;external;
|
||||||
{$ifdef LIBGDB_HAS_GET_STDIN}
|
{$ifdef LIBGDB_HAS_GET_STDIN}
|
||||||
{ this function is generated by the gen-libgdb-inc.sh script
|
{ this function is generated by the gen-libgdb-inc.sh script
|
||||||
in a object called gdb_get_stdin.o added to the libgdb.a archive }
|
in a object called gdb_get_stdin.o added to the libgdb.a archive }
|
||||||
function gdb_get_stdin : P_C_FILE; cdecl; external;
|
function gdb_get_stdin : P_C_FILE; cdecl; external;
|
||||||
|
{$ifdef GDB_HAS_SAVED_COMMAND_LINE_SIZE}
|
||||||
|
{ In some GDB versions, saved_command_line needs to
|
||||||
|
be explicitly allocated at startup }
|
||||||
var
|
var
|
||||||
saved_command_line : pchar;cvar;external; { defined in top.c source }
|
saved_command_line : pchar;cvar;external; { defined in top.c source }
|
||||||
saved_command_line_size : longint;cvar;external; {defined in top.c source }
|
saved_command_line_size : longint;cvar;external; {defined in top.c source }
|
||||||
|
{$endif def GDB_HAS_SAVED_COMMAND_LINE_SIZE}
|
||||||
{$endif}
|
{$endif}
|
||||||
{$endif GDB_NEEDS_SET_INSTREAM}
|
{$endif GDB_NEEDS_SET_INSTREAM}
|
||||||
var
|
var
|
||||||
@ -3514,8 +3552,12 @@ begin
|
|||||||
gdb_stdin:=mem_fileopen;
|
gdb_stdin:=mem_fileopen;
|
||||||
save_gdb_stdin:=gdb_stdin;
|
save_gdb_stdin:=gdb_stdin;
|
||||||
{$ifdef LIBGDB_HAS_GET_STDIN}
|
{$ifdef LIBGDB_HAS_GET_STDIN}
|
||||||
|
{$ifndef GDB_NO_INSTREAM_VAR}
|
||||||
instream:=gdb_get_stdin;
|
instream:=gdb_get_stdin;
|
||||||
|
{$endif ndef GDB_NO_INSTREAM_VAR}
|
||||||
|
{$ifdef GDB_HAS_SAVED_COMMAND_LINE_SIZE}
|
||||||
saved_command_line:=xmalloc(saved_command_line_size);
|
saved_command_line:=xmalloc(saved_command_line_size);
|
||||||
|
{$endif def GDB_HAS_SAVED_COMMAND_LINE_SIZE}
|
||||||
{$else}
|
{$else}
|
||||||
dummy_file :=gdb_fopen('dummy.$$$','a');
|
dummy_file :=gdb_fopen('dummy.$$$','a');
|
||||||
{in captured_main code, this is simply
|
{in captured_main code, this is simply
|
||||||
@ -3558,6 +3600,9 @@ begin
|
|||||||
uiout := cli_out_new (gdb_stdout);
|
uiout := cli_out_new (gdb_stdout);
|
||||||
{$endif not GDB_NO_UIOUT}
|
{$endif not GDB_NO_UIOUT}
|
||||||
{$endif GDB_V6}
|
{$endif GDB_V6}
|
||||||
|
{$ifdef GDB_NEW_UI}
|
||||||
|
local_ui := new_ui (gdb_stdin,gdb_stdout,gdb_stderr);
|
||||||
|
{$endif not GDB_NEW_UI}
|
||||||
{$ifdef GDB_INIT_HAS_ARGV0}
|
{$ifdef GDB_INIT_HAS_ARGV0}
|
||||||
getmem(argv0,length(paramstr(0))+1);
|
getmem(argv0,length(paramstr(0))+1);
|
||||||
strpcopy(argv0,paramstr(0));
|
strpcopy(argv0,paramstr(0));
|
||||||
@ -3591,6 +3636,9 @@ begin
|
|||||||
current_uiout:=cli_uiout;
|
current_uiout:=cli_uiout;
|
||||||
our_uiout:=cli_uiout;
|
our_uiout:=cli_uiout;
|
||||||
{$endif GDB_NO_UIOUT}
|
{$endif GDB_NO_UIOUT}
|
||||||
|
{$ifdef GDB_NEW_UI}
|
||||||
|
local_ui := new_ui (gdb_stdin,gdb_stdout,gdb_stderr);
|
||||||
|
{$endif not GDB_NEW_UI}
|
||||||
{$endif GDB_NEEDS_INTERPRETER_SETUP}
|
{$endif GDB_NEEDS_INTERPRETER_SETUP}
|
||||||
{$ifdef supportexceptions}
|
{$ifdef supportexceptions}
|
||||||
{$ifdef unix}
|
{$ifdef unix}
|
||||||
|
Loading…
Reference in New Issue
Block a user