fpc/ide/text/fpmdebug.inc
2000-02-04 00:13:59 +00:00

189 lines
4.3 KiB
PHP

{
$Id$
This file is part of the Free Pascal Integrated Development Environment
Copyright (c) 1998 by Berczi Gabor
Debug menu entries
See the file COPYING.FPC, included in this distribution,
for details about the copyright.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
**********************************************************************}
procedure TIDEApp.DoUserScreenWindow;
begin
if UserScreenWindow=nil then
begin
New(UserScreenWindow, Init(UserScreen, SearchFreeWindowNo));
Desktop^.Insert(UserScreenWindow);
end;
UserScreenWindow^.MakeFirst;
end;
procedure TIDEApp.DoCloseUserScreenWindow;
begin
if Assigned(UserScreenWindow) then
Message(UserScreenWindow,evCommand,cmClose,nil);
end;
procedure TIDEApp.DoUserScreen;
begin
if UserScreen=nil then
begin
ErrorBox('Sorry, user screen not available.',nil);
Exit;
end;
ShowUserScreen;
Keyboard.GetKeyEvent;
while (Keyboard.PollKeyEvent<>0) do
Keyboard.GetKeyEvent;
ShowIDEScreen;
end;
procedure TIDEApp.DoShowCallStack;
begin
{$ifdef NODEBUG}
NoDebugger;
{$else}
If not assigned(StackWindow) then
InitStackWindow
else
StackWindow^.MakeFirst;
{$endif NODEBUG}
end;
procedure TIDEApp.DoShowRegisters;
begin
{$ifdef NODEBUG}
NoDebugger;
{$else}
If not assigned(RegistersWindow) then
InitRegistersWindow
else
RegistersWindow^.MakeFirst;
{$endif NODEBUG}
end;
procedure TIDEApp.DoShowBreakpointList;
begin
{$ifdef NODEBUG}
NoDebugger;
{$else}
If assigned(BreakpointsWindow) then
begin
BreakpointsWindow^.Update;
BreakpointsWindow^.Show;
BreakpointsWindow^.MakeFirst;
end
else
begin
New(BreakpointsWindow,Init);
Desktop^.Insert(BreakpointsWindow);
end;
{$endif NODEBUG}
end;
procedure TIDEApp.DoShowWatches;
begin
{$ifdef NODEBUG}
NoDebugger;
{$else}
If assigned(WatchesWindow) then
begin
WatchesWindow^.Update;
WatchesWindow^.MakeFirst;
end
else
begin
New(WatchesWindow,Init);
Desktop^.Insert(WatchesWindow);
end;
{$endif NODEBUG}
end;
procedure TIDEApp.DoAddWatch;
{$ifdef NODEBUG}
begin
NoDebugger;
end;
{$else}
var
P: PWatch;
EditorWindow : PSourceWindow;
S : string;
begin
EditorWindow:=FirstEditorWindow;
If assigned(EditorWindow) then
S:=LowerCaseStr(EditorWindow^.Editor^.GetCurrentWord)
else
S:='';
P:=New(PWatch,Init(S));
if ExecuteDialog(New(PWatchItemDialog,Init(P)),nil)<>cmCancel then
begin
WatchesCollection^.Insert(P);
WatchesCollection^.Update;
{ If not assigned(WatchesWindow) then
should we only open it the first time ?? PM }
DoShowWatches;
end
else
dispose(P,Done);
end;
{$endif NODEBUG}
{
$Log$
Revision 1.11 2000-02-04 00:13:59 pierre
* AddWatch calls DoShowWatches
Revision 1.10 2000/01/08 18:26:20 florian
+ added a register window, doesn't work yet
Revision 1.9 1999/09/22 16:18:19 pierre
+ TIDEApp.DoCloseUserScreenWindow
Revision 1.8 1999/09/09 14:20:05 pierre
+ Stack Window
Revision 1.7 1999/07/28 23:11:19 peter
* fixes from gabor
Revision 1.6 1999/07/10 01:24:19 pierre
+ First implementation of watches window
Revision 1.5 1999/06/30 23:58:17 pierre
+ BreakpointsList Window implemented
with Edit/New/Delete functions
+ Individual breakpoint dialog with support for all types
ignorecount and conditions
(commands are not yet implemented, don't know if this wolud be useful)
awatch and rwatch have problems because GDB does not annotate them
I fixed v4.16 for this
Revision 1.4 1999/06/25 00:36:51 pierre
+ missing Debug menu added (not implemented yet)
Revision 1.3 1999/02/02 16:41:40 peter
+ automatic .pas/.pp adding by opening of file
* better debuggerscreen changes
Revision 1.2 1999/01/21 11:54:16 peter
+ tools menu
+ speedsearch in symbolbrowser
* working run command
Revision 1.1 1998/12/28 15:47:47 peter
+ Added user screen support, display & window
+ Implemented Editor,Mouse Options dialog
+ Added location of .INI and .CFG file
+ Option (INI) file managment implemented (see bottom of Options Menu)
+ Switches updated
+ Run program
}