Debugger: Moved dsState to new unit

This commit is contained in:
Martin 2022-02-14 17:37:37 +01:00
parent e4e8972b23
commit 8d3d08ae4c
40 changed files with 131 additions and 98 deletions

View File

@ -9,15 +9,15 @@ unit DbgIntfBaseTypes;
interface
uses
Classes, SysUtils;
Classes, SysUtils, LazDebuggerIntfBaseTypes;
type
(* TDBGPtr
datatype pointing to data on the target
*)
TDBGPtr = type QWord;
PDBGPtr = ^TDBGPtr;
TDBGPtrArray = Array of TDBGPtr;
TDBGPtr = LazDebuggerIntfBaseTypes.TDBGPtr;
PDBGPtr = LazDebuggerIntfBaseTypes.PDBGPtr;
TDBGPtrArray = LazDebuggerIntfBaseTypes.TDBGPtrArray;
(* TDbgSymbolKind
Enum of types that a value can have.

View File

@ -51,7 +51,8 @@ uses
LazClasses, {$ifdef FORCE_LAZLOGGER_DUMMY} LazLoggerDummy {$else} LazLoggerBase {$endif}, LazFileUtils, LazStringUtils, Maps, LazMethodList,
// DebuggerIntf
DbgIntfBaseTypes, DbgIntfMiscClasses, DbgIntfPseudoTerminal,
DbgIntfCommonStrings, LazDebuggerIntf, LazDebuggerTemplate;
DbgIntfCommonStrings, LazDebuggerIntf, LazDebuggerTemplate,
LazDebuggerIntfBaseTypes;
const
DebuggerIntfVersion = 0;

View File

@ -47,7 +47,7 @@ uses
// DebuggerIntf
DbgIntfDebuggerBase,
// LazDebuggerGdbmi
DebugUtils, LazDebuggerIntf;
DebugUtils, LazDebuggerIntf, LazDebuggerIntfBaseTypes;
type

View File

@ -64,7 +64,7 @@ uses
// DebuggerIntf
DbgIntfBaseTypes, DbgIntfDebuggerBase,
// CmdLineDebuggerBase
DebuggerPropertiesBase, LazDebuggerIntf,
DebuggerPropertiesBase, LazDebuggerIntf, LazDebuggerIntfBaseTypes,
{$IFDEF DBG_ENABLE_TERMINAL}
DbgIntfPseudoTerminal,
{$ENDIF}

View File

@ -35,7 +35,7 @@ uses
// DebuggerIntf
DbgIntfDebuggerBase,
// LazDebuggerGdbmi
DebugUtils, LazDebuggerIntf;
DebugUtils, LazDebuggerIntf, LazDebuggerIntfBaseTypes;
type

View File

@ -35,7 +35,7 @@ uses
// DebuggerIntf
DbgIntfDebuggerBase,
// CmdLineDebuggerBase
DebuggerPropertiesBase, LazDebuggerIntf,
DebuggerPropertiesBase, LazDebuggerIntf, LazDebuggerIntfBaseTypes,
// LazDebuggerGdbmi
GDBMIDebugger, GDBMIMiscClasses, GdbmiStringConstants;

View File

@ -47,7 +47,8 @@ uses
// DebuggerIntf
DbgIntfDebuggerBase,
// LazDebuggerGdbmi
GDBMIDebugger, GdbmiStringConstants, LazDebuggerIntf;
GDBMIDebugger, GdbmiStringConstants, LazDebuggerIntf,
LazDebuggerIntfBaseTypes;
type

View File

@ -8,7 +8,8 @@ uses
Classes, SysUtils, FileUtil, fpcunit, testregistry, LCLProc, LazLogger,
LazFileUtils, DbgIntfDebuggerBase, Dialogs, Forms, RegExpr, GDBMIDebugger,
TestDbgConfig, TestDbgTestSuites, TTestDbgExecuteables, TTestDebuggerClasses,
TestDbgCompilerProcess, TestDbgControl, TestOutputLogger, LazDebuggerIntf; // , FpGdbmiDebugger;
TestDbgCompilerProcess, TestDbgControl, TestOutputLogger, LazDebuggerIntf,
LazDebuggerIntfBaseTypes; // , FpGdbmiDebugger;
// EnvironmentOpts, ExtToolDialog, TransferMacros,

View File

@ -7,7 +7,7 @@ interface
uses
Classes, SysUtils, RegExpr, TestBase, LazLoggerBase, DbgIntfBaseTypes,
DbgIntfDebuggerBase, TestDbgConfig, TTestDebuggerClasses, IdeDebuggerBase,
LazDebuggerIntf;
IdeDebuggerWatchResult, LazDebuggerIntf, LazDebuggerIntfBaseTypes;
type

View File

@ -7,7 +7,8 @@ interface
uses
SysUtils, fpcunit, testutils, testregistry, TestBase, GDBMIDebugger, LCLProc,
FileUtil, LazUTF8, DbgIntfDebuggerBase, TestDbgControl, TestDbgTestSuites,
TestDbgConfig, TestDbgCompilerProcess, LazDebuggerIntf, TestWatches;
TestDbgConfig, TestDbgCompilerProcess, LazDebuggerIntf,
LazDebuggerIntfBaseTypes, TestWatches;
const
BREAK_LINE_ARGV = 40;

View File

@ -7,8 +7,8 @@ interface
uses
SysUtils, fpcunit, testutils, testregistry, DbgIntfBaseTypes,
DbgIntfDebuggerBase, DbgIntfMiscClasses, TestBase, GDBMIDebugger,
TestDbgControl, TestDbgTestSuites, TestDbgConfig, LazDebuggerIntf, LCLProc,
TestWatches;
TestDbgControl, TestDbgTestSuites, TestDbgConfig, LazDebuggerIntf,
LazDebuggerIntfBaseTypes, LCLProc, TestWatches;
type

View File

@ -7,7 +7,7 @@ interface
uses
Classes, SysUtils, fpcunit, testutils, testregistry, LCLProc,
DbgIntfBaseTypes, DbgIntfDebuggerBase, GDBMIDebugger, TestBase, maps,
TTestDebuggerClasses, LazDebuggerIntf;
TTestDebuggerClasses, LazDebuggerIntf, LazDebuggerIntfBaseTypes;
type
TTestDisAssRegion = record

View File

@ -7,7 +7,8 @@ interface
uses
Classes, sysutils, fpcunit, testutils, testregistry, TestBase, GDBMIDebugger,
LCLProc, DbgIntfDebuggerBase, TestDbgControl, TestDbgTestSuites,
TestDbgConfig, TestCommonSources, TestOutputLogger, LazDebuggerIntf;
TestDbgConfig, TestCommonSources, TestOutputLogger, LazDebuggerIntf,
LazDebuggerIntfBaseTypes;
type

View File

@ -8,7 +8,7 @@ uses
Classes, SysUtils, fpcunit, testutils, testregistry, RegExpr,
DbgIntfBaseTypes, DbgIntfDebuggerBase, TestBase, GDBMIDebugger, TestDbgConfig,
TestDbgControl, TTestDbgExecuteables, TestDbgTestSuites, LazDebuggerIntf,
LCLProc, TestWatchUtils, IdeDebuggerBase;
LazDebuggerIntfBaseTypes, LCLProc, TestWatchUtils, IdeDebuggerBase;
const
BREAK_LINE_FOOFUNC_NEST = 206;

View File

@ -35,7 +35,7 @@ uses
Classes, {$IfDef WIN64}windows,{$EndIf} SysUtils, fgl, math, process,
Forms, Dialogs, syncobjs,
Maps, LazLoggerBase, LazUTF8, lazCollections,
DbgIntfBaseTypes, DbgIntfDebuggerBase,
DbgIntfDebuggerBase, LazDebuggerIntfBaseTypes,
FpDebugDebuggerUtils, FpDebugDebuggerWorkThreads, LazDebuggerIntf,
// FpDebug
{$IFDEF FPDEBUG_THREAD_CHECK} FpDbgCommon, {$ENDIF}

View File

@ -7,7 +7,7 @@ interface
uses
Classes, SysUtils, LazFileUtils, LazLogger, DbgIntfDebuggerBase,
TestDbgConfig, TTestDbgExecuteables, TestDbgTestSuites, TestDbgControl,
FpDebugDebugger, LazDebuggerIntf, Dialogs, Forms,
FpDebugDebugger, LazDebuggerIntf, LazDebuggerIntfBaseTypes, Dialogs, Forms,
FpDbgDwarfFreePascal;
type

View File

@ -7,8 +7,8 @@ interface
uses
Classes, SysUtils, math, TestDbgControl, TestDbgTestSuites,
TTestWatchUtilities, TestCommonSources, TestDbgConfig, TTestDebuggerClasses,
LazDebuggerIntf, DbgIntfDebuggerBase, DbgIntfBaseTypes, LazLoggerBase,
Forms;
LazDebuggerIntf, LazDebuggerIntfBaseTypes, DbgIntfDebuggerBase,
DbgIntfBaseTypes, LazLoggerBase, Forms;
type

View File

@ -7,8 +7,8 @@ interface
uses
Classes, SysUtils, math, TestDbgControl, TestDbgTestSuites, TestBase,
TTestWatchUtilities, TestCommonSources, TestDbgConfig, TestOutputLogger,
FpDebugDebugger, FpDebugDebuggerUtils, LazDebuggerIntf, DbgIntfDebuggerBase,
DbgIntfBaseTypes,
FpDebugDebugger, FpDebugDebuggerUtils, LazDebuggerIntf,
LazDebuggerIntfBaseTypes, DbgIntfDebuggerBase, DbgIntfBaseTypes,
{$ifdef FORCE_LAZLOGGER_DUMMY} LazLoggerDummy {$else} LazLoggerBase {$endif}, Forms;
type

View File

@ -7,7 +7,8 @@ interface
uses
Classes, SysUtils, fpcunit, testregistry, TestBase, TestDbgControl,
TestDbgTestSuites, TestOutputLogger, TTestWatchUtilities, TestCommonSources,
TestDbgConfig, LazDebuggerIntf, DbgIntfDebuggerBase, DbgIntfBaseTypes, Forms,
TestDbgConfig, LazDebuggerIntf, LazDebuggerIntfBaseTypes,
DbgIntfDebuggerBase, DbgIntfBaseTypes, Forms,
IdeDebuggerBase;
type

View File

@ -17,7 +17,7 @@ uses
GDBTypeInfo, LCLProc, Forms, FpDbgLoader, FpDbgDwarf, LazLoggerBase,
LazLoggerProfiling, LazClasses, FpPascalParser, FpPascalBuilder,
FpErrorMessages, FpDbgDwarfDataClasses, FpDbgDwarfFreePascal, FpDbgCommon,
MenuIntf, LazDebuggerIntf;
MenuIntf, LazDebuggerIntf, LazDebuggerIntfBaseTypes;
type

View File

@ -9,7 +9,7 @@ uses
DbgIntfBaseTypes, DbgIntfDebuggerBase, TestBase, FpGdbmiDebugger, LCLProc,
IdeDebuggerBase, TestWatchUtils, GDBMIDebugger, FpErrorMessages,
TestDbgControl, TestDbgConfig, TTestDbgExecuteables, TestDbgTestSuites,
LazDebuggerIntf;
LazDebuggerIntf, LazDebuggerIntfBaseTypes;
const
BREAK_COUNT_TestWatchesUnitSimple = 17;

View File

@ -26,7 +26,7 @@ uses
windows,
{$ENDIF}
Classes, sysutils, math, FpdMemoryTools, FpDbgInfo, LldbDebugger,
LldbInstructions, LldbHelper, LazDebuggerIntf, DbgIntfBaseTypes,
LldbInstructions, LldbHelper, LazDebuggerIntf, DbgIntfBaseTypes, LazDebuggerIntfBaseTypes,
DbgIntfDebuggerBase, LCLProc, Forms, FpDbgLoader, FpDbgDwarf, LazLoggerBase,
LazClasses, FpPascalParser, FpPascalBuilder, FpErrorMessages,
FpDbgDwarfDataClasses, FpDbgDwarfFreePascal, FpDbgCommon;

View File

@ -7,7 +7,7 @@ interface
uses
Classes, SysUtils, LazFileUtils, LazLogger, DbgIntfDebuggerBase,
TestDbgConfig, TTestDbgExecuteables, TestDbgTestSuites, TestDbgControl,
FpLldbDebugger, LazDebuggerIntf, Dialogs, Forms,
FpLldbDebugger, LazDebuggerIntf, LazDebuggerIntfBaseTypes, Dialogs, Forms,
FpDbgDwarfFreePascal;
implementation

View File

@ -7,8 +7,8 @@ interface
uses
Classes, SysUtils, testutils, testregistry, fpcunit, TestBase,
TestDbgTestSuites, TestDbgControl, TTestWatchUtilities, TestCommonSources,
TestDbgConfig, TestOutputLogger, LazDebuggerIntf, DbgIntfDebuggerBase,
DbgIntfBaseTypes;
TestDbgConfig, TestOutputLogger, LazDebuggerIntf, LazDebuggerIntfBaseTypes,
DbgIntfDebuggerBase, DbgIntfBaseTypes;
type

View File

@ -33,6 +33,10 @@ See LCL license for details."/>
<Type Value="Main Unit"/>
<UnitName Value="lazdebuggerintfpackage"/>
</Item>
<Item>
<Filename Value="lazdebuggerintfbasetypes.pas"/>
<UnitName Value="lazdebuggerintfbasetypes"/>
</Item>
</Files>
<RequiredPkgs>
<Item>

View File

@ -21,61 +21,10 @@ unit LazDebuggerIntf;
interface
uses
Classes, SysUtils;
Classes, SysUtils, LazDebuggerIntfBaseTypes;
type
{ Debugger states
--------------------------------------------------------------------------
dsNone:
The debug object is created, but no instance of an external debugger
exists.
Initial state, leave with Init, enter with Done
dsIdle:
The external debugger is started, but no filename (or no other params
required to start) were given.
dsStop:
(Optional) The execution of the target is stopped
The external debugger is loaded and ready to (re)start the execution
of the target.
Breakpoints, watches etc can be defined
dsPause:
The debugger has paused the target. Target variables can be examined
dsInternalPause:
Pause, not visible to user.
For examble auto continue breakpoint: Allow collection of Snapshot data
dsInit:
(Optional, Internal) The debugger is about to run
dsRun:
The target is running.
dsError:
Something unforseen has happened. A shutdown of the debugger is in
most cases needed.
-dsDestroying
The debugger is about to be destroyed.
Should normally happen immediate on calling Release.
But the debugger may be in nested calls, and has to exit them first.
--------------------------------------------------------------------------
}
TDBGState = (
dsNone,
dsIdle,
dsStop,
dsPause,
dsInternalPause,
dsInit,
dsRun,
dsError,
dsDestroying
);
TDBGState = LazDebuggerIntfBaseTypes.TDBGState deprecated 'Use LazDebuggerIntfBaseTypes.TDBGState';
{$REGION ***** Internal types ***** }

View File

@ -0,0 +1,71 @@
unit LazDebuggerIntfBaseTypes;
{$mode objfpc}{$H+}
interface
type
(* TDBGPtr
datatype pointing to data on the target
*)
TDBGPtr = type QWord;
PDBGPtr = ^TDBGPtr;
TDBGPtrArray = Array of TDBGPtr;
{ Debugger states
--------------------------------------------------------------------------
dsNone:
The debug object is created, but no instance of an external debugger
exists.
Initial state, leave with Init, enter with Done
dsIdle:
The external debugger is started, but no filename (or no other params
required to start) were given.
dsStop:
(Optional) The execution of the target is stopped
The external debugger is loaded and ready to (re)start the execution
of the target.
Breakpoints, watches etc can be defined
dsPause:
The debugger has paused the target. Target variables can be examined
dsInternalPause:
Pause, not visible to user.
For examble auto continue breakpoint: Allow collection of Snapshot data
dsInit:
(Optional, Internal) The debugger is about to run
dsRun:
The target is running.
dsError:
Something unforseen has happened. A shutdown of the debugger is in
most cases needed.
-dsDestroying
The debugger is about to be destroyed.
Should normally happen immediate on calling Release.
But the debugger may be in nested calls, and has to exit them first.
--------------------------------------------------------------------------
}
TDBGState = (
dsNone,
dsIdle,
dsStop,
dsPause,
dsInternalPause,
dsInit,
dsRun,
dsError,
dsDestroying
);
implementation
end.

View File

@ -2,13 +2,13 @@
This source is only used to compile and install the package.
}
unit LazDebuggerIntfPackage;
unit lazdebuggerintfpackage;
{$warn 5023 off : no warning about unused units}
interface
uses
LazDebuggerIntf, LazDebuggerTemplate;
LazDebuggerIntf, LazDebuggerTemplate, LazDebuggerIntfBaseTypes;
implementation

View File

@ -30,7 +30,7 @@ uses
// CmdLineDebuggerBase
DebugProcess,
// LazDebuggerLldb
LldbInstructions, LldbHelper, LazDebuggerIntf;
LldbInstructions, LldbHelper, LazDebuggerIntf, LazDebuggerIntfBaseTypes;
type

View File

@ -6,7 +6,8 @@ interface
uses
Classes, SysUtils, TTestDbgExecuteables, TestDbgControl, TestDbgConfig,
TestOutputLogger, TestCommonSources, LazDebuggerIntf, LazFileUtils, LazLogger,
TestOutputLogger, TestCommonSources, LazDebuggerIntf, LazDebuggerIntfBaseTypes,
LazFileUtils, LazLogger,
DbgIntfDebuggerBase, StrUtils, fpcunit, testregistry, RegExpr;
const

View File

@ -7,8 +7,8 @@ interface
uses
Classes, SysUtils, fgl, TestDbgConfig, TestDbgCompilerProcess,
TestOutputLogger, TTestDebuggerClasses, TestCommonSources, LazDebuggerIntf,
LazFileUtils, LazLoggerBase, FileUtil, LazStringUtils, DbgIntfDebuggerBase,
fpcunit;
LazDebuggerIntfBaseTypes, LazFileUtils, LazLoggerBase, FileUtil,
LazStringUtils, DbgIntfDebuggerBase, fpcunit;
type

View File

@ -10,7 +10,7 @@ uses
Classes, SysUtils, math, DbgIntfBaseTypes, DbgIntfDebuggerBase,
FpPascalBuilder, LazLoggerBase, Forms, IdeDebuggerBase, RegExpr,
TestDbgTestSuites, TTestDebuggerClasses, TTestDbgExecuteables, TestDbgConfig,
LazDebuggerIntf, TestOutputLogger;
LazDebuggerIntf, LazDebuggerIntfBaseTypes, TestOutputLogger;
type
TWatchExpectationResultKind = (

View File

@ -16,7 +16,8 @@ uses
// IdeIntf
IDEWindowIntf, IDECommands, IDEImagesIntf,
// DebuggerIntf
DbgIntfBaseTypes, DbgIntfDebuggerBase, LazDebuggerIntf,
DbgIntfDebuggerBase,
LazDebuggerIntfBaseTypes,
// IDE
DebuggerDlg, Debugger, BaseDebugManager, EditorOptions, SourceEditor;

View File

@ -35,6 +35,7 @@ uses
IDEWindowIntf, IDEImagesIntf, ObjectInspector, PropEdits,
// DebuggerIntf
DbgIntfDebuggerBase, DbgIntfBaseTypes, LazDebuggerIntf,
LazDebuggerIntfBaseTypes,
// IDE
LazarusIDEStrConsts, BaseDebugManager, InputHistory, IDEProcs,
Debugger, DebuggerDlg, DebuggerStrConst, EnvironmentOpts;

View File

@ -44,7 +44,7 @@ uses
// IdeIntf
IDEWindowIntf, IDEImagesIntf,
// DebuggerIntf
DbgIntfDebuggerBase, LazDebuggerIntf,
DbgIntfDebuggerBase, LazDebuggerIntf, LazDebuggerIntfBaseTypes,
// IDE
BaseDebugManager, LazarusIDEStrConsts, DebuggerStrConst, Debugger, DebuggerDlg;

View File

@ -44,7 +44,7 @@ uses
IDEImagesIntf, LazarusIDEStrConsts, DebuggerStrConst, Debugger,
DebuggerTreeView, IdeDebuggerBase, DebuggerDlg, DbgIntfBaseTypes,
DbgIntfDebuggerBase, DbgIntfMiscClasses, SynEdit, laz.VirtualTrees,
LazDebuggerIntf, BaseDebugManager, EnvironmentOpts;
LazDebuggerIntf, LazDebuggerIntfBaseTypes, BaseDebugManager, EnvironmentOpts;
type

View File

@ -59,7 +59,7 @@ uses
InspectDlg, DebugEventsForm, PseudoTerminalDlg, FeedbackDlg, ThreadDlg,
HistoryDlg, ProcessDebugger, DbgIntfBaseTypes, DbgIntfDebuggerBase,
DbgIntfMiscClasses, DbgIntfPseudoTerminal, LazDebuggerIntf,
BaseDebugManager;
LazDebuggerIntfBaseTypes, BaseDebugManager;
type

View File

@ -44,7 +44,7 @@ uses
LazClasses, Maps, LazMethodList,
// DebuggerIntf
DbgIntfBaseTypes, DbgIntfMiscClasses, DbgIntfDebuggerBase,
LazDebuggerIntf, IdeDebuggerBase;
LazDebuggerIntf, LazDebuggerIntfBaseTypes, IdeDebuggerBase;
const
XMLBreakPointsNode = 'BreakPoints';

View File

@ -44,7 +44,7 @@ uses
// LazUtils
FileUtil, UTF8Process, LazFileUtils, LazLoggerBase,
// DebuggerIntf
DbgIntfDebuggerBase, LazDebuggerIntf,
DbgIntfDebuggerBase, LazDebuggerIntfBaseTypes,
// IDE
ProcessList, Debugger;

View File

@ -69,7 +69,7 @@ uses
IDEWindowIntf, ProjectIntf, MacroDefIntf, ToolBarIntf, IDEDialogs, IDECommands,
EditorSyntaxHighlighterDef,
// DebuggerIntf
DbgIntfDebuggerBase, LazDebuggerIntf,
DbgIntfDebuggerBase, LazDebuggerIntf, LazDebuggerIntfBaseTypes,
// IDE units
IDECmdLine, LazarusIDEStrConsts, EditorOptions,
EnvironmentOpts, WordCompletion, FindReplaceDialog, IDEProcs, IDEOptionDefs,