5
**********************************************************************}
10
CORE_ADDR = cardinal; { might be target dependent PM }
11
streamtype = (afile,astring);
12
C_FILE = longint; { at least under DJGPP }
25
function_name : pchar;
27
line_number : longint;
34
pframeentry=^tframeentry;
35
ppframeentry=^pframeentry;
44
procedure Resize(nsize : longint);
45
procedure Append(p:pchar);
48
PGDBInterface=^TGDBInterface;
51
gdboutputbuf : tgdbbuffer;
56
Debuggee_started : boolean;
57
{ frames and frame info while recording a frame }
58
frames : ppframeentry;
60
frame_count : longint;
62
frame_begin_seen : boolean;
63
stop_breakpoint_number,
79
signal_string : pchar;
80
current_pc : CORE_ADDR;
82
last_breakpoint_number,
83
last_breakpoint_address,
84
last_breakpoint_line : longint;
85
last_breakpoint_file : pchar;
86
invalid_breakpoint_line : boolean;
89
switch_to_user : boolean;
92
procedure clear_frames;
94
function error:boolean;
95
function error_num:longint;
96
function get_current_frame : longint;
97
function set_current_frame(level : longint) : boolean;
98
procedure DebuggerScreen;
101
procedure DoSelectSourceline(const fn:string;line:longint);virtual;
102
procedure DoStartSession;virtual;
103
procedure DoBreakSession;virtual;
104
procedure DoEndSession(code:longint);virtual;
105
procedure DoDebuggerScreen;virtual;
106
procedure DoUserScreen;virtual;
107
function AllowQuit : boolean;virtual;
110
function GDBVersion : string;
113
curr_gdb : pgdbinterface;
116
use_gdb_file : boolean = false;
119
inferior_pid : longint;
127
constructor TGDBInterface.Init;
132
destructor TGDBInterface.Done;
137
function tgdbinterface.error:boolean;
142
function tgdbinterface.error_num:longint;
147
function TGDBInterface.get_current_frame : longint;
149
get_current_frame:=0;
152
function TGDBInterface.set_current_frame(level : longint) : boolean;
154
set_current_frame:=true;
157
procedure TGDBInterface.Clear_Frames;
162
procedure TGDBInterface.DebuggerScreen;
167
procedure TGDBInterface.UserScreen;
172
procedure TGDBInterface.DoSelectSourceline(const fn:string;line:longint);
177
procedure TGDBInterface.DoStartSession;
182
procedure TGDBInterface.DoBreakSession;
187
procedure TGDBInterface.DoEndSession(code:longint);
192
procedure TGDBInterface.DoDebuggerScreen;
197
procedure TGDBInterface.DoUserScreen;
201
function tgdbinterface.AllowQuit : boolean;
206
function GDBVersion : string;
208
GDBVersion:='Fake GDB';
211
{*****************************************************************************
213
*****************************************************************************}
215
constructor tframeentry.init;
220
destructor tframeentry.done;
225
procedure tframeentry.reset;
234
procedure tframeentry.clear;
236
if assigned(file_name) then
237
strdispose(file_name);
238
if assigned(function_name) then
239
strdispose(function_name);
240
if assigned(args) then
246
{*****************************************************************************
248
*****************************************************************************}
253
constructor tgdbbuffer.init;
262
destructor tgdbbuffer.done;
264
if assigned(buf) then
270
procedure tgdbbuffer.reset;
277
procedure tgdbbuffer.append(p:pchar);
281
if not assigned(p) then
286
Move(p^,buf[idx],len);
292
procedure tgdbbuffer.resize(nsize : longint);
296
nsize:=((nsize+blocksize-1) div blocksize)*blocksize;