mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-17 23:49:34 +02:00
Debugger: test, remove IDE dependencies
git-svn-id: trunk@44480 -
This commit is contained in:
parent
3a12eb9324
commit
84b0249673
@ -1,4 +1,4 @@
|
||||
<?xml version="1.0"?>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<CONFIG>
|
||||
<ProjectOptions>
|
||||
<Version Value="9"/>
|
||||
@ -30,16 +30,19 @@
|
||||
<CommandLineParams Value="--debug-log=-"/>
|
||||
</local>
|
||||
</RunParams>
|
||||
<RequiredPackages Count="3">
|
||||
<RequiredPackages Count="4">
|
||||
<Item1>
|
||||
<PackageName Value="FPCUnitTestRunner"/>
|
||||
<PackageName Value="LazDebuggerGdbmi"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<PackageName Value="ide"/>
|
||||
<PackageName Value="DebuggerIntf"/>
|
||||
</Item2>
|
||||
<Item3>
|
||||
<PackageName Value="LCL"/>
|
||||
<PackageName Value="FPCUnitTestRunner"/>
|
||||
</Item3>
|
||||
<Item4>
|
||||
<PackageName Value="LCL"/>
|
||||
</Item4>
|
||||
</RequiredPackages>
|
||||
<Units Count="3">
|
||||
<Unit0>
|
||||
@ -61,7 +64,7 @@
|
||||
</Units>
|
||||
</ProjectOptions>
|
||||
<CompilerOptions>
|
||||
<Version Value="10"/>
|
||||
<Version Value="11"/>
|
||||
<PathDelim Value="\"/>
|
||||
<Target>
|
||||
<Filename Value="RunGdbmi"/>
|
||||
@ -72,8 +75,6 @@
|
||||
</SearchPaths>
|
||||
<Linking>
|
||||
<Debugging>
|
||||
<GenerateDebugInfo Value="True"/>
|
||||
<DebugInfoType Value="dsAuto"/>
|
||||
<UseHeaptrc Value="True"/>
|
||||
</Debugging>
|
||||
</Linking>
|
||||
|
@ -28,29 +28,23 @@
|
||||
<FormatVersion Value="1"/>
|
||||
</local>
|
||||
</RunParams>
|
||||
<RequiredPackages Count="7">
|
||||
<RequiredPackages Count="5">
|
||||
<Item1>
|
||||
<PackageName Value="fpdebug"/>
|
||||
<PackageName Value="LazDebuggerGdbmi"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<PackageName Value="LogProfiler"/>
|
||||
</Item2>
|
||||
<Item3>
|
||||
<PackageName Value="LCLBase"/>
|
||||
<MinVersion Major="1" Release="1" Valid="True"/>
|
||||
</Item2>
|
||||
<Item3>
|
||||
<PackageName Value="FPCUnitTestRunner"/>
|
||||
</Item3>
|
||||
<Item4>
|
||||
<PackageName Value="ide"/>
|
||||
<PackageName Value="LCL"/>
|
||||
</Item4>
|
||||
<Item5>
|
||||
<PackageName Value="FPCUnitTestRunner"/>
|
||||
</Item5>
|
||||
<Item6>
|
||||
<PackageName Value="LCL"/>
|
||||
</Item6>
|
||||
<Item7>
|
||||
<PackageName Value="FCL"/>
|
||||
</Item7>
|
||||
</Item5>
|
||||
</RequiredPackages>
|
||||
<Units Count="13">
|
||||
<Unit0>
|
||||
|
@ -5,7 +5,7 @@ program TestGdbmi;
|
||||
uses
|
||||
Interfaces, Forms, GuiTestRunner, CompileHelpers, TestGdbType, TestInstructionQueue,
|
||||
TestDisAss, TestGDBMIControl, TestBase, TestException, Testwatches, TestBreakPoint,
|
||||
TestEnvironment, TestArgV, FpGdbmiDebugger;
|
||||
TestEnvironment, TestArgV;
|
||||
|
||||
{$R *.res}
|
||||
|
||||
|
@ -1,4 +1,10 @@
|
||||
// Comment
|
||||
//This is a sample config for the test
|
||||
//
|
||||
//This file contains the list of all fpc that should be tested
|
||||
//Entries start with a line in [] brackets, giving a name that is
|
||||
//displayed by the test.
|
||||
//There must be an entry starting with exe=
|
||||
//The symbols= line specifies, with which debug info this fpc should be tested.
|
||||
|
||||
[fpc 2.4.2]
|
||||
exe=c:\FPC\rel_2_4_2\bin\i386-win32\fpc.exe
|
||||
|
@ -1,5 +1,11 @@
|
||||
// Comment
|
||||
// Version is 3 pairs of 2 digits
|
||||
//This is a sample config for the test
|
||||
//
|
||||
//This file contains the list of all gdb that should be tested
|
||||
//Entries start with a line in [] brackets, giving a name that is
|
||||
//displayed by the test.
|
||||
//There must be an entry starting with exe=
|
||||
//The version is specified as one integer, made up from 3 pairs of 2 digits.
|
||||
//The symbols= line specifies, with which debug info this gdb should be tested.
|
||||
|
||||
[gdb 6.7.50]
|
||||
exe=C:\GDB\6.7.50\gdb.exe
|
||||
|
@ -6,7 +6,7 @@ interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ExtCtrls, EditBtn, StdCtrls,
|
||||
Buttons, CompileHelpers, TestBase, testregistry, fpcunit, GDBMIDebugger, Debugger, LCLIntf,
|
||||
Buttons, CompileHelpers, TestBase, testregistry, fpcunit, GDBMIDebugger, LCLIntf, DbgIntfDebuggerBase,
|
||||
CheckLst, Spin, CmdLineDebugger, strutils, math;
|
||||
|
||||
type
|
||||
@ -69,7 +69,7 @@ type
|
||||
TRunner = class(TGDBTestCase)
|
||||
private
|
||||
FTesting: Boolean;
|
||||
procedure dobrk(ADebugger: TDebugger; ABreakPoint: TBaseBreakPoint;
|
||||
procedure dobrk(ADebugger: TDebuggerIntf; ABreakPoint: TBaseBreakPoint;
|
||||
var ACanContinue: Boolean);
|
||||
published
|
||||
procedure DoDbgOut(Sender: TObject; const AText: String);
|
||||
@ -83,7 +83,7 @@ end;
|
||||
|
||||
{ TRunner }
|
||||
|
||||
procedure TRunner.dobrk(ADebugger: TDebugger; ABreakPoint: TBaseBreakPoint;
|
||||
procedure TRunner.dobrk(ADebugger: TDebuggerIntf; ABreakPoint: TBaseBreakPoint;
|
||||
var ACanContinue: Boolean);
|
||||
begin
|
||||
ACanContinue := False;
|
||||
|
@ -6,7 +6,7 @@ interface
|
||||
|
||||
uses
|
||||
SysUtils, fpcunit, testutils, testregistry, TestGDBMIControl,
|
||||
TestBase, Debugger, GDBMIDebugger, LCLProc, FileUtil, DbgIntfDebuggerBase, TestWatches;
|
||||
TestBase, GDBMIDebugger, LCLProc, FileUtil, DbgIntfDebuggerBase, TestWatches;
|
||||
|
||||
const
|
||||
BREAK_LINE_ARGV = 26;
|
||||
|
@ -5,9 +5,10 @@ unit TestBase;
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, FileUtil, fpcunit, testutils, testregistry, EnvironmentOpts,
|
||||
TransferMacros, LCLProc, LazLogger, DbgIntfDebuggerBase, CompileHelpers, Dialogs,
|
||||
ExtToolDialog, GDBMIDebugger, FpGdbmiDebugger;
|
||||
Classes, SysUtils, FileUtil, fpcunit, testutils, testregistry,
|
||||
LCLProc, LazLogger, DbgIntfDebuggerBase, CompileHelpers, Dialogs,
|
||||
GDBMIDebugger; // , FpGdbmiDebugger;
|
||||
// EnvironmentOpts, ExtToolDialog, TransferMacros,
|
||||
|
||||
(*
|
||||
fpclist.txt contains lines of format:
|
||||
@ -125,8 +126,6 @@ type
|
||||
procedure RequestData(AWatchValue: TWatchValue);
|
||||
end;
|
||||
|
||||
{ TIdeWatchesMonitor }
|
||||
|
||||
{ TTestWatchesMonitor }
|
||||
|
||||
TTestWatchesMonitor = class(TWatchesMonitor)
|
||||
@ -426,10 +425,10 @@ begin
|
||||
Result := TCompilerList.Create;
|
||||
if FileExists(ConfDir + 'fpclist.txt') then
|
||||
Result.LoadFromFile(ConfDir + 'fpclist.txt');
|
||||
if (Result.Count = 0) and (EnvironmentOptions.GetParsedCompilerFilename <> '') then begin
|
||||
Result.Add('fpc from conf', EnvironmentOptions.GetParsedCompilerFilename);
|
||||
Result.Add('fpc from conf -Xe', EnvironmentOptions.GetParsedCompilerFilename, '-Xe');
|
||||
end;
|
||||
//if (Result.Count = 0) and (EnvironmentOptions.GetParsedCompilerFilename <> '') then begin
|
||||
// Result.Add('fpc from conf', EnvironmentOptions.GetParsedCompilerFilename);
|
||||
// Result.Add('fpc from conf -Xe', EnvironmentOptions.GetParsedCompilerFilename, '-Xe');
|
||||
//end;
|
||||
Compilers := Result;
|
||||
end;
|
||||
|
||||
@ -440,8 +439,8 @@ begin
|
||||
Result := TDebuggerList.Create;
|
||||
if FileExists(ConfDir + 'gdblist.txt') then
|
||||
Result.LoadFromFile(ConfDir + 'gdblist.txt');
|
||||
if (Result.Count = 0) and (EnvironmentOptions.GetParsedDebuggerFilename <> '') then
|
||||
Result.Add('gdb from conf', EnvironmentOptions.GetParsedDebuggerFilename);
|
||||
//if (Result.Count = 0) and (EnvironmentOptions.GetParsedDebuggerFilename <> '') then
|
||||
// Result.Add('gdb from conf', EnvironmentOptions.GetParsedDebuggerFilename);
|
||||
Debuggers := Result;
|
||||
end;
|
||||
|
||||
@ -1514,20 +1513,20 @@ initialization
|
||||
AppDir := AppendPathDelim(AppDir + 'TestApps');
|
||||
|
||||
|
||||
EnvironmentOptions := TEnvironmentOptions.Create;
|
||||
with EnvironmentOptions do
|
||||
begin
|
||||
CreateConfig;
|
||||
Load(false);
|
||||
end;
|
||||
GlobalMacroList:=TTransferMacroList.Create;
|
||||
//EnvironmentOptions := TEnvironmentOptions.Create;
|
||||
//with EnvironmentOptions do
|
||||
//begin
|
||||
// CreateConfig;
|
||||
// Load(false);
|
||||
//end;
|
||||
//GlobalMacroList:=TTransferMacroList.Create;
|
||||
|
||||
BuildTestSuites;
|
||||
|
||||
finalization
|
||||
FreeAndNil(Compilers);
|
||||
FreeAndNil(Debuggers);
|
||||
FreeAndNil(EnvironmentOptions);
|
||||
//FreeAndNil(EnvironmentOptions);
|
||||
|
||||
end.
|
||||
|
||||
|
@ -6,7 +6,7 @@ interface
|
||||
|
||||
uses
|
||||
SysUtils, fpcunit, testutils, testregistry, TestGDBMIControl, DbgIntfBaseTypes,
|
||||
DbgIntfDebuggerBase, DbgIntfMiscClasses, TestBase, Debugger, GDBMIDebugger,
|
||||
DbgIntfDebuggerBase, DbgIntfMiscClasses, TestBase, GDBMIDebugger,
|
||||
LCLProc, TestWatches;
|
||||
|
||||
type
|
||||
|
@ -6,7 +6,7 @@ interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, fpcunit, testutils, testregistry, LCLProc,
|
||||
DbgIntfBaseTypes, DbgIntfDebuggerBase, GDBMIDebugger, Debugger, TestBase, DebugManager, maps;
|
||||
DbgIntfBaseTypes, DbgIntfDebuggerBase, GDBMIDebugger, TestBase, maps;
|
||||
|
||||
type
|
||||
TTestDisAssRegion = record
|
||||
|
@ -6,7 +6,7 @@ interface
|
||||
|
||||
uses
|
||||
SysUtils, fpcunit, testutils, testregistry, TestGDBMIControl,
|
||||
TestBase, Debugger, GDBMIDebugger, LCLProc, DbgIntfDebuggerBase, TestWatches;
|
||||
TestBase, GDBMIDebugger, LCLProc, DbgIntfDebuggerBase, TestWatches;
|
||||
|
||||
const
|
||||
BREAK_LINE_ENV1 = 10;
|
||||
|
@ -6,7 +6,7 @@ interface
|
||||
|
||||
uses
|
||||
Classes, fpcunit, testutils, testregistry, TestGDBMIControl,
|
||||
TestBase, Debugger, GDBMIDebugger, LCLProc, DbgIntfDebuggerBase;
|
||||
TestBase, GDBMIDebugger, LCLProc, DbgIntfDebuggerBase;
|
||||
|
||||
type
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user