From 4a8f4953a9b9d85cf8f0f92210f7b5a24ced68fb Mon Sep 17 00:00:00 2001 From: mattias Date: Tue, 3 Jun 2003 08:02:33 +0000 Subject: [PATCH] implemented showing source lines in breakpoints dialog git-svn-id: trunk@4227 - --- debugger/breakpointsdlg.pp | 5 ++++- debugger/debugger.pp | 15 ++++++++++++--- ide/debugmanager.pas | 18 ++++++++++++++++-- 3 files changed, 32 insertions(+), 6 deletions(-) diff --git a/debugger/breakpointsdlg.pp b/debugger/breakpointsdlg.pp index 28cc9d8288..f943e9e444 100644 --- a/debugger/breakpointsdlg.pp +++ b/debugger/breakpointsdlg.pp @@ -353,7 +353,7 @@ begin // line if ABreakpoint.Line > 0 - then AnItem.SubItems[1] := IntToStr(ABreakpoint.Line) + then AnItem.SubItems[1] := IntToStr(ABreakpoint.GetSourceLine) else AnItem.SubItems[1] := ''; // expression @@ -402,6 +402,9 @@ end. { ============================================================================= $Log$ + Revision 1.18 2003/06/03 08:02:33 mattias + implemented showing source lines in breakpoints dialog + Revision 1.17 2003/06/03 01:35:39 marc MWE: = Splitted TDBGBreakpoint into TBaseBreakPoint, TIDEBreakpoint and TDBGBreakPoint diff --git a/debugger/debugger.pp b/debugger/debugger.pp index e65edd841b..19c4c5c234 100644 --- a/debugger/debugger.pp +++ b/debugger/debugger.pp @@ -191,6 +191,7 @@ type constructor Create(ACollection: TCollection); override; destructor Destroy; override; procedure EndUpdate; + function GetSourceLine: integer; virtual; property Enabled: Boolean read GetEnabled write SetEnabled; property Expression: String read GetExpression write SetExpression; property HitCount: Integer read GetHitCount; @@ -1000,9 +1001,9 @@ begin ReqCmd(dcStop, []); end; -{ =========================================================================== } -{ TBaseBreakPoint } -{ =========================================================================== } +{ =========================================================================== + TBaseBreakPoint + =========================================================================== } procedure TBaseBreakPoint.AssignTo (Dest: TPersistent ); var @@ -1085,6 +1086,11 @@ begin end; end; +function TBaseBreakPoint.GetSourceLine: integer; +begin + Result:=Line; +end; + function TBaseBreakPoint.GetEnabled: Boolean; begin Result := FEnabled; @@ -2438,6 +2444,9 @@ end; end. { ============================================================================= $Log$ + Revision 1.37 2003/06/03 08:02:33 mattias + implemented showing source lines in breakpoints dialog + Revision 1.36 2003/06/03 01:35:39 marc MWE: = Splitted TDBGBreakpoint into TBaseBreakPoint, TIDEBreakpoint and TDBGBreakPoint diff --git a/ide/debugmanager.pas b/ide/debugmanager.pas index dc1dbdf861..7176bcad41 100644 --- a/ide/debugmanager.pas +++ b/ide/debugmanager.pas @@ -94,7 +94,7 @@ type FDialogs: array[TDebugDialogType] of TDebuggerDlg; // When a source file is not found, the user can choose one - // Here are all choises stored + // here are all choices stored FUserSourceFiles: TStringList; // Breakpoint routines @@ -154,10 +154,10 @@ type function DoCreateWatch(const AExpression: string): TModalResult; override; end; - implementation + const DebugDlgIDEWindow: array[TDebugDialogType] of TNonModalIDEWindow = ( nmiwDbgOutput, nmiwBreakPoints, nmiwWatches, nmiwLocals, nmiwCallStack @@ -185,6 +185,7 @@ type constructor Create(ACollection: TCollection); override; destructor Destroy; override; procedure ResetMaster; + function GetSourceLine: integer; override; property SourceMark: TSourceMark read FSourceMark write SetSourceMark; end; @@ -252,6 +253,7 @@ end; procedure TManagedBreakPoint.OnSourceMarkPositionChanged(Sender: TObject); begin + Changed; end; procedure TManagedBreakPoint.OnSourceMarkBeforeFree(Sender: TObject); @@ -316,8 +318,17 @@ begin Changed; end; +function TManagedBreakPoint.GetSourceLine: integer; +begin + if FSourceMark<>nil then + Result:=FSourceMark.Line + else + Result:=inherited GetSourceLine; +end; + procedure TManagedBreakPoint.SetEnabled(const AValue: Boolean); begin +writeln('TManagedBreakPoint.SetEnabled ',Line); if Enabled = AValue then exit; inherited SetEnabled(AValue); if FMaster <> nil then FMaster.Enabled := AValue; @@ -1345,6 +1356,9 @@ end. { ============================================================================= $Log$ + Revision 1.42 2003/06/03 08:02:32 mattias + implemented showing source lines in breakpoints dialog + Revision 1.41 2003/06/03 01:35:39 marc MWE: = Splitted TDBGBreakpoint into TBaseBreakPoint, TIDEBreakpoint and TDBGBreakPoint