mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-06 14:58:13 +02:00
Moved TXmlConfStringList from gdbmidebugger to DebuggerPropertiesBase to share this property class between gdbmidebugger and fpdebugdebugger.
This commit is contained in:
parent
1391c8cb7d
commit
cbff56be77
@ -332,7 +332,7 @@ begin
|
||||
New(p);
|
||||
P^.Offs := fs.FileOfs;
|
||||
p^.Sect.Size := fs.Size;
|
||||
p^.Sect.VirtualAddress := 0; // Todo? fs.Address - ImageBase
|
||||
p^.Sect.VirtualAddress := fs.Address; //0; // Todo? fs.Address - ImageBase
|
||||
p^.Loaded := False;
|
||||
FSections.Objects[idx] := TObject(p);
|
||||
end;
|
||||
|
@ -63,6 +63,8 @@ uses
|
||||
BaseIDEIntf, PropEdits, MacroIntf,
|
||||
// DebuggerIntf
|
||||
DbgIntfBaseTypes, DbgIntfDebuggerBase,
|
||||
// CmdLineDebuggerBase
|
||||
DebuggerPropertiesBase,
|
||||
{$IFDEF DBG_ENABLE_TERMINAL}
|
||||
DbgIntfPseudoTerminal,
|
||||
{$ENDIF}
|
||||
@ -166,23 +168,6 @@ type
|
||||
|
||||
TInternBrkSetMethod = (ibmAddrIndirect, ibmAddrDirect, ibmName);
|
||||
|
||||
{ TXmlConfStringList }
|
||||
|
||||
TXmlConfStringList = class(TStringList)
|
||||
private
|
||||
function TextStored: boolean;
|
||||
published
|
||||
property Text stored TextStored;
|
||||
end;
|
||||
|
||||
{ TXmlConfStringsPropertyEditor }
|
||||
|
||||
TXmlConfStringsPropertyEditor = class(TStringsPropertyEditor)
|
||||
public
|
||||
function GetValue: ansistring; override;
|
||||
end;
|
||||
|
||||
|
||||
{ TGDBMIDebuggerGdbEventPropertiesBase }
|
||||
|
||||
TGDBMIDebuggerGdbEventPropertiesBase = class(TDebuggerProperties)
|
||||
@ -1841,28 +1826,6 @@ begin
|
||||
then Result := 2;
|
||||
end;
|
||||
|
||||
{ TXmlConfStringsPropertyEditor }
|
||||
|
||||
function TXmlConfStringsPropertyEditor.GetValue: ansistring;
|
||||
var
|
||||
s: TStrings;
|
||||
i: Integer;
|
||||
begin
|
||||
Result := '';
|
||||
s := TStrings(GetObjectValue);
|
||||
for i := 0 to s.Count - 1 do begin
|
||||
if i > 0 then Result := Result + ' / ';
|
||||
Result := Result + s[i];
|
||||
end;
|
||||
end;
|
||||
|
||||
{ TXmlConfStringList }
|
||||
|
||||
function TXmlConfStringList.TextStored: boolean;
|
||||
begin
|
||||
Result := Text <> '';
|
||||
end;
|
||||
|
||||
{ TGDBMIDebuggerGdbEventPropertiesBase }
|
||||
|
||||
procedure TGDBMIDebuggerGdbEventPropertiesBase.SetAfterInit(
|
||||
@ -14801,6 +14764,4 @@ initialization
|
||||
DBG_DISASSEMBLER := DebugLogger.FindOrRegisterLogGroup('DBG_DISASSEMBLER' {$IFDEF DBG_DISASSEMBLER} , True {$ENDIF} );
|
||||
DBG_THREAD_AND_FRAME := DebugLogger.FindOrRegisterLogGroup('DBG_THREAD_AND_FRAME' {$IFDEF DBG_THREAD_AND_FRAME} , True {$ENDIF} );
|
||||
|
||||
RegisterPropertyEditor(TypeInfo(TXmlConfStringList), nil, '', TXmlConfStringsPropertyEditor);
|
||||
|
||||
end.
|
||||
|
@ -34,6 +34,8 @@ uses
|
||||
Classes, sysutils, UTF8Process, Process, LazFileUtils, MacroIntf,
|
||||
// DebuggerIntf
|
||||
DbgIntfDebuggerBase,
|
||||
// CmdLineDebuggerBase
|
||||
DebuggerPropertiesBase,
|
||||
// LazDebuggerGdbmi
|
||||
GDBMIDebugger, GDBMIMiscClasses, GdbmiStringConstants;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<CONFIG>
|
||||
<Package Version="4">
|
||||
<Package Version="5">
|
||||
<PathDelim Value="\"/>
|
||||
<Name Value="LazDebuggerGdbmi"/>
|
||||
<Type Value="RunAndDesignTime"/>
|
||||
@ -17,7 +17,7 @@
|
||||
</CompilerOptions>
|
||||
<Description Value="Debugger for Lazarus IDE.
|
||||
|
||||
This debugger uses gdb and is based on gdb's mi interface."/>
|
||||
This debugger uses gdb and is based on gdb's mi interface."/>
|
||||
<License Value="GPL"/>
|
||||
<Version Minor="1"/>
|
||||
<Files Count="9">
|
||||
@ -61,13 +61,14 @@ This debugger uses gdb and is based on gdb's mi interface."/>
|
||||
<UnitName Value="GdbmiStringConstants"/>
|
||||
</Item9>
|
||||
</Files>
|
||||
<CompatibilityMode Value="True"/>
|
||||
<i18n>
|
||||
<EnableI18N Value="True"/>
|
||||
<OutDir Value="languages"/>
|
||||
</i18n>
|
||||
<RequiredPkgs Count="2">
|
||||
<Item1>
|
||||
<PackageName Value="IDEIntf"/>
|
||||
<PackageName Value="CmdLineDebuggerBase"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<PackageName Value="DebuggerIntf"/>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<CONFIG>
|
||||
<Package Version="4">
|
||||
<Package Version="5">
|
||||
<PathDelim Value="\"/>
|
||||
<Name Value="CmdLineDebuggerBase"/>
|
||||
<Type Value="RunAndDesignTime"/>
|
||||
@ -14,7 +14,7 @@
|
||||
<CustomOptions Value="$(IDEBuildOptions)"/>
|
||||
</Other>
|
||||
</CompilerOptions>
|
||||
<Files Count="2">
|
||||
<Files Count="3">
|
||||
<Item1>
|
||||
<Filename Value="debugprocess.pas"/>
|
||||
<UnitName Value="DebugProcess"/>
|
||||
@ -23,14 +23,22 @@
|
||||
<Filename Value="debuginstructions.pas"/>
|
||||
<UnitName Value="DebugInstructions"/>
|
||||
</Item2>
|
||||
<Item3>
|
||||
<Filename Value="debuggerpropertiesbase.pas"/>
|
||||
<UnitName Value="DebuggerPropertiesBase"/>
|
||||
</Item3>
|
||||
</Files>
|
||||
<RequiredPkgs Count="2">
|
||||
<CompatibilityMode Value="True"/>
|
||||
<RequiredPkgs Count="3">
|
||||
<Item1>
|
||||
<PackageName Value="LCLBase"/>
|
||||
<PackageName Value="IDEIntf"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<PackageName Value="FCL"/>
|
||||
<PackageName Value="LCLBase"/>
|
||||
</Item2>
|
||||
<Item3>
|
||||
<PackageName Value="FCL"/>
|
||||
</Item3>
|
||||
</RequiredPkgs>
|
||||
<UsageOptions>
|
||||
<UnitPath Value="$(PkgOutDir)"/>
|
||||
|
@ -8,7 +8,7 @@ unit CmdLineDebuggerBase;
|
||||
interface
|
||||
|
||||
uses
|
||||
DebugProcess, DebugInstructions, LazarusPackageIntf;
|
||||
DebugProcess, DebugInstructions, DebuggerPropertiesBase, LazarusPackageIntf;
|
||||
|
||||
implementation
|
||||
|
||||
|
@ -0,0 +1,55 @@
|
||||
unit DebuggerPropertiesBase;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, PropEdits;
|
||||
|
||||
type
|
||||
{ TXmlConfStringList }
|
||||
|
||||
TXmlConfStringList = class(TStringList)
|
||||
private
|
||||
function TextStored: boolean;
|
||||
published
|
||||
property Text stored TextStored;
|
||||
end;
|
||||
|
||||
{ TXmlConfStringsPropertyEditor }
|
||||
|
||||
TXmlConfStringsPropertyEditor = class(TStringsPropertyEditor)
|
||||
public
|
||||
function GetValue: ansistring; override;
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
{ TXmlConfStringList }
|
||||
|
||||
function TXmlConfStringList.TextStored: boolean;
|
||||
begin
|
||||
Result := Text <> '';
|
||||
end;
|
||||
|
||||
{ TXmlConfStringsPropertyEditor }
|
||||
|
||||
function TXmlConfStringsPropertyEditor.GetValue: ansistring;
|
||||
var
|
||||
s: TStrings;
|
||||
i: Integer;
|
||||
begin
|
||||
Result := '';
|
||||
s := TStrings(GetObjectValue);
|
||||
for i := 0 to s.Count - 1 do begin
|
||||
if i > 0 then Result := Result + ' / ';
|
||||
Result := Result + s[i];
|
||||
end;
|
||||
end;
|
||||
|
||||
initialization
|
||||
RegisterPropertyEditor(TypeInfo(TXmlConfStringList), nil, '', TXmlConfStringsPropertyEditor);
|
||||
|
||||
end.
|
||||
|
@ -38,6 +38,9 @@
|
||||
</Item>
|
||||
</Files>
|
||||
<RequiredPkgs>
|
||||
<Item>
|
||||
<PackageName Value="CmdLineDebuggerBase"/>
|
||||
</Item>
|
||||
<Item>
|
||||
<PackageName Value="fpdebug"/>
|
||||
</Item>
|
||||
|
Loading…
Reference in New Issue
Block a user