mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-06-02 20:18:32 +02:00
* moved the code for setting max width and then restoring it when obtaining a
backtrace from fpdebug.pas to the Backtrace method in the libgdb.a interface. - removed the code for changing the gdb window width from fpdebug.pas entirely, because it makes no sense for the gdb/mi interface and it's better to use MaxWidth/NormWidth in the libgdb.a interface for the libgdb.a functions that need it. git-svn-id: trunk@30299 -
This commit is contained in:
parent
aece198492
commit
011e8fcd07
@ -57,7 +57,6 @@ type
|
||||
NoSwitch : boolean;
|
||||
HasExe : boolean;
|
||||
RunCount : longint;
|
||||
WindowWidth : longint;
|
||||
FPCBreakErrorNumber : longint;
|
||||
{$ifdef SUPPORT_REMOTE}
|
||||
isRemoteDebugging,
|
||||
@ -67,7 +66,6 @@ type
|
||||
{$endif SUPPORT_REMOTE}
|
||||
constructor Init;
|
||||
procedure SetExe(const exefn:string);
|
||||
procedure SetWidth(AWidth : longint);
|
||||
procedure SetSourceDirs;
|
||||
destructor Done;
|
||||
function DoSelectSourceline(const fn:string;line,BreakIndex:longint): Boolean;virtual;
|
||||
@ -665,7 +663,6 @@ begin
|
||||
NoSwitch:=False;
|
||||
HasExe:=false;
|
||||
Debugger:=@self;
|
||||
WindowWidth:=-1;
|
||||
switch_to_user:=true;
|
||||
GetDir(0,OrigPwd);
|
||||
SetCommand('print object off');
|
||||
@ -725,12 +722,6 @@ begin
|
||||
end;
|
||||
|
||||
|
||||
procedure TDebugController.SetWidth(AWidth : longint);
|
||||
begin
|
||||
WindowWidth:=AWidth;
|
||||
SetCommand('width '+inttostr(WindowWidth));
|
||||
end;
|
||||
|
||||
procedure TDebugController.SetSourceDirs;
|
||||
const
|
||||
{$ifdef GDBMI}
|
||||
@ -3501,8 +3492,6 @@ end;
|
||||
DeskTop^.Lock;
|
||||
Clear;
|
||||
|
||||
if Debugger^.WindowWidth<>-1 then
|
||||
Debugger^.SetCommand('width 0xffffffff');
|
||||
Debugger^.Backtrace;
|
||||
{ generate list }
|
||||
{ all is in tframeentry }
|
||||
@ -3543,8 +3532,6 @@ end;
|
||||
end;
|
||||
if Assigned(list) and (List^.Count > 0) then
|
||||
FocusItem(0);
|
||||
if Debugger^.WindowWidth<>-1 then
|
||||
Debugger^.SetCommand('width '+IntToStr(Debugger^.WindowWidth));
|
||||
DeskTop^.Unlock;
|
||||
{$endif NODEBUG}
|
||||
end;
|
||||
|
@ -2495,8 +2495,10 @@ begin
|
||||
Editor^.AddLine('');
|
||||
Insert(Editor);
|
||||
{$ifndef NODEBUG}
|
||||
{$ifndef GDBMI}
|
||||
if assigned(Debugger) then
|
||||
Debugger^.SetWidth(Size.X-1);
|
||||
Debugger^.SetCommand('width ' + IntToStr(Size.X-1));
|
||||
{$endif GDBMI}
|
||||
{$endif NODEBUG}
|
||||
Editor^.silent:=false;
|
||||
Editor^.AutoRepeat:=true;
|
||||
|
@ -637,7 +637,9 @@ begin
|
||||
{ forget all old frames }
|
||||
clear_frames;
|
||||
|
||||
MaxWidth;
|
||||
Command('backtrace');
|
||||
NormWidth;
|
||||
end;
|
||||
|
||||
function TGDBController.SelectFrameCommand(level :longint) : boolean;
|
||||
|
Loading…
Reference in New Issue
Block a user