fixed reposition sourcemark

git-svn-id: trunk@4213 -
This commit is contained in:
mattias 2003-05-29 18:47:27 +00:00
parent 5dad254d29
commit 4bff933ab0
4 changed files with 20 additions and 4 deletions

View File

@ -41,7 +41,7 @@ uses
type
TDBGLocationRec = record
Adress: Pointer;
Address: Pointer;
FuncName: String;
SrcFile: String;
SrcLine: Integer;
@ -2287,6 +2287,9 @@ end;
end.
{ =============================================================================
$Log$
Revision 1.34 2003/05/29 18:47:27 mattias
fixed reposition sourcemark
Revision 1.33 2003/05/29 17:40:10 marc
MWE: * Fixed string resolving
* Updated exception handling

View File

@ -220,7 +220,6 @@ procedure TManagedBreakPoints.MasterUpdate(const ASender: TDBGBreakPoints;
var
n: Integer;
begin
writeln('TManagedBreakPoints.MasterUpdate A ',ABreakpoint.ClassName,' ',ABreakpoint.Source,' ',ABreakpoint.Line);
for n := 0 to Count - 1 do
begin
Result := TManagedBreakPoint(Items[n]);
@ -239,9 +238,14 @@ begin
end
else begin
bp := FindItem;
writeln('TManagedBreakPoints.MasterUpdate B ',ABreakpoint.ClassName,' ',
ABreakpoint.Source,' ',ABreakpoint.Line,' ',bp <> nil);
if bp <> nil then begin
bp.UpdateSourceMark;
Update(bp);
end else begin
writeln('WARNING: TManagedBreakPoints.MasterUpdate unknown breakpoint: ',
ABreakpoint.Source,' ',ABreakpoint.Line);
end;
end;
end;
@ -572,7 +576,7 @@ begin
if ALocation.SrcLine = -1
then begin
MessageDlg(lisExecutionPaused,
Format(lisExecutionPausedAdress, [#13#13, ALocation.Adress, #13,
Format(lisExecutionPausedAdress, [#13#13, ALocation.Address, #13,
ALocation.FuncName, #13, ALocation.SrcFile, #13#13#13, #13]),
mtInformation, [mbOK],0);
@ -1344,6 +1348,9 @@ end.
{ =============================================================================
$Log$
Revision 1.38 2003/05/29 18:47:27 mattias
fixed reposition sourcemark
Revision 1.37 2003/05/29 17:40:10 marc
MWE: * Fixed string resolving
* Updated exception handling

View File

@ -68,7 +68,7 @@ type
const
EditorOptsFormatVersion = 2;
AdditionalHighlightAttributes : array[TAdditionalHilightAttribute] of string =
AdditionalHighlightAttributes: array[TAdditionalHilightAttribute] of string =
(
'',
'Text block',

View File

@ -287,7 +287,9 @@ end;
procedure TSourceMark.SetColumn(const Value: Integer);
begin
if Column=Value then exit;
if FSourceMarks<>nil then FSourceMarks.fSortedItems.Remove(Self);
inherited SetColumn(Value);
if FSourceMarks<>nil then FSourceMarks.fSortedItems.Add(Self);
DoPositionChanged;
end;
@ -300,7 +302,9 @@ end;
procedure TSourceMark.SetLine(const Value: Integer);
begin
if Line=Value then exit;
if FSourceMarks<>nil then FSourceMarks.fSortedItems.Remove(Self);
inherited SetLine(Value);
if FSourceMarks<>nil then FSourceMarks.fSortedItems.Add(Self);
DoPositionChanged;
end;
@ -569,6 +573,8 @@ begin
EditorAndLine.Line:=ALine;
AVLNode:=fSortedItems.FindLeftMostKey(@EditorAndLine,
@CompareEditorAndLineWithMark);
if ALine=50 then
writeln('TSourceMarks.GetMarksForLine ',Aline,' ',AVLNode<>nil);
while (AVLNode<>nil) do begin
CurMark:=TSourceMark(AVLNode.Data);
if CompareEditorAndLineWithMark(@EditorAndLine,CurMark)<>0 then break;