mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-06 13:50:20 +02:00
+ Other window for Debuggee code
This commit is contained in:
parent
5dbf5496c3
commit
d88564f73b
@ -29,6 +29,8 @@ type
|
|||||||
LastFileName : string;
|
LastFileName : string;
|
||||||
LastSource : PView; {PsourceWindow !! }
|
LastSource : PView; {PsourceWindow !! }
|
||||||
HiddenStepsCount : longint;
|
HiddenStepsCount : longint;
|
||||||
|
{ no need to switch if using another terminal }
|
||||||
|
NoSwitch : boolean;
|
||||||
constructor Init(const exefn:string);
|
constructor Init(const exefn:string);
|
||||||
destructor Done;
|
destructor Done;
|
||||||
procedure DoSelectSourceline(const fn:string;line:longint);virtual;
|
procedure DoSelectSourceline(const fn:string;line:longint);virtual;
|
||||||
@ -254,6 +256,7 @@ const
|
|||||||
BreakpointStateStr : Array[BreakpointState] of String[8]
|
BreakpointStateStr : Array[BreakpointState] of String[8]
|
||||||
= ( 'enabled','disabled','invalid' );
|
= ( 'enabled','disabled','invalid' );
|
||||||
|
|
||||||
|
DebuggeeTTY : string = '';
|
||||||
var
|
var
|
||||||
Debugger : PDebugController;
|
Debugger : PDebugController;
|
||||||
BreakpointsCollection : PBreakpointCollection;
|
BreakpointsCollection : PBreakpointCollection;
|
||||||
@ -359,6 +362,7 @@ constructor TDebugController.Init(const exefn:string);
|
|||||||
begin
|
begin
|
||||||
inherited Init;
|
inherited Init;
|
||||||
f := exefn;
|
f := exefn;
|
||||||
|
NoSwitch:=False;
|
||||||
LoadFile(f);
|
LoadFile(f);
|
||||||
SetArgs(GetRunParameters);
|
SetArgs(GetRunParameters);
|
||||||
Debugger:=@self;
|
Debugger:=@self;
|
||||||
@ -421,7 +425,23 @@ end;
|
|||||||
procedure TDebugController.Run;
|
procedure TDebugController.Run;
|
||||||
begin
|
begin
|
||||||
ResetBreakpointsValues;
|
ResetBreakpointsValues;
|
||||||
|
{$ifdef win32}
|
||||||
|
{ Run the debugge in another console }
|
||||||
|
if DebuggeeTTY<>'' then
|
||||||
|
Command('set new-console on')
|
||||||
|
else
|
||||||
|
Command('set new-console off');
|
||||||
|
NoSwitch:=DebuggeeTTY<>'';
|
||||||
|
{$endif win32}
|
||||||
|
{$ifdef linux}
|
||||||
|
{ Run the debugge in another tty }
|
||||||
|
Command('set tty '+DebuggeeTTY);
|
||||||
|
NoSwitch:=DebuggeeTTY<>'';
|
||||||
|
{$endif win32}
|
||||||
|
{ Switch to user screen to get correct handles }
|
||||||
|
UserScreen;
|
||||||
inherited Run;
|
inherited Run;
|
||||||
|
DebuggerScreen;
|
||||||
MyApp.SetCmdState([cmResetDebugger,cmUntilReturn],true);
|
MyApp.SetCmdState([cmResetDebugger,cmUntilReturn],true);
|
||||||
If assigned(StackWindow) then
|
If assigned(StackWindow) then
|
||||||
StackWindow^.Update;
|
StackWindow^.Update;
|
||||||
@ -498,6 +518,7 @@ var
|
|||||||
|
|
||||||
begin
|
begin
|
||||||
inherited Reset;
|
inherited Reset;
|
||||||
|
NoSwitch:=false;
|
||||||
MyApp.SetCmdState([cmResetDebugger,cmUntilReturn],false);
|
MyApp.SetCmdState([cmResetDebugger,cmUntilReturn],false);
|
||||||
W:=PSourceWindow(LastSource);
|
W:=PSourceWindow(LastSource);
|
||||||
if assigned(W) then
|
if assigned(W) then
|
||||||
@ -637,6 +658,7 @@ begin
|
|||||||
W:=PSourceWindow(LastSource);
|
W:=PSourceWindow(LastSource);
|
||||||
if assigned(W) then
|
if assigned(W) then
|
||||||
W^.Editor^.SetDebuggerRow(-1);
|
W^.Editor^.SetDebuggerRow(-1);
|
||||||
|
LastExitCode:=Code;
|
||||||
If HiddenStepsCount=0 then
|
If HiddenStepsCount=0 then
|
||||||
InformationBox(#3'Program exited with '#13#3'exitcode = %d',@code)
|
InformationBox(#3'Program exited with '#13#3'exitcode = %d',@code)
|
||||||
else
|
else
|
||||||
@ -652,12 +674,14 @@ end;
|
|||||||
|
|
||||||
procedure TDebugController.DoDebuggerScreen;
|
procedure TDebugController.DoDebuggerScreen;
|
||||||
begin
|
begin
|
||||||
|
if NoSwitch then exit;
|
||||||
MyApp.ShowIDEScreen;
|
MyApp.ShowIDEScreen;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TDebugController.DoUserScreen;
|
procedure TDebugController.DoUserScreen;
|
||||||
begin
|
begin
|
||||||
|
if NoSwitch then exit;
|
||||||
MyApp.ShowUserScreen;
|
MyApp.ShowUserScreen;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -2373,7 +2397,10 @@ end.
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.33 1999-10-25 16:39:03 pierre
|
Revision 1.34 1999-11-10 17:19:58 pierre
|
||||||
|
+ Other window for Debuggee code
|
||||||
|
|
||||||
|
Revision 1.33 1999/10/25 16:39:03 pierre
|
||||||
+ GetPChar to avoid nil pointer problems
|
+ GetPChar to avoid nil pointer problems
|
||||||
|
|
||||||
Revision 1.32 1999/09/16 14:34:57 pierre
|
Revision 1.32 1999/09/16 14:34:57 pierre
|
||||||
|
Loading…
Reference in New Issue
Block a user