* better storing of breakpoints

This commit is contained in:
pierre 1999-02-10 09:53:14 +00:00
parent f8ecd046d1
commit ec63373072

View File

@ -77,18 +77,12 @@ const
ieBreakpointTyp = 'Type'; ieBreakpointTyp = 'Type';
ieBreakpointCount = 'Count'; ieBreakpointCount = 'Count';
ieBreakpointState = 'State'; ieBreakpointState = 'State';
ieBreakpointFunc = 'Function'; ieBreakpointName = 'Name';
ieBreakpointFile = 'FileName'; ieBreakpointFile = 'FileName';
ieBreakpointLine = 'LineNumber'; ieBreakpointLine = 'LineNumber';
ieBreakpointCond = 'Condition'; ieBreakpointCond = 'Condition';
ieSourceList = 'SourceList'; ieSourceList = 'SourceList';
const
BreakpointTypeStr : Array[BreakpointType] of String[9]
= ( 'function','file-line','watch','awatch','rwatch','invalid' );
BreakpointStateStr : Array[BreakpointState] of String[8]
= ( 'enabled','disabled','invalid' );
procedure InitINIFile; procedure InitINIFile;
var S: string; var S: string;
begin begin
@ -150,15 +144,13 @@ begin
Begin Begin
INIFile^.SetEntry(secBreakpoint,ieBreakpointTyp+S,BreakpointTypeStr[typ]); INIFile^.SetEntry(secBreakpoint,ieBreakpointTyp+S,BreakpointTypeStr[typ]);
INIFile^.SetEntry(secBreakpoint,ieBreakpointState+S,BreakpointStateStr[state]); INIFile^.SetEntry(secBreakpoint,ieBreakpointState+S,BreakpointStateStr[state]);
case typ of if typ=bt_file_line then
bt_function : begin
INIFile^.SetEntry(secBreakpoint,ieBreakpointFunc+S,Name^); INIFile^.SetEntry(secBreakpoint,ieBreakpointFile+S,FileName^);
bt_file_line : INIFile^.SetIntEntry(secBreakpoint,ieBreakpointLine+S,Line);
begin end
INIFile^.SetEntry(secBreakpoint,ieBreakpointFile+S,Name^); else
INIFile^.SetIntEntry(secBreakpoint,ieBreakpointLine+S,Line); INIFile^.SetEntry(secBreakpoint,ieBreakpointName+S,Name^);
end;
end;
if assigned(Conditions) then if assigned(Conditions) then
INIFile^.SetEntry(secBreakpoint,ieBreakpointCond+S,Conditions^); INIFile^.SetEntry(secBreakpoint,ieBreakpointCond+S,Conditions^);
end; end;
@ -183,21 +175,23 @@ begin
If pos(BreakpointStateStr[state],S)>0 then break; If pos(BreakpointStateStr[state],S)>0 then break;
case typ of case typ of
bt_invalid :; bt_invalid :;
bt_function :
begin
S:=INIFile^.GetEntry(secBreakpoint,ieBreakpointFunc+S2,'');
end;
bt_file_line : bt_file_line :
begin begin
S:=INIFile^.GetEntry(secBreakpoint,ieBreakpointFile+S2,''); S:=INIFile^.GetEntry(secBreakpoint,ieBreakpointFile+S2,'');
Line:=INIFile^.GetIntEntry(secBreakpoint,ieBreakpointLine+S2,0); Line:=INIFile^.GetIntEntry(secBreakpoint,ieBreakpointLine+S2,0);
end; end;
else
begin
S:=INIFile^.GetEntry(secBreakpoint,ieBreakpointName+S2,'');
end;
end; end;
SC:=INIFile^.GetEntry(secBreakpoint,ieBreakpointCond+S,''); SC:=INIFile^.GetEntry(secBreakpoint,ieBreakpointCond+S,'');
if (typ=bt_function) and (S<>'') then if (typ=bt_function) and (S<>'') then
new(PB,init_function(S)) new(PB,init_function(S))
else if (typ=bt_file_line) and (S<>'') then else if (typ=bt_file_line) and (S<>'') then
new(PB,init_file_line(S,Line)); new(PB,init_file_line(S,Line))
else
new(PB,init_type(typ,S));
If assigned(PB) then If assigned(PB) then
begin begin
PB^.state:=state; PB^.state:=state;
@ -374,7 +368,10 @@ end;
end. end.
{ {
$Log$ $Log$
Revision 1.10 1999-02-05 13:08:42 pierre Revision 1.11 1999-02-10 09:53:14 pierre
* better storing of breakpoints
Revision 1.10 1999/02/05 13:08:42 pierre
+ new breakpoint types added + new breakpoint types added
Revision 1.9 1999/02/05 12:11:55 pierre Revision 1.9 1999/02/05 12:11:55 pierre