mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 17:39:22 +02:00
DBG: move same debugln to LazLogger cmd-line config
git-svn-id: trunk@35342 -
This commit is contained in:
parent
a012396166
commit
fcdd4f6bf0
@ -2970,7 +2970,8 @@ function HasConsoleSupport: Boolean;
|
|||||||
implementation
|
implementation
|
||||||
|
|
||||||
var
|
var
|
||||||
DBG_STATE, DBG_EVENTS, DBG_STATE_EVENT, DBG_DATA_MONITORS: PLazLoggerLogGroup;
|
DBG_STATE, DBG_EVENTS, DBG_STATE_EVENT,
|
||||||
|
DBG_DATA_MONITORS, DBG_LOCATION_INFO: PLazLoggerLogGroup;
|
||||||
|
|
||||||
const
|
const
|
||||||
COMMANDMAP: array[TDBGState] of TDBGCommands = (
|
COMMANDMAP: array[TDBGState] of TDBGCommands = (
|
||||||
@ -3370,18 +3371,14 @@ begin
|
|||||||
i := FList.Count - 1;
|
i := FList.Count - 1;
|
||||||
while i >= 0 do begin
|
while i >= 0 do begin
|
||||||
if FList[i].IsEqual(AFileName, AFullFileName) then begin
|
if FList[i].IsEqual(AFileName, AFullFileName) then begin
|
||||||
{$IFDEF DBG_LOCATION_INFO}
|
debugln(DBG_LOCATION_INFO, ['TDebuggerLocationProvider.GetLocationInfoFor Found entry for: ', AFileName, ' / ', AFullFileName]);
|
||||||
debugln(['TDebuggerLocationProvider.GetLocationInfoFor Found entry for: ', AFileName, ' / ', AFullFileName]);
|
|
||||||
{$ENDIF}
|
|
||||||
exit(FList[i])
|
exit(FList[i])
|
||||||
end;
|
end;
|
||||||
dec(i);
|
dec(i);
|
||||||
end;
|
end;
|
||||||
Result := TDebuggerUnitInfo.Create(AFileName, AFullFileName);
|
Result := TDebuggerUnitInfo.Create(AFileName, AFullFileName);
|
||||||
FList.Add(Result);
|
FList.Add(Result);
|
||||||
{$IFDEF DBG_LOCATION_INFO}
|
debugln(DBG_LOCATION_INFO, ['TDebuggerLocationProvider.GetLocationInfoFor Created new entry (Cnt=',FList.Count,') for: ', AFileName, ' / ', AFullFileName]);
|
||||||
debugln(['TDebuggerLocationProvider.GetLocationInfoFor Created new entry (Cnt=',FList.Count,') for: ', AFileName, ' / ', AFullFileName]);
|
|
||||||
{$ENDIF}
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TDebuggerUnitInfoProvider.IndexOf(AnInfo: TDebuggerUnitInfo;
|
function TDebuggerUnitInfoProvider.IndexOf(AnInfo: TDebuggerUnitInfo;
|
||||||
@ -11047,6 +11044,7 @@ initialization
|
|||||||
DBG_EVENTS := DebugLogger.RegisterLogGroup('DBG_EVENTS' {$IFDEF DBG_EVENTS} , True {$ENDIF} );
|
DBG_EVENTS := DebugLogger.RegisterLogGroup('DBG_EVENTS' {$IFDEF DBG_EVENTS} , True {$ENDIF} );
|
||||||
DBG_STATE_EVENT := DebugLogger.RegisterLogGroup('DBG_STATE_EVENT' {$IFDEF DBG_STATE_EVENT} , True {$ENDIF} );
|
DBG_STATE_EVENT := DebugLogger.RegisterLogGroup('DBG_STATE_EVENT' {$IFDEF DBG_STATE_EVENT} , True {$ENDIF} );
|
||||||
DBG_DATA_MONITORS := DebugLogger.FindOrRegisterLogGroup('DBG_DATA_MONITORS' {$IFDEF DBG_DATA_MONITORS} , True {$ENDIF} );
|
DBG_DATA_MONITORS := DebugLogger.FindOrRegisterLogGroup('DBG_DATA_MONITORS' {$IFDEF DBG_DATA_MONITORS} , True {$ENDIF} );
|
||||||
|
DBG_LOCATION_INFO := DebugLogger.FindOrRegisterLogGroup('DBG_LOCATION_INFO' {$IFDEF DBG_LOCATION_INFO} , True {$ENDIF} );
|
||||||
|
|
||||||
finalization
|
finalization
|
||||||
DoFinalization;
|
DoFinalization;
|
||||||
|
@ -37,7 +37,7 @@ unit DebuggerDlg;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, Forms, Controls, IDEProcs, FileUtil, LCLProc, Debugger,
|
Classes, Forms, Controls, IDEProcs, FileUtil, LCLProc, LazLogger, Debugger,
|
||||||
IDEImagesIntf, MainIntf, EditorOptions, IDECommands, BaseDebugManager;
|
IDEImagesIntf, MainIntf, EditorOptions, IDECommands, BaseDebugManager;
|
||||||
|
|
||||||
type
|
type
|
||||||
@ -115,6 +115,7 @@ procedure CreateDebugDialog(Sender: TObject; aFormName: string;
|
|||||||
implementation
|
implementation
|
||||||
|
|
||||||
var
|
var
|
||||||
|
DBG_LOCATION_INFO: PLazLoggerLogGroup;
|
||||||
BrkImgIdxInitialized: Boolean;
|
BrkImgIdxInitialized: Boolean;
|
||||||
ImgBreakPoints: Array [0..8] of Integer;
|
ImgBreakPoints: Array [0..8] of Integer;
|
||||||
|
|
||||||
@ -319,9 +320,7 @@ var
|
|||||||
Filename: String;
|
Filename: String;
|
||||||
ok: Boolean;
|
ok: Boolean;
|
||||||
begin
|
begin
|
||||||
{$IFDEF DBG_LOCATION_INFO}
|
debugln(DBG_LOCATION_INFO, ['JumpToUnitSource AnUnitInfo=', AnUnitInfo.DebugText ]);
|
||||||
debugln(['JumpToUnitSource AnUnitInfo=', AnUnitInfo.DebugText ]);
|
|
||||||
{$ENDIF}
|
|
||||||
// avoid any process-messages, so this proc can not be re-entered (avoid opening one files many times)
|
// avoid any process-messages, so this proc can not be re-entered (avoid opening one files many times)
|
||||||
DebugBoss.LockCommandProcessing;
|
DebugBoss.LockCommandProcessing;
|
||||||
try
|
try
|
||||||
@ -330,9 +329,7 @@ begin
|
|||||||
*)
|
*)
|
||||||
// TODO: better detcion of unsaved project files
|
// TODO: better detcion of unsaved project files
|
||||||
if DebugBoss.GetFullFilename(AnUnitInfo, Filename, False) then begin
|
if DebugBoss.GetFullFilename(AnUnitInfo, Filename, False) then begin
|
||||||
{$IFDEF DBG_LOCATION_INFO}
|
debugln(DBG_LOCATION_INFO, ['JumpToUnitSource Filename=', Filename]);
|
||||||
debugln(['JumpToUnitSource Filename=', Filename]);
|
|
||||||
{$ENDIF}
|
|
||||||
ok := false;
|
ok := false;
|
||||||
if FilenameIsAbsolute(Filename) then
|
if FilenameIsAbsolute(Filename) then
|
||||||
ok := MainIDEInterface.DoJumpToSourcePosition(Filename, 0, ALine, 0,
|
ok := MainIDEInterface.DoJumpToSourcePosition(Filename, 0, ALine, 0,
|
||||||
@ -485,4 +482,7 @@ procedure TDebuggerDlg.DoEndUpdate;
|
|||||||
begin
|
begin
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
initialization
|
||||||
|
DBG_LOCATION_INFO := DebugLogger.FindOrRegisterLogGroup('DBG_LOCATION_INFO' {$IFDEF DBG_LOCATION_INFO} , True {$ENDIF} );
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
@ -42,7 +42,7 @@ uses
|
|||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
// LCL
|
// LCL
|
||||||
Classes, SysUtils, Forms, Controls, Dialogs, Menus, ExtCtrls, FileUtil, LCLProc,
|
Classes, SysUtils, Forms, Controls, Dialogs, Menus, ExtCtrls, FileUtil, LCLProc,
|
||||||
LCLType, LCLIntf,
|
LCLType, LCLIntf, LazLogger,
|
||||||
// SynEdit, codetools
|
// SynEdit, codetools
|
||||||
Laz_XMLCfg, SynEdit, CodeCache, CodeToolManager,
|
Laz_XMLCfg, SynEdit, CodeCache, CodeToolManager,
|
||||||
// IDEIntf
|
// IDEIntf
|
||||||
@ -238,6 +238,9 @@ type
|
|||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
|
var
|
||||||
|
DBG_LOCATION_INFO: PLazLoggerLogGroup;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
{ TManagedBreakPoint }
|
{ TManagedBreakPoint }
|
||||||
@ -535,21 +538,15 @@ function TDebugManager.GetFullFilename(const AUnitinfo: TDebuggerUnitInfo;
|
|||||||
begin
|
begin
|
||||||
Filename := AUnitinfo.DbgFullName;
|
Filename := AUnitinfo.DbgFullName;
|
||||||
Result := Filename <> '';
|
Result := Filename <> '';
|
||||||
{$IFDEF DBG_LOCATION_INFO}
|
debugln(DBG_LOCATION_INFO, ['ResolveFromDbg Init Filename=', Filename]);
|
||||||
debugln(['ResolveFromDbg Init Filename=', Filename]);
|
|
||||||
{$ENDIF}
|
|
||||||
if Result then
|
if Result then
|
||||||
Result := GetFullFilename(Filename, False);
|
Result := GetFullFilename(Filename, False);
|
||||||
if not Result then begin
|
if not Result then begin
|
||||||
Filename := AUnitinfo.FileName;
|
Filename := AUnitinfo.FileName;
|
||||||
{$IFDEF DBG_LOCATION_INFO}
|
debugln(DBG_LOCATION_INFO, ['ResolveFromDbg 2nd Filename=', Filename]);
|
||||||
debugln(['ResolveFromDbg 2nd Filename=', Filename]);
|
|
||||||
{$ENDIF}
|
|
||||||
Result := GetFullFilename(Filename, AskUserIfNotFound);
|
Result := GetFullFilename(Filename, AskUserIfNotFound);
|
||||||
end;
|
end;
|
||||||
{$IFDEF DBG_LOCATION_INFO}
|
debugln(DBG_LOCATION_INFO, ['ResolveFromDbg Final Filename=', Filename]);
|
||||||
debugln(['ResolveFromDbg Final Filename=', Filename]);
|
|
||||||
{$ENDIF}
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
@ -571,9 +568,7 @@ begin
|
|||||||
Filename:= MainIDE.FindSourceFile(Filename, Project1.ProjectDirectory,
|
Filename:= MainIDE.FindSourceFile(Filename, Project1.ProjectDirectory,
|
||||||
[fsfSearchForProject, fsfUseIncludePaths, fsfUseDebugPath,
|
[fsfSearchForProject, fsfUseIncludePaths, fsfUseDebugPath,
|
||||||
fsfMapTempToVirtualFiles, fsfSkipPackages]);
|
fsfMapTempToVirtualFiles, fsfSkipPackages]);
|
||||||
{$IFDEF DBG_LOCATION_INFO}
|
debugln(DBG_LOCATION_INFO, ['GetFullFilename From-MainIDE Filename=', Filename]);
|
||||||
debugln(['GetFullFilename From-MainIDE Filename=', Filename]);
|
|
||||||
{$ENDIF}
|
|
||||||
Result := Filename <> '';
|
Result := Filename <> '';
|
||||||
if not Result then
|
if not Result then
|
||||||
ResolveFromDbg;
|
ResolveFromDbg;
|
||||||
@ -2706,6 +2701,9 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
initialization
|
||||||
|
DBG_LOCATION_INFO := DebugLogger.FindOrRegisterLogGroup('DBG_LOCATION_INFO' {$IFDEF DBG_LOCATION_INFO} , True {$ENDIF} );
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user