mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-18 07:29:30 +02:00
debugger: implement breakpoint group creation in breakpoint properties dialog, fix group restoring
git-svn-id: trunk@30715 -
This commit is contained in:
parent
02459ee3e2
commit
71256463f9
@ -2,7 +2,7 @@ inherited BreakpointsDlg: TBreakpointsDlg
|
||||
Left = 344
|
||||
Height = 205
|
||||
Top = 153
|
||||
Width = 560
|
||||
Width = 773
|
||||
HelpType = htKeyword
|
||||
HorzScrollBar.Page = 559
|
||||
VertScrollBar.Page = 204
|
||||
@ -10,14 +10,14 @@ inherited BreakpointsDlg: TBreakpointsDlg
|
||||
BorderStyle = bsSizeToolWin
|
||||
Caption = 'Breakpoint list'
|
||||
ClientHeight = 205
|
||||
ClientWidth = 560
|
||||
ClientWidth = 773
|
||||
OnCreate = BreakpointsDlgCREATE
|
||||
Visible = True
|
||||
object lvBreakPoints: TListView[0]
|
||||
Left = 0
|
||||
Height = 179
|
||||
Top = 26
|
||||
Width = 560
|
||||
Width = 773
|
||||
HelpType = htKeyword
|
||||
Align = alClient
|
||||
Columns = <
|
||||
@ -38,6 +38,7 @@ inherited BreakpointsDlg: TBreakpointsDlg
|
||||
end
|
||||
item
|
||||
Caption = 'Action'
|
||||
Width = 150
|
||||
end
|
||||
item
|
||||
Caption = 'Pass Count'
|
||||
@ -45,7 +46,7 @@ inherited BreakpointsDlg: TBreakpointsDlg
|
||||
end
|
||||
item
|
||||
Caption = 'Group'
|
||||
Width = 5
|
||||
Width = 80
|
||||
end>
|
||||
MultiSelect = True
|
||||
PopupMenu = mnuPopup
|
||||
@ -64,7 +65,7 @@ inherited BreakpointsDlg: TBreakpointsDlg
|
||||
Left = 0
|
||||
Height = 26
|
||||
Top = 0
|
||||
Width = 560
|
||||
Width = 773
|
||||
Caption = 'ToolBar1'
|
||||
ParentShowHint = False
|
||||
ShowHint = True
|
||||
|
@ -98,6 +98,8 @@ end;
|
||||
procedure TBreakPropertyDlg.btnOKClick(Sender: TObject);
|
||||
var
|
||||
Actions: TIDEBreakPointActions;
|
||||
GroupName: String;
|
||||
NewGroup: TIDEBreakPointGroup;
|
||||
begin
|
||||
if FBreakpoint = nil then Exit;
|
||||
|
||||
@ -120,7 +122,14 @@ begin
|
||||
//auto continue
|
||||
FBreakpoint.AutoContinueTime := StrToIntDef(edtAutocontinueMS.Text, FBreakpoint.AutoContinueTime);
|
||||
// group
|
||||
FBreakpoint.Group := DebugBoss.BreakPointGroups.GetGroupByName(cmbGroup.Text);
|
||||
GroupName := cmbGroup.Text;
|
||||
NewGroup := DebugBoss.BreakPointGroups.GetGroupByName(GroupName);
|
||||
if not Assigned(NewGroup) and (GroupName <> '') then
|
||||
begin
|
||||
NewGroup := TIDEBreakPointGroup(DebugBoss.BreakPointGroups.Add);
|
||||
NewGroup.Name := GroupName;
|
||||
end;
|
||||
FBreakpoint.Group := NewGroup;
|
||||
// actions
|
||||
Actions := [];
|
||||
if chkActionBreak.Checked then Include(Actions, bpaStop);
|
||||
@ -145,6 +154,7 @@ end;
|
||||
procedure TBreakPropertyDlg.UpdateInfo;
|
||||
var
|
||||
Actions: TIDEBreakPointActions;
|
||||
I: Integer;
|
||||
begin
|
||||
if FBreakpoint = nil then Exit;
|
||||
case FBreakpoint.Kind of
|
||||
@ -169,6 +179,8 @@ begin
|
||||
// auto continue
|
||||
edtAutocontinueMS.Text := IntToStr(FBreakpoint.AutoContinueTime);
|
||||
// group
|
||||
for I := 0 to DebugBoss.BreakPointGroups.Count - 1 do
|
||||
cmbGroup.Items.Add(DebugBoss.BreakPointGroups[I].Name);
|
||||
if FBreakpoint.Group = nil
|
||||
then cmbGroup.Text := ''
|
||||
else cmbGroup.Text := FBreakpoint.Group.Name;
|
||||
|
@ -4037,6 +4037,7 @@ begin
|
||||
then begin
|
||||
TIDEBreakPoint(Dest).Actions := FActions;
|
||||
TIDEBreakPoint(Dest).AutoContinueTime := FAutoContinueTime;
|
||||
TIDEBreakPoint(Dest).Group := FGroup;
|
||||
TIDEBreakPoint(Dest).LogMessage := FLogMessage;
|
||||
TIDEBreakPoint(Dest).LogCallStackLimit := FLogCallStackLimit;
|
||||
end;
|
||||
@ -4984,13 +4985,14 @@ var
|
||||
OldGroup: TIDEBreakPointGroup;
|
||||
begin
|
||||
Clear;
|
||||
NewCount:=XMLConfig.GetValue(Path+'Count',0);
|
||||
for i:=0 to NewCount-1 do begin
|
||||
NewGroup:=TIDEBreakPointGroup(inherited Add);
|
||||
NewCount := XMLConfig.GetValue(Path+'Count', 0);
|
||||
for i := 0 to NewCount - 1 do
|
||||
begin
|
||||
NewGroup := TIDEBreakPointGroup(inherited Add);
|
||||
NewGroup.LoadFromXMLConfig(XMLConfig,
|
||||
Path+'Item'+IntToStr(i+1)+'/');
|
||||
OldGroup:=FindGroupByName(NewGroup.Name,NewGroup);
|
||||
if OldGroup<>nil then
|
||||
OldGroup := FindGroupByName(NewGroup.Name, NewGroup);
|
||||
if OldGroup <> nil then
|
||||
NewGroup.Free;
|
||||
end;
|
||||
end;
|
||||
@ -5004,17 +5006,17 @@ var
|
||||
begin
|
||||
Cnt:=Count;
|
||||
XMLConfig.SetDeleteValue(Path+'Count',Cnt,0);
|
||||
for i:=0 to Cnt-1 do begin
|
||||
CurGroup:=Items[i];
|
||||
for i := 0 to Cnt - 1 do
|
||||
begin
|
||||
CurGroup := Items[i];
|
||||
CurGroup.SaveToXMLConfig(XMLConfig,
|
||||
Path+'Item'+IntToStr(i+1)+'/');
|
||||
end;
|
||||
end;
|
||||
|
||||
function TIDEBreakPointGroups.GetGroupByName(const GroupName: string
|
||||
): TIDEBreakPointGroup;
|
||||
function TIDEBreakPointGroups.GetGroupByName(const GroupName: string): TIDEBreakPointGroup;
|
||||
begin
|
||||
Result:=FindGroupByName(GroupName,nil);
|
||||
Result := FindGroupByName(GroupName, nil);
|
||||
end;
|
||||
|
||||
function TIDEBreakPointGroups.FindGroupByName(const GroupName: string;
|
||||
@ -5022,15 +5024,15 @@ function TIDEBreakPointGroups.FindGroupByName(const GroupName: string;
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
||||
i:=Count-1;
|
||||
while i>=0 do begin
|
||||
Result:=Items[i];
|
||||
if (AnsiCompareText(Result.Name,GroupName)=0)
|
||||
and (Ignore<>Result) then
|
||||
exit;
|
||||
dec(i);
|
||||
i := Count - 1;
|
||||
while i >= 0 do
|
||||
begin
|
||||
Result := Items[i];
|
||||
if (AnsiCompareText(Result.Name, GroupName) = 0) and (Ignore <> Result) then
|
||||
Exit;
|
||||
Dec(i);
|
||||
end;
|
||||
Result:=nil;
|
||||
Result := nil;
|
||||
end;
|
||||
|
||||
function TIDEBreakPointGroups.IndexOfGroupWithName(const GroupName: string;
|
||||
|
Loading…
Reference in New Issue
Block a user