mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-07-24 14:36:30 +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;
|
NoSwitch : boolean;
|
||||||
HasExe : boolean;
|
HasExe : boolean;
|
||||||
RunCount : longint;
|
RunCount : longint;
|
||||||
WindowWidth : longint;
|
|
||||||
FPCBreakErrorNumber : longint;
|
FPCBreakErrorNumber : longint;
|
||||||
{$ifdef SUPPORT_REMOTE}
|
{$ifdef SUPPORT_REMOTE}
|
||||||
isRemoteDebugging,
|
isRemoteDebugging,
|
||||||
@ -67,7 +66,6 @@ type
|
|||||||
{$endif SUPPORT_REMOTE}
|
{$endif SUPPORT_REMOTE}
|
||||||
constructor Init;
|
constructor Init;
|
||||||
procedure SetExe(const exefn:string);
|
procedure SetExe(const exefn:string);
|
||||||
procedure SetWidth(AWidth : longint);
|
|
||||||
procedure SetSourceDirs;
|
procedure SetSourceDirs;
|
||||||
destructor Done;
|
destructor Done;
|
||||||
function DoSelectSourceline(const fn:string;line,BreakIndex:longint): Boolean;virtual;
|
function DoSelectSourceline(const fn:string;line,BreakIndex:longint): Boolean;virtual;
|
||||||
@ -665,7 +663,6 @@ begin
|
|||||||
NoSwitch:=False;
|
NoSwitch:=False;
|
||||||
HasExe:=false;
|
HasExe:=false;
|
||||||
Debugger:=@self;
|
Debugger:=@self;
|
||||||
WindowWidth:=-1;
|
|
||||||
switch_to_user:=true;
|
switch_to_user:=true;
|
||||||
GetDir(0,OrigPwd);
|
GetDir(0,OrigPwd);
|
||||||
SetCommand('print object off');
|
SetCommand('print object off');
|
||||||
@ -725,12 +722,6 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TDebugController.SetWidth(AWidth : longint);
|
|
||||||
begin
|
|
||||||
WindowWidth:=AWidth;
|
|
||||||
SetCommand('width '+inttostr(WindowWidth));
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TDebugController.SetSourceDirs;
|
procedure TDebugController.SetSourceDirs;
|
||||||
const
|
const
|
||||||
{$ifdef GDBMI}
|
{$ifdef GDBMI}
|
||||||
@ -3501,8 +3492,6 @@ end;
|
|||||||
DeskTop^.Lock;
|
DeskTop^.Lock;
|
||||||
Clear;
|
Clear;
|
||||||
|
|
||||||
if Debugger^.WindowWidth<>-1 then
|
|
||||||
Debugger^.SetCommand('width 0xffffffff');
|
|
||||||
Debugger^.Backtrace;
|
Debugger^.Backtrace;
|
||||||
{ generate list }
|
{ generate list }
|
||||||
{ all is in tframeentry }
|
{ all is in tframeentry }
|
||||||
@ -3543,8 +3532,6 @@ end;
|
|||||||
end;
|
end;
|
||||||
if Assigned(list) and (List^.Count > 0) then
|
if Assigned(list) and (List^.Count > 0) then
|
||||||
FocusItem(0);
|
FocusItem(0);
|
||||||
if Debugger^.WindowWidth<>-1 then
|
|
||||||
Debugger^.SetCommand('width '+IntToStr(Debugger^.WindowWidth));
|
|
||||||
DeskTop^.Unlock;
|
DeskTop^.Unlock;
|
||||||
{$endif NODEBUG}
|
{$endif NODEBUG}
|
||||||
end;
|
end;
|
||||||
|
@ -2495,8 +2495,10 @@ begin
|
|||||||
Editor^.AddLine('');
|
Editor^.AddLine('');
|
||||||
Insert(Editor);
|
Insert(Editor);
|
||||||
{$ifndef NODEBUG}
|
{$ifndef NODEBUG}
|
||||||
|
{$ifndef GDBMI}
|
||||||
if assigned(Debugger) then
|
if assigned(Debugger) then
|
||||||
Debugger^.SetWidth(Size.X-1);
|
Debugger^.SetCommand('width ' + IntToStr(Size.X-1));
|
||||||
|
{$endif GDBMI}
|
||||||
{$endif NODEBUG}
|
{$endif NODEBUG}
|
||||||
Editor^.silent:=false;
|
Editor^.silent:=false;
|
||||||
Editor^.AutoRepeat:=true;
|
Editor^.AutoRepeat:=true;
|
||||||
|
@ -637,7 +637,9 @@ begin
|
|||||||
{ forget all old frames }
|
{ forget all old frames }
|
||||||
clear_frames;
|
clear_frames;
|
||||||
|
|
||||||
|
MaxWidth;
|
||||||
Command('backtrace');
|
Command('backtrace');
|
||||||
|
NormWidth;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TGDBController.SelectFrameCommand(level :longint) : boolean;
|
function TGDBController.SelectFrameCommand(level :longint) : boolean;
|
||||||
|
Loading…
Reference in New Issue
Block a user