|
@@ -45,6 +45,7 @@ type
|
|
procedure DoDebuggerScreen;virtual;
|
|
procedure DoDebuggerScreen;virtual;
|
|
procedure DoUserScreen;virtual;
|
|
procedure DoUserScreen;virtual;
|
|
procedure Reset;virtual;
|
|
procedure Reset;virtual;
|
|
|
|
+ procedure ResetDebuggerRows;
|
|
procedure Run;virtual;
|
|
procedure Run;virtual;
|
|
procedure Continue;virtual;
|
|
procedure Continue;virtual;
|
|
procedure UntilReturn;virtual;
|
|
procedure UntilReturn;virtual;
|
|
@@ -442,7 +443,7 @@ begin
|
|
UserScreen;
|
|
UserScreen;
|
|
inherited Run;
|
|
inherited Run;
|
|
DebuggerScreen;
|
|
DebuggerScreen;
|
|
- MyApp.SetCmdState([cmResetDebugger,cmUntilReturn],true);
|
|
|
|
|
|
+ IDEApp.SetCmdState([cmResetDebugger,cmUntilReturn],true);
|
|
If assigned(StackWindow) then
|
|
If assigned(StackWindow) then
|
|
StackWindow^.Update;
|
|
StackWindow^.Update;
|
|
end;
|
|
end;
|
|
@@ -500,30 +501,30 @@ function TDebugController.AllowQuit : boolean;
|
|
begin
|
|
begin
|
|
if ConfirmBox('Really quit editor ?',nil,true)=cmOK then
|
|
if ConfirmBox('Really quit editor ?',nil,true)=cmOK then
|
|
begin
|
|
begin
|
|
- Message(@MyApp,evCommand,cmQuit,nil);
|
|
|
|
|
|
+ Message(@IDEApp,evCommand,cmQuit,nil);
|
|
end
|
|
end
|
|
else
|
|
else
|
|
AllowQuit:=false;
|
|
AllowQuit:=false;
|
|
end;
|
|
end;
|
|
|
|
|
|
-procedure TDebugController.Reset;
|
|
|
|
-var
|
|
|
|
- W : PSourceWindow;
|
|
|
|
- procedure ResetDebugerRow(P: PView); {$ifndef FPC}far;{$endif}
|
|
|
|
|
|
+procedure TDebugController.ResetDebuggerRows;
|
|
|
|
+ procedure ResetDebuggerRow(P: PView); {$ifndef FPC}far;{$endif}
|
|
begin
|
|
begin
|
|
if assigned(P) and
|
|
if assigned(P) and
|
|
(TypeOf(P^)=TypeOf(TSourceWindow)) then
|
|
(TypeOf(P^)=TypeOf(TSourceWindow)) then
|
|
- Message(P,evCommand,cmResetDebuggerRow,nil);
|
|
|
|
|
|
+ PSourceWindow(P)^.Editor^.SetDebuggerRow(-1);
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
+begin
|
|
|
|
+ Desktop^.ForEach(@ResetDebuggerRow);
|
|
|
|
+end;
|
|
|
|
+
|
|
|
|
+procedure TDebugController.Reset;
|
|
begin
|
|
begin
|
|
inherited Reset;
|
|
inherited Reset;
|
|
NoSwitch:=false;
|
|
NoSwitch:=false;
|
|
- MyApp.SetCmdState([cmResetDebugger,cmUntilReturn],false);
|
|
|
|
- W:=PSourceWindow(LastSource);
|
|
|
|
- if assigned(W) then
|
|
|
|
- W^.Editor^.SetDebuggerRow(-1);
|
|
|
|
- Desktop^.ForEach(@ResetDebugerRow);
|
|
|
|
|
|
+ IDEApp.SetCmdState([cmResetDebugger,cmUntilReturn],false);
|
|
|
|
+ ResetDebuggerRows;
|
|
end;
|
|
end;
|
|
|
|
|
|
procedure TDebugController.AnnotateError;
|
|
procedure TDebugController.AnnotateError;
|
|
@@ -591,7 +592,7 @@ begin
|
|
else
|
|
else
|
|
begin
|
|
begin
|
|
Desktop^.UnLock;
|
|
Desktop^.UnLock;
|
|
- Found:=MyApp.OpenSearch(fn);
|
|
|
|
|
|
+ Found:=IDEApp.OpenSearch(fn);
|
|
Desktop^.Lock;
|
|
Desktop^.Lock;
|
|
if not Found then
|
|
if not Found then
|
|
begin
|
|
begin
|
|
@@ -654,10 +655,8 @@ procedure TDebugController.DoEndSession(code:longint);
|
|
var P :Array[1..2] of longint;
|
|
var P :Array[1..2] of longint;
|
|
W : PSourceWindow;
|
|
W : PSourceWindow;
|
|
begin
|
|
begin
|
|
- MyApp.SetCmdState([cmResetDebugger],false);
|
|
|
|
- W:=PSourceWindow(LastSource);
|
|
|
|
- if assigned(W) then
|
|
|
|
- W^.Editor^.SetDebuggerRow(-1);
|
|
|
|
|
|
+ IDEApp.SetCmdState([cmResetDebugger],false);
|
|
|
|
+ ResetDebuggerRows;
|
|
LastExitCode:=Code;
|
|
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)
|
|
@@ -677,7 +676,7 @@ begin
|
|
if NoSwitch then
|
|
if NoSwitch then
|
|
PopStatus
|
|
PopStatus
|
|
else
|
|
else
|
|
- MyApp.ShowIDEScreen;
|
|
|
|
|
|
+ IDEApp.ShowIDEScreen;
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
|
|
@@ -686,7 +685,7 @@ begin
|
|
if NoSwitch then
|
|
if NoSwitch then
|
|
PushStatus('Executable running in another window..')
|
|
PushStatus('Executable running in another window..')
|
|
else
|
|
else
|
|
- MyApp.ShowUserScreen;
|
|
|
|
|
|
+ IDEApp.ShowUserScreen;
|
|
end;
|
|
end;
|
|
|
|
|
|
{****************************************************************************
|
|
{****************************************************************************
|
|
@@ -824,7 +823,8 @@ begin
|
|
GDBIndex:=Debugger^.last_breakpoint_number;
|
|
GDBIndex:=Debugger^.last_breakpoint_number;
|
|
GDBState:=bs_enabled;
|
|
GDBState:=bs_enabled;
|
|
Debugger^.Command('cond '+IntToStr(GDBIndex)+' '+GetStr(Conditions));
|
|
Debugger^.Command('cond '+IntToStr(GDBIndex)+' '+GetStr(Conditions));
|
|
- Debugger^.Command('ignore '+IntToStr(GDBIndex)+' '+IntToStr(IgnoreCount));
|
|
|
|
|
|
+ If IgnoreCount>0 then
|
|
|
|
+ Debugger^.Command('ignore '+IntToStr(GDBIndex)+' '+IntToStr(IgnoreCount));
|
|
If Assigned(Commands) then
|
|
If Assigned(Commands) then
|
|
begin
|
|
begin
|
|
{Commands are not handled yet }
|
|
{Commands are not handled yet }
|
|
@@ -835,7 +835,7 @@ begin
|
|
begin
|
|
begin
|
|
GDBIndex:=0;
|
|
GDBIndex:=0;
|
|
ErrorBox(#3'Could not set Breakpoint'#13+
|
|
ErrorBox(#3'Could not set Breakpoint'#13+
|
|
- #3+BreakpointTypeStr[typ]+' '+Name^,nil);
|
|
|
|
|
|
+ #3+BreakpointTypeStr[typ]+' '+GetStr(Name),nil);
|
|
state:=bs_disabled;
|
|
state:=bs_disabled;
|
|
end;
|
|
end;
|
|
end
|
|
end
|
|
@@ -947,7 +947,7 @@ function TBreakpointCollection.GetType(typ : BreakpointType;Const s : String) :
|
|
|
|
|
|
function IsThis(P : PBreakpoint) : boolean;{$ifndef FPC}far;{$endif}
|
|
function IsThis(P : PBreakpoint) : boolean;{$ifndef FPC}far;{$endif}
|
|
begin
|
|
begin
|
|
- IsThis:=(P^.typ=typ) and (P^.Name^=S);
|
|
|
|
|
|
+ IsThis:=(P^.typ=typ) and (GetStr(P^.Name)=S);
|
|
end;
|
|
end;
|
|
|
|
|
|
begin
|
|
begin
|
|
@@ -2168,6 +2168,8 @@ end;
|
|
procedure TFramesListBox.Update;
|
|
procedure TFramesListBox.Update;
|
|
|
|
|
|
var i : longint;
|
|
var i : longint;
|
|
|
|
+ W : PSourceWindow;
|
|
|
|
+
|
|
begin
|
|
begin
|
|
{ call backtrace command }
|
|
{ call backtrace command }
|
|
If not assigned(Debugger) then
|
|
If not assigned(Debugger) then
|
|
@@ -2180,12 +2182,17 @@ end;
|
|
Debugger^.Command('backtrace');
|
|
Debugger^.Command('backtrace');
|
|
{ generate list }
|
|
{ generate list }
|
|
{ all is in tframeentry }
|
|
{ all is in tframeentry }
|
|
- for i:=0 to Debugger^.frame_count-1 do
|
|
|
|
|
|
+ for i:=Debugger^.frame_count-1 downto 0 do
|
|
begin
|
|
begin
|
|
with Debugger^.frames[i]^ do
|
|
with Debugger^.frames[i]^ do
|
|
begin
|
|
begin
|
|
AddItem(new(PMessageItem,init(0,GetPChar(function_name)+GetPChar(args),
|
|
AddItem(new(PMessageItem,init(0,GetPChar(function_name)+GetPChar(args),
|
|
AddModuleName(GetPChar(file_name)),line_number,1)));
|
|
AddModuleName(GetPChar(file_name)),line_number,1)));
|
|
|
|
+ W:=SearchOnDesktop(GetPChar(file_name),false);
|
|
|
|
+ If assigned(W) then
|
|
|
|
+ begin
|
|
|
|
+ W^.editor^.SetDebuggerRow(line_number);
|
|
|
|
+ end;
|
|
end;
|
|
end;
|
|
end;
|
|
end;
|
|
if List^.Count > 0 then
|
|
if List^.Count > 0 then
|
|
@@ -2401,7 +2408,12 @@ end.
|
|
|
|
|
|
{
|
|
{
|
|
$Log$
|
|
$Log$
|
|
- Revision 1.35 1999-11-24 14:03:16 pierre
|
|
|
|
|
|
+ Revision 1.36 1999-12-20 14:23:16 pierre
|
|
|
|
+ * MyApp renamed IDEApp
|
|
|
|
+ * TDebugController.ResetDebuggerRows added to
|
|
|
|
+ get resetting of debugger rows
|
|
|
|
+
|
|
|
|
+ Revision 1.35 1999/11/24 14:03:16 pierre
|
|
+ Executing... in status line if in another window
|
|
+ Executing... in status line if in another window
|
|
|
|
|
|
Revision 1.34 1999/11/10 17:19:58 pierre
|
|
Revision 1.34 1999/11/10 17:19:58 pierre
|