From 8d3d08ae4c69a85ed98eafc5206bf56bfc7be16f Mon Sep 17 00:00:00 2001 From: Martin Date: Mon, 14 Feb 2022 17:37:37 +0100 Subject: [PATCH] Debugger: Moved dsState to new unit --- components/debuggerintf/dbgintfbasetypes.pas | 8 +-- .../debuggerintf/dbgintfdebuggerbase.pp | 3 +- .../lazdebuggergdbmi/cmdlinedebugger.pp | 2 +- components/lazdebuggergdbmi/gdbmidebugger.pp | 2 +- .../lazdebuggergdbmi/gdbmimiscclasses.pp | 2 +- .../lazdebuggergdbmi/gdbmiserverdebugger.pas | 2 +- .../lazdebuggergdbmi/sshgdbmidebugger.pas | 3 +- .../test/gdbmitestutils/testbase.pas | 3 +- .../test/gdbmitestutils/testwatchutils.pas | 2 +- components/lazdebuggergdbmi/test/testargv.pas | 3 +- .../lazdebuggergdbmi/test/testbreakpoint.pas | 4 +- .../lazdebuggergdbmi/test/testdisass.pas | 2 +- .../lazdebuggergdbmi/test/testexception.pas | 3 +- .../lazdebuggergdbmi/test/testwatches.pas | 2 +- .../lazdebuggerfp/fpdebugdebugger.pas | 2 +- .../lazdebuggerfp/test/testbase.pas | 2 +- .../lazdebuggerfp/test/testbreakpoint.pas | 4 +- .../lazdebuggerfp/test/teststepping.pas | 4 +- .../lazdebuggerfp/test/testwatches.pas | 3 +- .../lazdebuggerfpgdbmi/fpgdbmidebugger.pp | 2 +- .../lazdebuggerfpgdbmi/test/testwatches.pas | 2 +- .../lazdebuggerfplldb/fplldbdebugger.pas | 2 +- .../lazdebuggerfplldb/test/testbase.pas | 2 +- .../lazdebuggerfplldb/test/testwatches.pas | 4 +- .../lazdebuggerintf/lazdebuggerintf.lpk | 4 ++ .../lazdebuggerintf/lazdebuggerintf.pas | 55 +------------- .../lazdebuggerintfbasetypes.pas | 71 +++++++++++++++++++ .../lazdebuggerintfpackage.pas | 4 +- .../lazdebuggerlldb/lldbdebugger.pas | 2 +- .../lazdebugtestbase/testdbgtestsuites.pas | 3 +- .../lazdebugtestbase/ttestdbgexecuteables.pas | 4 +- .../lazdebugtestbase/ttestwatchutilities.pas | 2 +- debugger/assemblerdlg.pp | 3 +- debugger/inspectdlg.pas | 1 + debugger/registersdlg.pp | 2 +- debugger/watchesdlg.pp | 2 +- ide/debugmanager.pas | 2 +- ide/packages/idedebugger/debugger.pp | 2 +- ide/packages/idedebugger/processdebugger.pp | 2 +- ide/sourceeditor.pp | 2 +- 40 files changed, 131 insertions(+), 98 deletions(-) create mode 100644 components/lazdebuggers/lazdebuggerintf/lazdebuggerintfbasetypes.pas diff --git a/components/debuggerintf/dbgintfbasetypes.pas b/components/debuggerintf/dbgintfbasetypes.pas index 78d46b6ff5..79552fbea7 100644 --- a/components/debuggerintf/dbgintfbasetypes.pas +++ b/components/debuggerintf/dbgintfbasetypes.pas @@ -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. diff --git a/components/debuggerintf/dbgintfdebuggerbase.pp b/components/debuggerintf/dbgintfdebuggerbase.pp index b3c1dfcfb0..b2f5ad4762 100644 --- a/components/debuggerintf/dbgintfdebuggerbase.pp +++ b/components/debuggerintf/dbgintfdebuggerbase.pp @@ -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; diff --git a/components/lazdebuggergdbmi/cmdlinedebugger.pp b/components/lazdebuggergdbmi/cmdlinedebugger.pp index dc9808cb99..f2da9c7845 100644 --- a/components/lazdebuggergdbmi/cmdlinedebugger.pp +++ b/components/lazdebuggergdbmi/cmdlinedebugger.pp @@ -47,7 +47,7 @@ uses // DebuggerIntf DbgIntfDebuggerBase, // LazDebuggerGdbmi - DebugUtils, LazDebuggerIntf; + DebugUtils, LazDebuggerIntf, LazDebuggerIntfBaseTypes; type diff --git a/components/lazdebuggergdbmi/gdbmidebugger.pp b/components/lazdebuggergdbmi/gdbmidebugger.pp index 7bb962cc43..7068921d57 100644 --- a/components/lazdebuggergdbmi/gdbmidebugger.pp +++ b/components/lazdebuggergdbmi/gdbmidebugger.pp @@ -64,7 +64,7 @@ uses // DebuggerIntf DbgIntfBaseTypes, DbgIntfDebuggerBase, // CmdLineDebuggerBase - DebuggerPropertiesBase, LazDebuggerIntf, + DebuggerPropertiesBase, LazDebuggerIntf, LazDebuggerIntfBaseTypes, {$IFDEF DBG_ENABLE_TERMINAL} DbgIntfPseudoTerminal, {$ENDIF} diff --git a/components/lazdebuggergdbmi/gdbmimiscclasses.pp b/components/lazdebuggergdbmi/gdbmimiscclasses.pp index c0c663657f..8fc3ba5b15 100644 --- a/components/lazdebuggergdbmi/gdbmimiscclasses.pp +++ b/components/lazdebuggergdbmi/gdbmimiscclasses.pp @@ -35,7 +35,7 @@ uses // DebuggerIntf DbgIntfDebuggerBase, // LazDebuggerGdbmi - DebugUtils, LazDebuggerIntf; + DebugUtils, LazDebuggerIntf, LazDebuggerIntfBaseTypes; type diff --git a/components/lazdebuggergdbmi/gdbmiserverdebugger.pas b/components/lazdebuggergdbmi/gdbmiserverdebugger.pas index 2a8010fad0..5a4c2c5908 100644 --- a/components/lazdebuggergdbmi/gdbmiserverdebugger.pas +++ b/components/lazdebuggergdbmi/gdbmiserverdebugger.pas @@ -35,7 +35,7 @@ uses // DebuggerIntf DbgIntfDebuggerBase, // CmdLineDebuggerBase - DebuggerPropertiesBase, LazDebuggerIntf, + DebuggerPropertiesBase, LazDebuggerIntf, LazDebuggerIntfBaseTypes, // LazDebuggerGdbmi GDBMIDebugger, GDBMIMiscClasses, GdbmiStringConstants; diff --git a/components/lazdebuggergdbmi/sshgdbmidebugger.pas b/components/lazdebuggergdbmi/sshgdbmidebugger.pas index 84944491b4..47ecada622 100644 --- a/components/lazdebuggergdbmi/sshgdbmidebugger.pas +++ b/components/lazdebuggergdbmi/sshgdbmidebugger.pas @@ -47,7 +47,8 @@ uses // DebuggerIntf DbgIntfDebuggerBase, // LazDebuggerGdbmi - GDBMIDebugger, GdbmiStringConstants, LazDebuggerIntf; + GDBMIDebugger, GdbmiStringConstants, LazDebuggerIntf, + LazDebuggerIntfBaseTypes; type diff --git a/components/lazdebuggergdbmi/test/gdbmitestutils/testbase.pas b/components/lazdebuggergdbmi/test/gdbmitestutils/testbase.pas index 272639e72d..0d8eb09049 100644 --- a/components/lazdebuggergdbmi/test/gdbmitestutils/testbase.pas +++ b/components/lazdebuggergdbmi/test/gdbmitestutils/testbase.pas @@ -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, diff --git a/components/lazdebuggergdbmi/test/gdbmitestutils/testwatchutils.pas b/components/lazdebuggergdbmi/test/gdbmitestutils/testwatchutils.pas index 23a4ab66f7..d8852135e8 100644 --- a/components/lazdebuggergdbmi/test/gdbmitestutils/testwatchutils.pas +++ b/components/lazdebuggergdbmi/test/gdbmitestutils/testwatchutils.pas @@ -7,7 +7,7 @@ interface uses Classes, SysUtils, RegExpr, TestBase, LazLoggerBase, DbgIntfBaseTypes, DbgIntfDebuggerBase, TestDbgConfig, TTestDebuggerClasses, IdeDebuggerBase, - LazDebuggerIntf; + IdeDebuggerWatchResult, LazDebuggerIntf, LazDebuggerIntfBaseTypes; type diff --git a/components/lazdebuggergdbmi/test/testargv.pas b/components/lazdebuggergdbmi/test/testargv.pas index 7150fa7ce3..86af2bf334 100644 --- a/components/lazdebuggergdbmi/test/testargv.pas +++ b/components/lazdebuggergdbmi/test/testargv.pas @@ -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; diff --git a/components/lazdebuggergdbmi/test/testbreakpoint.pas b/components/lazdebuggergdbmi/test/testbreakpoint.pas index 682e3ec95e..b18adb23e2 100644 --- a/components/lazdebuggergdbmi/test/testbreakpoint.pas +++ b/components/lazdebuggergdbmi/test/testbreakpoint.pas @@ -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 diff --git a/components/lazdebuggergdbmi/test/testdisass.pas b/components/lazdebuggergdbmi/test/testdisass.pas index c878dbf112..a2f088d0b3 100644 --- a/components/lazdebuggergdbmi/test/testdisass.pas +++ b/components/lazdebuggergdbmi/test/testdisass.pas @@ -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 diff --git a/components/lazdebuggergdbmi/test/testexception.pas b/components/lazdebuggergdbmi/test/testexception.pas index 27d916fad3..b54223849a 100644 --- a/components/lazdebuggergdbmi/test/testexception.pas +++ b/components/lazdebuggergdbmi/test/testexception.pas @@ -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 diff --git a/components/lazdebuggergdbmi/test/testwatches.pas b/components/lazdebuggergdbmi/test/testwatches.pas index 7ae2f9b061..165be507b0 100644 --- a/components/lazdebuggergdbmi/test/testwatches.pas +++ b/components/lazdebuggergdbmi/test/testwatches.pas @@ -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; diff --git a/components/lazdebuggers/lazdebuggerfp/fpdebugdebugger.pas b/components/lazdebuggers/lazdebuggerfp/fpdebugdebugger.pas index 98dc1bf684..23ed1e79d5 100644 --- a/components/lazdebuggers/lazdebuggerfp/fpdebugdebugger.pas +++ b/components/lazdebuggers/lazdebuggerfp/fpdebugdebugger.pas @@ -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} diff --git a/components/lazdebuggers/lazdebuggerfp/test/testbase.pas b/components/lazdebuggers/lazdebuggerfp/test/testbase.pas index 99acb17779..f0a8a3aca8 100644 --- a/components/lazdebuggers/lazdebuggerfp/test/testbase.pas +++ b/components/lazdebuggers/lazdebuggerfp/test/testbase.pas @@ -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 diff --git a/components/lazdebuggers/lazdebuggerfp/test/testbreakpoint.pas b/components/lazdebuggers/lazdebuggerfp/test/testbreakpoint.pas index 5b5d26bf31..22b771f309 100644 --- a/components/lazdebuggers/lazdebuggerfp/test/testbreakpoint.pas +++ b/components/lazdebuggers/lazdebuggerfp/test/testbreakpoint.pas @@ -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 diff --git a/components/lazdebuggers/lazdebuggerfp/test/teststepping.pas b/components/lazdebuggers/lazdebuggerfp/test/teststepping.pas index 36405bd626..70c26e25d4 100644 --- a/components/lazdebuggers/lazdebuggerfp/test/teststepping.pas +++ b/components/lazdebuggers/lazdebuggerfp/test/teststepping.pas @@ -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 diff --git a/components/lazdebuggers/lazdebuggerfp/test/testwatches.pas b/components/lazdebuggers/lazdebuggerfp/test/testwatches.pas index 96daefb483..70c78b67b5 100644 --- a/components/lazdebuggers/lazdebuggerfp/test/testwatches.pas +++ b/components/lazdebuggers/lazdebuggerfp/test/testwatches.pas @@ -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 diff --git a/components/lazdebuggers/lazdebuggerfpgdbmi/fpgdbmidebugger.pp b/components/lazdebuggers/lazdebuggerfpgdbmi/fpgdbmidebugger.pp index f0541b59ed..71bcc240b2 100644 --- a/components/lazdebuggers/lazdebuggerfpgdbmi/fpgdbmidebugger.pp +++ b/components/lazdebuggers/lazdebuggerfpgdbmi/fpgdbmidebugger.pp @@ -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 diff --git a/components/lazdebuggers/lazdebuggerfpgdbmi/test/testwatches.pas b/components/lazdebuggers/lazdebuggerfpgdbmi/test/testwatches.pas index f5a06c84ae..187f085587 100644 --- a/components/lazdebuggers/lazdebuggerfpgdbmi/test/testwatches.pas +++ b/components/lazdebuggers/lazdebuggerfpgdbmi/test/testwatches.pas @@ -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; diff --git a/components/lazdebuggers/lazdebuggerfplldb/fplldbdebugger.pas b/components/lazdebuggers/lazdebuggerfplldb/fplldbdebugger.pas index 2cbc0b2aca..78798cbf99 100644 --- a/components/lazdebuggers/lazdebuggerfplldb/fplldbdebugger.pas +++ b/components/lazdebuggers/lazdebuggerfplldb/fplldbdebugger.pas @@ -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; diff --git a/components/lazdebuggers/lazdebuggerfplldb/test/testbase.pas b/components/lazdebuggers/lazdebuggerfplldb/test/testbase.pas index 36f3b52866..8311777341 100644 --- a/components/lazdebuggers/lazdebuggerfplldb/test/testbase.pas +++ b/components/lazdebuggers/lazdebuggerfplldb/test/testbase.pas @@ -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 diff --git a/components/lazdebuggers/lazdebuggerfplldb/test/testwatches.pas b/components/lazdebuggers/lazdebuggerfplldb/test/testwatches.pas index 2de6e13fe2..c0f6967440 100644 --- a/components/lazdebuggers/lazdebuggerfplldb/test/testwatches.pas +++ b/components/lazdebuggers/lazdebuggerfplldb/test/testwatches.pas @@ -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 diff --git a/components/lazdebuggers/lazdebuggerintf/lazdebuggerintf.lpk b/components/lazdebuggers/lazdebuggerintf/lazdebuggerintf.lpk index 37b726fb40..d19b62cc3c 100644 --- a/components/lazdebuggers/lazdebuggerintf/lazdebuggerintf.lpk +++ b/components/lazdebuggers/lazdebuggerintf/lazdebuggerintf.lpk @@ -33,6 +33,10 @@ See LCL license for details."/> + + + + diff --git a/components/lazdebuggers/lazdebuggerintf/lazdebuggerintf.pas b/components/lazdebuggers/lazdebuggerintf/lazdebuggerintf.pas index c739e590ce..9a1661d87e 100644 --- a/components/lazdebuggers/lazdebuggerintf/lazdebuggerintf.pas +++ b/components/lazdebuggers/lazdebuggerintf/lazdebuggerintf.pas @@ -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 ***** } diff --git a/components/lazdebuggers/lazdebuggerintf/lazdebuggerintfbasetypes.pas b/components/lazdebuggers/lazdebuggerintf/lazdebuggerintfbasetypes.pas new file mode 100644 index 0000000000..120bceae0f --- /dev/null +++ b/components/lazdebuggers/lazdebuggerintf/lazdebuggerintfbasetypes.pas @@ -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. + diff --git a/components/lazdebuggers/lazdebuggerintf/lazdebuggerintfpackage.pas b/components/lazdebuggers/lazdebuggerintf/lazdebuggerintfpackage.pas index 91530e2475..1300e92350 100644 --- a/components/lazdebuggers/lazdebuggerintf/lazdebuggerintfpackage.pas +++ b/components/lazdebuggers/lazdebuggerintf/lazdebuggerintfpackage.pas @@ -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 diff --git a/components/lazdebuggers/lazdebuggerlldb/lldbdebugger.pas b/components/lazdebuggers/lazdebuggerlldb/lldbdebugger.pas index 16ce9af04b..f8e2733a3b 100644 --- a/components/lazdebuggers/lazdebuggerlldb/lldbdebugger.pas +++ b/components/lazdebuggers/lazdebuggerlldb/lldbdebugger.pas @@ -30,7 +30,7 @@ uses // CmdLineDebuggerBase DebugProcess, // LazDebuggerLldb - LldbInstructions, LldbHelper, LazDebuggerIntf; + LldbInstructions, LldbHelper, LazDebuggerIntf, LazDebuggerIntfBaseTypes; type diff --git a/components/lazdebuggers/lazdebugtestbase/testdbgtestsuites.pas b/components/lazdebuggers/lazdebugtestbase/testdbgtestsuites.pas index 315e9f6ae8..e8e7de74c0 100644 --- a/components/lazdebuggers/lazdebugtestbase/testdbgtestsuites.pas +++ b/components/lazdebuggers/lazdebugtestbase/testdbgtestsuites.pas @@ -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 diff --git a/components/lazdebuggers/lazdebugtestbase/ttestdbgexecuteables.pas b/components/lazdebuggers/lazdebugtestbase/ttestdbgexecuteables.pas index 5c6f0d56c6..1796278be4 100644 --- a/components/lazdebuggers/lazdebugtestbase/ttestdbgexecuteables.pas +++ b/components/lazdebuggers/lazdebugtestbase/ttestdbgexecuteables.pas @@ -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 diff --git a/components/lazdebuggers/lazdebugtestbase/ttestwatchutilities.pas b/components/lazdebuggers/lazdebugtestbase/ttestwatchutilities.pas index c5ca4c5f32..0ffaf309f6 100644 --- a/components/lazdebuggers/lazdebugtestbase/ttestwatchutilities.pas +++ b/components/lazdebuggers/lazdebugtestbase/ttestwatchutilities.pas @@ -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 = ( diff --git a/debugger/assemblerdlg.pp b/debugger/assemblerdlg.pp index 2cbac2e2ce..995774f434 100644 --- a/debugger/assemblerdlg.pp +++ b/debugger/assemblerdlg.pp @@ -16,7 +16,8 @@ uses // IdeIntf IDEWindowIntf, IDECommands, IDEImagesIntf, // DebuggerIntf - DbgIntfBaseTypes, DbgIntfDebuggerBase, LazDebuggerIntf, + DbgIntfDebuggerBase, + LazDebuggerIntfBaseTypes, // IDE DebuggerDlg, Debugger, BaseDebugManager, EditorOptions, SourceEditor; diff --git a/debugger/inspectdlg.pas b/debugger/inspectdlg.pas index b0a926c52d..5dd6ca4690 100644 --- a/debugger/inspectdlg.pas +++ b/debugger/inspectdlg.pas @@ -35,6 +35,7 @@ uses IDEWindowIntf, IDEImagesIntf, ObjectInspector, PropEdits, // DebuggerIntf DbgIntfDebuggerBase, DbgIntfBaseTypes, LazDebuggerIntf, + LazDebuggerIntfBaseTypes, // IDE LazarusIDEStrConsts, BaseDebugManager, InputHistory, IDEProcs, Debugger, DebuggerDlg, DebuggerStrConst, EnvironmentOpts; diff --git a/debugger/registersdlg.pp b/debugger/registersdlg.pp index dad3277929..8caf9fa9e0 100644 --- a/debugger/registersdlg.pp +++ b/debugger/registersdlg.pp @@ -44,7 +44,7 @@ uses // IdeIntf IDEWindowIntf, IDEImagesIntf, // DebuggerIntf - DbgIntfDebuggerBase, LazDebuggerIntf, + DbgIntfDebuggerBase, LazDebuggerIntf, LazDebuggerIntfBaseTypes, // IDE BaseDebugManager, LazarusIDEStrConsts, DebuggerStrConst, Debugger, DebuggerDlg; diff --git a/debugger/watchesdlg.pp b/debugger/watchesdlg.pp index 7c5458b051..c7f69f9701 100644 --- a/debugger/watchesdlg.pp +++ b/debugger/watchesdlg.pp @@ -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 diff --git a/ide/debugmanager.pas b/ide/debugmanager.pas index 6e5726962c..3f195e32b0 100644 --- a/ide/debugmanager.pas +++ b/ide/debugmanager.pas @@ -59,7 +59,7 @@ uses InspectDlg, DebugEventsForm, PseudoTerminalDlg, FeedbackDlg, ThreadDlg, HistoryDlg, ProcessDebugger, DbgIntfBaseTypes, DbgIntfDebuggerBase, DbgIntfMiscClasses, DbgIntfPseudoTerminal, LazDebuggerIntf, - BaseDebugManager; + LazDebuggerIntfBaseTypes, BaseDebugManager; type diff --git a/ide/packages/idedebugger/debugger.pp b/ide/packages/idedebugger/debugger.pp index f2d9bdd1ce..4db20c8ede 100644 --- a/ide/packages/idedebugger/debugger.pp +++ b/ide/packages/idedebugger/debugger.pp @@ -44,7 +44,7 @@ uses LazClasses, Maps, LazMethodList, // DebuggerIntf DbgIntfBaseTypes, DbgIntfMiscClasses, DbgIntfDebuggerBase, - LazDebuggerIntf, IdeDebuggerBase; + LazDebuggerIntf, LazDebuggerIntfBaseTypes, IdeDebuggerBase; const XMLBreakPointsNode = 'BreakPoints'; diff --git a/ide/packages/idedebugger/processdebugger.pp b/ide/packages/idedebugger/processdebugger.pp index 1bfe587767..836e7665e6 100644 --- a/ide/packages/idedebugger/processdebugger.pp +++ b/ide/packages/idedebugger/processdebugger.pp @@ -44,7 +44,7 @@ uses // LazUtils FileUtil, UTF8Process, LazFileUtils, LazLoggerBase, // DebuggerIntf - DbgIntfDebuggerBase, LazDebuggerIntf, + DbgIntfDebuggerBase, LazDebuggerIntfBaseTypes, // IDE ProcessList, Debugger; diff --git a/ide/sourceeditor.pp b/ide/sourceeditor.pp index 3dd413a646..d910078ff1 100644 --- a/ide/sourceeditor.pp +++ b/ide/sourceeditor.pp @@ -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,