mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 21:41:35 +02:00
implemented enable and deleting breakpoint in breakpoint dlg
git-svn-id: trunk@4202 -
This commit is contained in:
parent
a64e34471b
commit
4e73760765
@ -1,99 +1,103 @@
|
|||||||
object BreakpointsDlg: TBreakpointsDlg
|
object BreakpointsDlg: TBreakpointsDlg
|
||||||
CAPTION = 'Breakpoint list'
|
Caption = 'Breakpoint list'
|
||||||
CLIENTHEIGHT = 200
|
ClientHeight = 205
|
||||||
CLIENTWIDTH = 500
|
ClientWidth = 629
|
||||||
HORZSCROLLBAR.PAGE = 501
|
Visible = True
|
||||||
VERTSCROLLBAR.PAGE = 201
|
HorzScrollBar.Page = 630
|
||||||
LEFT = 340
|
VertScrollBar.Page = 206
|
||||||
HEIGHT = 200
|
Left = 340
|
||||||
TOP = 117
|
Height = 205
|
||||||
WIDTH = 500
|
Top = 117
|
||||||
object lvBreakPoints: TLISTVIEW
|
Width = 629
|
||||||
ALIGN = alclient
|
HelpType = htkeyword
|
||||||
ANCHORS = [aktop, akleft]
|
object lvBreakPoints: TListView
|
||||||
COLUMNS = <
|
Align = alclient
|
||||||
|
Columns = <
|
||||||
item
|
item
|
||||||
CAPTION = 'State'
|
Caption = 'State'
|
||||||
VISIBLE = True
|
Visible = True
|
||||||
WIDTH = 50
|
Width = 50
|
||||||
end
|
end
|
||||||
item
|
item
|
||||||
CAPTION = 'Filename/Address'
|
Caption = 'Filename/Address'
|
||||||
VISIBLE = True
|
Visible = True
|
||||||
WIDTH = 150
|
Width = 150
|
||||||
end
|
end
|
||||||
item
|
item
|
||||||
CAPTION = 'Line/Length'
|
Caption = 'Line/Length'
|
||||||
VISIBLE = True
|
Visible = True
|
||||||
WIDTH = 100
|
Width = 100
|
||||||
end
|
end
|
||||||
item
|
item
|
||||||
CAPTION = 'Condition'
|
Caption = 'Condition'
|
||||||
VISIBLE = True
|
Visible = True
|
||||||
WIDTH = 75
|
Width = 75
|
||||||
end
|
end
|
||||||
item
|
item
|
||||||
CAPTION = 'Action'
|
Caption = 'Action'
|
||||||
VISIBLE = True
|
Visible = True
|
||||||
WIDTH = 50
|
Width = 50
|
||||||
end
|
end
|
||||||
item
|
item
|
||||||
CAPTION = 'Pass Count'
|
Caption = 'Pass Count'
|
||||||
VISIBLE = True
|
Visible = True
|
||||||
WIDTH = 100
|
Width = 100
|
||||||
end
|
end
|
||||||
item
|
item
|
||||||
CAPTION = 'Group'
|
Caption = 'Group'
|
||||||
VISIBLE = True
|
Visible = True
|
||||||
WIDTH = 50
|
Width = 50
|
||||||
end>
|
end>
|
||||||
MULTISELECT = True
|
MultiSelect = True
|
||||||
POPUPMENU = mnuPopup
|
PopupMenu = mnuPopup
|
||||||
VIEWSTYLE = vsreport
|
ViewStyle = vsreport
|
||||||
ONCLICK = lvBreakPointsClick
|
OnClick = lvBreakPointsClick
|
||||||
ONSELECTITEM = lvBreakPointsSelectItem
|
OnSelectItem = lvBreakPointsSelectItem
|
||||||
HEIGHT = 200
|
Height = 205
|
||||||
WIDTH = 500
|
Width = 629
|
||||||
|
HelpType = htkeyword
|
||||||
end
|
end
|
||||||
object mnuPopup: TPOPUPMENU
|
object mnuPopup: TPopupMenu
|
||||||
|
OnPopup = mnuPopupPopup
|
||||||
left = 100
|
left = 100
|
||||||
top = 96
|
top = 96
|
||||||
object popAdd: TMENUITEM
|
object popAdd: TMenuItem
|
||||||
CAPTION = 'Add...'
|
Caption = 'Add...'
|
||||||
object popAddSourceBP: TMENUITEM
|
object popAddSourceBP: TMenuItem
|
||||||
CAPTION = '&Source breakpoint'
|
Caption = '&Source breakpoint'
|
||||||
ONCLICK = popAddSourceBPClick
|
OnClick = popAddSourceBPClick
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
object N1: TMENUITEM
|
object N1: TMenuItem
|
||||||
CAPTION = '-'
|
Caption = '-'
|
||||||
end
|
end
|
||||||
object popProperties: TMENUITEM
|
object popProperties: TMenuItem
|
||||||
CAPTION = '&Properties'
|
Caption = '&Properties'
|
||||||
ONCLICK = popPropertiesClick
|
OnClick = popPropertiesClick
|
||||||
end
|
end
|
||||||
object popEnabled: TMENUITEM
|
object popEnabled: TMenuItem
|
||||||
CAPTION = '&Enabled'
|
Caption = '&Enabled'
|
||||||
ONCLICK = popEnabledClick
|
ShowAlwaysCheckable = True
|
||||||
|
OnClick = popEnabledClick
|
||||||
end
|
end
|
||||||
object popDelete: TMENUITEM
|
object popDelete: TMenuItem
|
||||||
CAPTION = '&Delete'
|
Caption = '&Delete'
|
||||||
ONCLICK = popDeleteClick
|
OnClick = popDeleteClick
|
||||||
end
|
end
|
||||||
object N2: TMENUITEM
|
object N2: TMenuItem
|
||||||
CAPTION = '-'
|
Caption = '-'
|
||||||
end
|
end
|
||||||
object popDisableAll: TMENUITEM
|
object popDisableAll: TMenuItem
|
||||||
CAPTION = 'D&isable All'
|
Caption = 'D&isable All'
|
||||||
ONCLICK = popDisableAllClick
|
OnClick = popDisableAllClick
|
||||||
end
|
end
|
||||||
object popEnableAll: TMENUITEM
|
object popEnableAll: TMenuItem
|
||||||
CAPTION = '&Enable All'
|
Caption = '&Enable All'
|
||||||
ONCLICK = popEnableAllClick
|
OnClick = popEnableAllClick
|
||||||
end
|
end
|
||||||
object popDeleteAll: TMENUITEM
|
object popDeleteAll: TMenuItem
|
||||||
CAPTION = '&Delete All'
|
Caption = '&Delete All'
|
||||||
ONCLICK = popDeleteAllClick
|
OnClick = popDeleteAllClick
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -1,29 +1,30 @@
|
|||||||
{ This is an automatically generated lazarus resource file }
|
{ This is an automatically generated lazarus resource file }
|
||||||
|
|
||||||
LazarusResources.Add('TBreakpointsDlg','FORMDATA',[
|
LazarusResources.Add('TBreakpointsDlg','FORMDATA',[
|
||||||
'TPF0'#15'TBreakpointsDlg'#14'BreakpointsDlg'#7'CAPTION'#6#15'Breakpoint list'
|
'TPF0'#15'TBreakpointsDlg'#14'BreakpointsDlg'#7'Caption'#6#15'Breakpoint list'
|
||||||
+#12'CLIENTHEIGHT'#3#200#0#11'CLIENTWIDTH'#3#244#1#18'HORZSCROLLBAR.PAGE'#3
|
+#12'ClientHeight'#3#205#0#11'ClientWidth'#3'u'#2#7'Visible'#9#18'HorzScrollB'
|
||||||
+#245#1#18'VERTSCROLLBAR.PAGE'#3#201#0#4'LEFT'#3'T'#1#6'HEIGHT'#3#200#0#3'TOP'
|
+'ar.Page'#3'v'#2#18'VertScrollBar.Page'#3#206#0#4'Left'#3'T'#1#6'Height'#3
|
||||||
+#2'u'#5'WIDTH'#3#244#1#0#9'TLISTVIEW'#13'lvBreakPoints'#5'ALIGN'#7#8'alclien'
|
+#205#0#3'Top'#2'u'#5'Width'#3'u'#2#8'HelpType'#7#9'htkeyword'#0#9'TListView'
|
||||||
+'t'#7'ANCHORS'#11#5'aktop'#6'akleft'#0#7'COLUMNS'#14#1#7'CAPTION'#6#5'State'
|
+#13'lvBreakPoints'#5'Align'#7#8'alclient'#7'Columns'#14#1#7'Caption'#6#5'Sta'
|
||||||
+#7'VISIBLE'#9#5'WIDTH'#2'2'#0#1#7'CAPTION'#6#16'Filename/Address'#7'VISIBLE'
|
+'te'#7'Visible'#9#5'Width'#2'2'#0#1#7'Caption'#6#16'Filename/Address'#7'Visi'
|
||||||
+#9#5'WIDTH'#3#150#0#0#1#7'CAPTION'#6#11'Line/Length'#7'VISIBLE'#9#5'WIDTH'#2
|
+'ble'#9#5'Width'#3#150#0#0#1#7'Caption'#6#11'Line/Length'#7'Visible'#9#5'Wid'
|
||||||
+'d'#0#1#7'CAPTION'#6#9'Condition'#7'VISIBLE'#9#5'WIDTH'#2'K'#0#1#7'CAPTION'#6
|
+'th'#2'd'#0#1#7'Caption'#6#9'Condition'#7'Visible'#9#5'Width'#2'K'#0#1#7'Cap'
|
||||||
+#6'Action'#7'VISIBLE'#9#5'WIDTH'#2'2'#0#1#7'CAPTION'#6#10'Pass Count'#7'VISI'
|
+'tion'#6#6'Action'#7'Visible'#9#5'Width'#2'2'#0#1#7'Caption'#6#10'Pass Count'
|
||||||
+'BLE'#9#5'WIDTH'#2'd'#0#1#7'CAPTION'#6#5'Group'#7'VISIBLE'#9#5'WIDTH'#2'2'#0
|
+#7'Visible'#9#5'Width'#2'd'#0#1#7'Caption'#6#5'Group'#7'Visible'#9#5'Width'#2
|
||||||
+#0#11'MULTISELECT'#9#9'POPUPMENU'#7#8'mnuPopup'#9'VIEWSTYLE'#7#8'vsreport'#7
|
+'2'#0#0#11'MultiSelect'#9#9'PopupMenu'#7#8'mnuPopup'#9'ViewStyle'#7#8'vsrepo'
|
||||||
+'ONCLICK'#7#18'lvBreakPointsClick'#12'ONSELECTITEM'#7#23'lvBreakPointsSelect'
|
+'rt'#7'OnClick'#7#18'lvBreakPointsClick'#12'OnSelectItem'#7#23'lvBreakPoints'
|
||||||
+'Item'#6'HEIGHT'#3#200#0#5'WIDTH'#3#244#1#0#0#10'TPOPUPMENU'#8'mnuPopup'#4'l'
|
+'SelectItem'#6'Height'#3#205#0#5'Width'#3'u'#2#8'HelpType'#7#9'htkeyword'#0#0
|
||||||
+'eft'#2'd'#3'top'#2'`'#0#9'TMENUITEM'#6'popAdd'#7'CAPTION'#6#6'Add...'#0#9'T'
|
+#10'TPopupMenu'#8'mnuPopup'#7'OnPopup'#7#13'mnuPopupPopup'#4'left'#2'd'#3'to'
|
||||||
+'MENUITEM'#14'popAddSourceBP'#7'CAPTION'#6#18'&Source breakpoint'#7'ONCLICK'
|
+'p'#2'`'#0#9'TMenuItem'#6'popAdd'#7'Caption'#6#6'Add...'#0#9'TMenuItem'#14'p'
|
||||||
+#7#19'popAddSourceBPClick'#0#0#0#9'TMENUITEM'#2'N1'#7'CAPTION'#6#1'-'#0#0#9
|
+'opAddSourceBP'#7'Caption'#6#18'&Source breakpoint'#7'OnClick'#7#19'popAddSo'
|
||||||
+'TMENUITEM'#13'popProperties'#7'CAPTION'#6#11'&Properties'#7'ONCLICK'#7#18'p'
|
+'urceBPClick'#0#0#0#9'TMenuItem'#2'N1'#7'Caption'#6#1'-'#0#0#9'TMenuItem'#13
|
||||||
+'opPropertiesClick'#0#0#9'TMENUITEM'#10'popEnabled'#7'CAPTION'#6#8'&Enabled'
|
+'popProperties'#7'Caption'#6#11'&Properties'#7'OnClick'#7#18'popPropertiesCl'
|
||||||
+#7'ONCLICK'#7#15'popEnabledClick'#0#0#9'TMENUITEM'#9'popDelete'#7'CAPTION'#6
|
+'ick'#0#0#9'TMenuItem'#10'popEnabled'#7'Caption'#6#8'&Enabled'#19'ShowAlways'
|
||||||
+#7'&Delete'#7'ONCLICK'#7#14'popDeleteClick'#0#0#9'TMENUITEM'#2'N2'#7'CAPTION'
|
+'Checkable'#9#7'OnClick'#7#15'popEnabledClick'#0#0#9'TMenuItem'#9'popDelete'
|
||||||
+#6#1'-'#0#0#9'TMENUITEM'#13'popDisableAll'#7'CAPTION'#6#12'D&isable All'#7'O'
|
+#7'Caption'#6#7'&Delete'#7'OnClick'#7#14'popDeleteClick'#0#0#9'TMenuItem'#2
|
||||||
+'NCLICK'#7#18'popDisableAllClick'#0#0#9'TMENUITEM'#12'popEnableAll'#7'CAPTIO'
|
+'N2'#7'Caption'#6#1'-'#0#0#9'TMenuItem'#13'popDisableAll'#7'Caption'#6#12'D&'
|
||||||
+'N'#6#11'&Enable All'#7'ONCLICK'#7#17'popEnableAllClick'#0#0#9'TMENUITEM'#12
|
+'isable All'#7'OnClick'#7#18'popDisableAllClick'#0#0#9'TMenuItem'#12'popEnab'
|
||||||
+'popDeleteAll'#7'CAPTION'#6#11'&Delete All'#7'ONCLICK'#7#17'popDeleteAllClic'
|
+'leAll'#7'Caption'#6#11'&Enable All'#7'OnClick'#7#17'popEnableAllClick'#0#0#9
|
||||||
+'k'#0#0#0#0
|
+'TMenuItem'#12'popDeleteAll'#7'Caption'#6#11'&Delete All'#7'OnClick'#7#17'po'
|
||||||
|
+'pDeleteAllClick'#0#0#0#0
|
||||||
]);
|
]);
|
||||||
|
@ -42,6 +42,11 @@ uses
|
|||||||
Buttons, Extctrls, Menus, ComCtrls, IDEProcs, Debugger, DebuggerDlg;
|
Buttons, Extctrls, Menus, ComCtrls, IDEProcs, Debugger, DebuggerDlg;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
TBreakPointsDlgState = (
|
||||||
|
bpdsItemsNeedUpdate
|
||||||
|
);
|
||||||
|
TBreakPointsDlgStates = set of TBreakPointsDlgState;
|
||||||
|
|
||||||
TBreakPointsDlg = class(TDebuggerDlg)
|
TBreakPointsDlg = class(TDebuggerDlg)
|
||||||
lvBreakPoints: TListView;
|
lvBreakPoints: TListView;
|
||||||
mnuPopup: TPopupMenu;
|
mnuPopup: TPopupMenu;
|
||||||
@ -58,6 +63,7 @@ type
|
|||||||
procedure lvBreakPointsClick(Sender: TObject);
|
procedure lvBreakPointsClick(Sender: TObject);
|
||||||
procedure lvBreakPointsSelectItem(Sender: TObject; AItem: TListItem;
|
procedure lvBreakPointsSelectItem(Sender: TObject; AItem: TListItem;
|
||||||
Selected: Boolean);
|
Selected: Boolean);
|
||||||
|
procedure mnuPopupPopup(Sender: TObject);
|
||||||
procedure popAddSourceBPClick(Sender: TObject);
|
procedure popAddSourceBPClick(Sender: TObject);
|
||||||
procedure popPropertiesClick(Sender: TObject);
|
procedure popPropertiesClick(Sender: TObject);
|
||||||
procedure popEnabledClick(Sender: TObject);
|
procedure popEnabledClick(Sender: TObject);
|
||||||
@ -68,6 +74,7 @@ type
|
|||||||
private
|
private
|
||||||
FBaseDirectory: string;
|
FBaseDirectory: string;
|
||||||
FBreakpointsNotification: TDBGBreakPointsNotification;
|
FBreakpointsNotification: TDBGBreakPointsNotification;
|
||||||
|
FStates: TBreakPointsDlgStates;
|
||||||
procedure BreakPointAdd(const ASender: TDBGBreakPoints;
|
procedure BreakPointAdd(const ASender: TDBGBreakPoints;
|
||||||
const ABreakpoint: TDBGBreakPoint);
|
const ABreakpoint: TDBGBreakPoint);
|
||||||
procedure BreakPointUpdate(const ASender: TDBGBreakPoints;
|
procedure BreakPointUpdate(const ASender: TDBGBreakPoints;
|
||||||
@ -81,9 +88,11 @@ type
|
|||||||
procedure UpdateAll;
|
procedure UpdateAll;
|
||||||
protected
|
protected
|
||||||
procedure SetDebugger(const ADebugger: TDebugger); override;
|
procedure SetDebugger(const ADebugger: TDebugger); override;
|
||||||
|
procedure DoEndUpdate; override;
|
||||||
public
|
public
|
||||||
constructor Create(AOwner: TComponent); override;
|
constructor Create(AOwner: TComponent); override;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
|
public
|
||||||
property BaseDirectory: string read FBaseDirectory write SetBaseDirectory;
|
property BaseDirectory: string read FBaseDirectory write SetBaseDirectory;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -118,7 +127,13 @@ begin
|
|||||||
Item := lvBreakPoints.Items.FindData(ABreakpoint);
|
Item := lvBreakPoints.Items.FindData(ABreakpoint);
|
||||||
if Item = nil
|
if Item = nil
|
||||||
then BreakPointAdd(ASender, ABreakPoint)
|
then BreakPointAdd(ASender, ABreakPoint)
|
||||||
else UpdateItem(Item, ABreakPoint);
|
else begin
|
||||||
|
if UpdateCount>0 then begin
|
||||||
|
Include(FStates,bpdsItemsNeedUpdate);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
UpdateItem(Item, ABreakPoint);
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TBreakPointsDlg.BreakPointRemove(const ASender: TDBGBreakPoints;
|
procedure TBreakPointsDlg.BreakPointRemove(const ASender: TDBGBreakPoints;
|
||||||
@ -161,13 +176,31 @@ end;
|
|||||||
|
|
||||||
procedure TBreakPointsDlg.lvBreakPointsSelectItem(Sender: TObject;
|
procedure TBreakPointsDlg.lvBreakPointsSelectItem(Sender: TObject;
|
||||||
AItem: TListItem; Selected: Boolean);
|
AItem: TListItem; Selected: Boolean);
|
||||||
|
begin
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TBreakPointsDlg.mnuPopupPopup(Sender: TObject);
|
||||||
var
|
var
|
||||||
Enable: Boolean;
|
Enable: Boolean;
|
||||||
|
CurBreakPoint: TDBGBreakPoint;
|
||||||
begin
|
begin
|
||||||
Enable := lvBreakPoints.Selected <> nil;
|
Enable := lvBreakPoints.Selected <> nil;
|
||||||
|
if Enable then
|
||||||
|
CurBreakPoint:=TDBGBreakPoint(lvBreakPoints.Selected.Data)
|
||||||
|
else
|
||||||
|
CurBreakPoint:=nil;
|
||||||
popProperties.Enabled := Enable;
|
popProperties.Enabled := Enable;
|
||||||
popEnabled.Enabled := Enable;
|
popEnabled.Enabled := Enable;
|
||||||
|
if CurBreakPoint<>nil then
|
||||||
|
popEnabled.Checked := CurBreakPoint.Enabled
|
||||||
|
else
|
||||||
|
popEnabled.Checked := false;
|
||||||
popDelete.Enabled := Enable;
|
popDelete.Enabled := Enable;
|
||||||
|
|
||||||
|
Enable := lvBreakPoints.Items.Count>0;
|
||||||
|
popDisableAll.Enabled := Enable;
|
||||||
|
popDeleteAll.Enabled := Enable;
|
||||||
|
popEnableAll.Enabled := Enable;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TBreakPointsDlg.popAddSourceBPClick(Sender: TObject);
|
procedure TBreakPointsDlg.popAddSourceBPClick(Sender: TObject);
|
||||||
@ -183,7 +216,19 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TBreakPointsDlg.popDeleteClick(Sender: TObject);
|
procedure TBreakPointsDlg.popDeleteClick(Sender: TObject);
|
||||||
|
var
|
||||||
|
CurItem: TListItem;
|
||||||
|
CurBreakPoint: TDBGBreakPoint;
|
||||||
begin
|
begin
|
||||||
|
CurItem:=lvBreakPoints.Selected;
|
||||||
|
if CurItem=nil then exit;
|
||||||
|
CurBreakPoint:=TDBGBreakPoint(CurItem.Data);
|
||||||
|
if MessageDlg('Delete breakpoint?',
|
||||||
|
'Delete breakpoint at'#13
|
||||||
|
+'"'+CurBreakPoint.Source+'" line '+IntToStr(CurBreakPoint.Line)+'?',
|
||||||
|
mtConfirmation,[mbYes,mbCancel],0)<>mrYes
|
||||||
|
then exit;
|
||||||
|
CurBreakPoint.Free;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TBreakPointsDlg.popDisableAllClick(Sender: TObject);
|
procedure TBreakPointsDlg.popDisableAllClick(Sender: TObject);
|
||||||
@ -213,7 +258,12 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TBreakPointsDlg.popEnabledClick(Sender: TObject);
|
procedure TBreakPointsDlg.popEnabledClick(Sender: TObject);
|
||||||
|
var
|
||||||
|
CurItem: TListItem;
|
||||||
begin
|
begin
|
||||||
|
CurItem:=lvBreakPoints.Selected;
|
||||||
|
if (CurItem=nil) then exit;
|
||||||
|
TDBGBreakPoint(CurItem.Data).Enabled:=not TDBGBreakPoint(CurItem.Data).Enabled;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TBreakPointsDlg.popPropertiesClick(Sender: TObject);
|
procedure TBreakPointsDlg.popPropertiesClick(Sender: TObject);
|
||||||
@ -237,6 +287,12 @@ begin
|
|||||||
else inherited;
|
else inherited;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TBreakPointsDlg.DoEndUpdate;
|
||||||
|
begin
|
||||||
|
inherited DoEndUpdate;
|
||||||
|
if bpdsItemsNeedUpdate in FStates then UpdateAll;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TBreakPointsDlg.UpdateItem(const AItem: TListItem;
|
procedure TBreakPointsDlg.UpdateItem(const AItem: TListItem;
|
||||||
const ABreakpoint: TDBGBreakPoint);
|
const ABreakpoint: TDBGBreakPoint);
|
||||||
const
|
const
|
||||||
@ -246,8 +302,8 @@ const
|
|||||||
// enabled valid
|
// enabled valid
|
||||||
DEBUG_STATE: array[Boolean, TValidState] of String = (
|
DEBUG_STATE: array[Boolean, TValidState] of String = (
|
||||||
{vsUnknown, vsValid, vsInvalid}
|
{vsUnknown, vsValid, vsInvalid}
|
||||||
{Enabled} ('', '?', ''),
|
{Disabled} ('?', 'Disabled','Invalid'),
|
||||||
{Disabled}('*', '!', '*'));
|
{Endabled} ('?', 'Enabled', 'Invalid'));
|
||||||
var
|
var
|
||||||
Action: TDBGBreakPointAction;
|
Action: TDBGBreakPointAction;
|
||||||
S: String;
|
S: String;
|
||||||
@ -297,8 +353,19 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TBreakPointsDlg.UpdateAll;
|
procedure TBreakPointsDlg.UpdateAll;
|
||||||
|
var
|
||||||
|
i: Integer;
|
||||||
|
CurItem: TListItem;
|
||||||
begin
|
begin
|
||||||
|
if UpdateCount>0 then begin
|
||||||
|
Include(FStates,bpdsItemsNeedUpdate);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
Exclude(FStates,bpdsItemsNeedUpdate);
|
||||||
|
for i:=0 to lvBreakPoints.Items.Count-1 do begin
|
||||||
|
CurItem:=lvBreakPoints.Items[i];
|
||||||
|
UpdateItem(CurItem,TDBGBreakPoint(CurItem.Data));
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -309,6 +376,9 @@ end.
|
|||||||
|
|
||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.13 2003/05/27 20:58:12 mattias
|
||||||
|
implemented enable and deleting breakpoint in breakpoint dlg
|
||||||
|
|
||||||
Revision 1.12 2003/05/27 15:04:00 mattias
|
Revision 1.12 2003/05/27 15:04:00 mattias
|
||||||
small fixes for debugger without file
|
small fixes for debugger without file
|
||||||
|
|
||||||
|
@ -59,13 +59,14 @@ type
|
|||||||
function ReadLine(const APeek: Boolean): String; overload;
|
function ReadLine(const APeek: Boolean): String; overload;
|
||||||
procedure SendCmdLn(const ACommand: String); overload;
|
procedure SendCmdLn(const ACommand: String); overload;
|
||||||
procedure SendCmdLn(const ACommand: String; Values: array of const); overload;
|
procedure SendCmdLn(const ACommand: String; Values: array of const); overload;
|
||||||
property DebugProcess: TProcess read FDbgProcess;
|
|
||||||
property DebugProcessRunning: Boolean read GetDebugProcessRunning;
|
|
||||||
property LineEnds: TStringList read FLineEnds;
|
|
||||||
public
|
public
|
||||||
constructor Create(const AExternalDebugger: String); {override; }
|
constructor Create(const AExternalDebugger: String); {override; }
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
procedure TestCmd(const ACommand: String); virtual;// For internal debugging purposes
|
procedure TestCmd(const ACommand: String); virtual;// For internal debugging purposes
|
||||||
|
public
|
||||||
|
property DebugProcess: TProcess read FDbgProcess;
|
||||||
|
property DebugProcessRunning: Boolean read GetDebugProcessRunning;
|
||||||
|
property LineEnds: TStringList read FLineEnds;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure SendBreak(const AHandle: Integer);
|
procedure SendBreak(const AHandle: Integer);
|
||||||
@ -203,6 +204,7 @@ begin
|
|||||||
inherited;
|
inherited;
|
||||||
try
|
try
|
||||||
FDbgProcess.Free;
|
FDbgProcess.Free;
|
||||||
|
FDbgProcess:=nil;
|
||||||
except
|
except
|
||||||
on E: Exception do WriteLN('Exeption while freeing debugger: ', E.Message);
|
on E: Exception do WriteLN('Exeption while freeing debugger: ', E.Message);
|
||||||
end;
|
end;
|
||||||
@ -242,6 +244,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
function TCmdLineDebugger.ReadLine(const APeek: Boolean): String;
|
function TCmdLineDebugger.ReadLine(const APeek: Boolean): String;
|
||||||
|
|
||||||
function ReadData(const AStream: TStream; var ABuffer: String): Integer;
|
function ReadData(const AStream: TStream; var ABuffer: String): Integer;
|
||||||
var
|
var
|
||||||
S: String;
|
S: String;
|
||||||
@ -363,6 +366,9 @@ end;
|
|||||||
end.
|
end.
|
||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.15 2003/05/27 20:58:12 mattias
|
||||||
|
implemented enable and deleting breakpoint in breakpoint dlg
|
||||||
|
|
||||||
Revision 1.14 2003/05/23 14:12:51 mattias
|
Revision 1.14 2003/05/23 14:12:51 mattias
|
||||||
implemented restoring breakpoints
|
implemented restoring breakpoints
|
||||||
|
|
||||||
|
@ -1036,6 +1036,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
Changed(false);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TDBGBreakPoint.EnableGroups;
|
procedure TDBGBreakPoint.EnableGroups;
|
||||||
@ -2168,6 +2169,9 @@ end;
|
|||||||
end.
|
end.
|
||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.29 2003/05/27 20:58:12 mattias
|
||||||
|
implemented enable and deleting breakpoint in breakpoint dlg
|
||||||
|
|
||||||
Revision 1.28 2003/05/27 08:01:31 marc
|
Revision 1.28 2003/05/27 08:01:31 marc
|
||||||
MWE: + Added exception break
|
MWE: + Added exception break
|
||||||
* Reworked adding/removing breakpoints
|
* Reworked adding/removing breakpoints
|
||||||
|
@ -45,11 +45,17 @@ type
|
|||||||
TDebuggerDlg = class(TForm)
|
TDebuggerDlg = class(TForm)
|
||||||
private
|
private
|
||||||
FDebugger: TDebugger;
|
FDebugger: TDebugger;
|
||||||
|
FUpdateCount: integer;
|
||||||
protected
|
protected
|
||||||
procedure SetDebugger(const ADebugger: TDebugger); virtual;
|
procedure SetDebugger(const ADebugger: TDebugger); virtual;
|
||||||
procedure DoClose(var Action: TCloseAction); override;
|
procedure DoClose(var Action: TCloseAction); override;
|
||||||
|
procedure DoBeginUpdate; virtual;
|
||||||
|
procedure DoEndUpdate; virtual;
|
||||||
public
|
public
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
|
procedure BeginUpdate;
|
||||||
|
procedure EndUpdate;
|
||||||
|
function UpdateCount: integer;
|
||||||
property Debugger: TDebugger read FDebugger write SetDebugger;
|
property Debugger: TDebugger read FDebugger write SetDebugger;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -63,6 +69,26 @@ begin
|
|||||||
inherited;
|
inherited;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TDebuggerDlg.BeginUpdate;
|
||||||
|
begin
|
||||||
|
inc(FUpdateCount);
|
||||||
|
writeln('TDebuggerDlg.BeginUpdate ',ClassName,' ',FUpdateCount);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TDebuggerDlg.EndUpdate;
|
||||||
|
begin
|
||||||
|
if FUpdateCount<1 then RaiseException('TDebuggerDlg.EndUpdate');
|
||||||
|
dec(FUpdateCount);
|
||||||
|
|
||||||
|
writeln('TDebuggerDlg.EndUpdate ',ClassName,' ',FUpdateCount);
|
||||||
|
if FUpdateCount=0 then DoEndUpdate;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TDebuggerDlg.UpdateCount: integer;
|
||||||
|
begin
|
||||||
|
Result:=FUpdateCount;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TDebuggerDlg.SetDebugger(const ADebugger: TDebugger);
|
procedure TDebuggerDlg.SetDebugger(const ADebugger: TDebugger);
|
||||||
begin
|
begin
|
||||||
FDebugger := ADebugger;
|
FDebugger := ADebugger;
|
||||||
@ -74,8 +100,21 @@ begin
|
|||||||
EnvironmentOptions.IDEWindowLayoutList.ItemByForm(Self).GetCurrentPosition;
|
EnvironmentOptions.IDEWindowLayoutList.ItemByForm(Self).GetCurrentPosition;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TDebuggerDlg.DoBeginUpdate;
|
||||||
|
begin
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TDebuggerDlg.DoEndUpdate;
|
||||||
|
begin
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.4 2003/05/27 20:58:12 mattias
|
||||||
|
implemented enable and deleting breakpoint in breakpoint dlg
|
||||||
|
|
||||||
Revision 1.3 2003/05/18 10:42:58 mattias
|
Revision 1.3 2003/05/18 10:42:58 mattias
|
||||||
implemented deleting empty submenus
|
implemented deleting empty submenus
|
||||||
|
|
||||||
|
@ -500,6 +500,7 @@ end;
|
|||||||
|
|
||||||
procedure TGDBBreakPoint.DoActionChange;
|
procedure TGDBBreakPoint.DoActionChange;
|
||||||
begin
|
begin
|
||||||
|
Changed(False);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TGDBBreakPoint.DoEnableChange;
|
procedure TGDBBreakPoint.DoEnableChange;
|
||||||
@ -509,15 +510,17 @@ begin
|
|||||||
if FBreakID = 0 then Exit;
|
if FBreakID = 0 then Exit;
|
||||||
|
|
||||||
TGDBDebugger(Debugger).SendCommand('%s %d', [CMD[Enabled], FBreakID]);
|
TGDBDebugger(Debugger).SendCommand('%s %d', [CMD[Enabled], FBreakID]);
|
||||||
|
Changed(false);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TGDBBreakPoint.DoExpressionChange;
|
procedure TGDBBreakPoint.DoExpressionChange;
|
||||||
begin
|
begin
|
||||||
|
Changed(False);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TGDBBreakPoint.DoStateChange;
|
procedure TGDBBreakPoint.DoStateChange;
|
||||||
begin
|
begin
|
||||||
inherited;
|
inherited DoStateChange;
|
||||||
if (Debugger.State = dsStop)
|
if (Debugger.State = dsStop)
|
||||||
and (FBreakID = 0)
|
and (FBreakID = 0)
|
||||||
then SetBreakpoint;
|
then SetBreakpoint;
|
||||||
@ -595,6 +598,9 @@ end;
|
|||||||
end.
|
end.
|
||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.11 2003/05/27 20:58:12 mattias
|
||||||
|
implemented enable and deleting breakpoint in breakpoint dlg
|
||||||
|
|
||||||
Revision 1.10 2003/05/23 14:12:51 mattias
|
Revision 1.10 2003/05/23 14:12:51 mattias
|
||||||
implemented restoring breakpoints
|
implemented restoring breakpoints
|
||||||
|
|
||||||
|
@ -103,6 +103,8 @@ type
|
|||||||
procedure LoadProjectSpecificInfo(XMLConfig: TXMLConfig); override;
|
procedure LoadProjectSpecificInfo(XMLConfig: TXMLConfig); override;
|
||||||
procedure SaveProjectSpecificInfo(XMLConfig: TXMLConfig); override;
|
procedure SaveProjectSpecificInfo(XMLConfig: TXMLConfig); override;
|
||||||
procedure DoRestoreDebuggerMarks(AnUnitInfo: TUnitInfo); override;
|
procedure DoRestoreDebuggerMarks(AnUnitInfo: TUnitInfo); override;
|
||||||
|
procedure BeginUpdateDialogs;
|
||||||
|
procedure EndUpdateDialogs;
|
||||||
|
|
||||||
function DoInitDebugger: TModalResult; override;
|
function DoInitDebugger: TModalResult; override;
|
||||||
function DoPauseProject: TModalResult; override;
|
function DoPauseProject: TModalResult; override;
|
||||||
@ -589,6 +591,28 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TDebugManager.BeginUpdateDialogs;
|
||||||
|
var
|
||||||
|
DialogType: TDebugDialogType;
|
||||||
|
CurDialog: TDebuggerDlg;
|
||||||
|
begin
|
||||||
|
for DialogType:=Low(FDialogs) to High(FDialogs) do begin
|
||||||
|
CurDialog:=FDialogs[DialogType];
|
||||||
|
if CurDialog<>nil then CurDialog.BeginUpdate;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TDebugManager.EndUpdateDialogs;
|
||||||
|
var
|
||||||
|
DialogType: TDebugDialogType;
|
||||||
|
CurDialog: TDebuggerDlg;
|
||||||
|
begin
|
||||||
|
for DialogType:=Low(FDialogs) to High(FDialogs) do begin
|
||||||
|
CurDialog:=FDialogs[DialogType];
|
||||||
|
if CurDialog<>nil then CurDialog.EndUpdate;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// Debugger routines
|
// Debugger routines
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
@ -673,6 +697,8 @@ begin
|
|||||||
OldBreakPointGroups := nil;
|
OldBreakPointGroups := nil;
|
||||||
OldWatches := nil;
|
OldWatches := nil;
|
||||||
|
|
||||||
|
BeginUpdateDialogs;
|
||||||
|
try
|
||||||
try
|
try
|
||||||
case EnvironmentOptions.DebuggerType of
|
case EnvironmentOptions.DebuggerType of
|
||||||
dtGnuDebugger: begin
|
dtGnuDebugger: begin
|
||||||
@ -723,6 +749,9 @@ begin
|
|||||||
then TDbgOutputForm(FDialogs[ddtOutput]).Clear;
|
then TDbgOutputForm(FDialogs[ddtOutput]).Clear;
|
||||||
|
|
||||||
//TODO: Show/hide debug menuitems based on FDebugger.SupportedCommands
|
//TODO: Show/hide debug menuitems based on FDebugger.SupportedCommands
|
||||||
|
finally
|
||||||
|
EndUpdateDialogs;
|
||||||
|
end;
|
||||||
|
|
||||||
Result := mrOk;
|
Result := mrOk;
|
||||||
WriteLN('[TDebugManager.DoInitDebugger] END');
|
WriteLN('[TDebugManager.DoInitDebugger] END');
|
||||||
@ -938,6 +967,9 @@ end.
|
|||||||
|
|
||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.30 2003/05/27 20:58:12 mattias
|
||||||
|
implemented enable and deleting breakpoint in breakpoint dlg
|
||||||
|
|
||||||
Revision 1.29 2003/05/27 15:04:00 mattias
|
Revision 1.29 2003/05/27 15:04:00 mattias
|
||||||
small fixes for debugger without file
|
small fixes for debugger without file
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user