mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-10 18:17:18 +02:00
Debugger: Started DebuggerIntf package
git-svn-id: trunk@44075 -
This commit is contained in:
parent
369d6dc630
commit
cbc3a550d8
7
.gitattributes
vendored
7
.gitattributes
vendored
@ -1109,6 +1109,13 @@ components/dbexport/tsqlexporter.xpm svneol=native#text/plain
|
||||
components/dbexport/tstandardexportformats.xpm svneol=native#text/plain
|
||||
components/dbexport/ttexexporter.xpm svneol=native#text/plain
|
||||
components/dbexport/txmlxsdexporter.xpm svneol=native#text/plain
|
||||
components/debuggerintf/Makefile svneol=native#text/plain
|
||||
components/debuggerintf/Makefile.fpc svneol=native#text/plain
|
||||
components/debuggerintf/dbgintfbasetypes.pas svneol=native#text/pascal
|
||||
components/debuggerintf/dbgintfdebuggerbase.pp svneol=native#text/pascal
|
||||
components/debuggerintf/dbgintfmiscclasses.pas svneol=native#text/pascal
|
||||
components/debuggerintf/debuggerintf.lpk svneol=native#text/plain
|
||||
components/debuggerintf/debuggerintf.pas svneol=native#text/pascal
|
||||
components/editortoolbar/editortoolbar.lpk svneol=native#text/plain
|
||||
components/editortoolbar/editortoolbar.pas svneol=native#text/plain
|
||||
components/editortoolbar/editortoolbar_impl.pas svneol=native#text/plain
|
||||
|
2719
components/debuggerintf/Makefile
Normal file
2719
components/debuggerintf/Makefile
Normal file
File diff suppressed because it is too large
Load Diff
55
components/debuggerintf/Makefile.fpc
Normal file
55
components/debuggerintf/Makefile.fpc
Normal file
@ -0,0 +1,55 @@
|
||||
# File generated automatically by Lazarus Package Manager
|
||||
#
|
||||
# Makefile.fpc for DebuggerIntf 0.0
|
||||
#
|
||||
# This file was generated on 14/02/2014
|
||||
|
||||
[package]
|
||||
name=debuggerintf
|
||||
version=0.0
|
||||
|
||||
[compiler]
|
||||
unittargetdir=lib/$(CPU_TARGET)-$(OS_TARGET)
|
||||
unitdir=../../packager/units/$(CPU_TARGET)-$(OS_TARGET) ../lazutils/lib/$(CPU_TARGET)-$(OS_TARGET) .
|
||||
options= -MObjFPC -Scghi -O1 -g -gl -vewnhi -l
|
||||
|
||||
[target]
|
||||
units=debuggerintf.pas
|
||||
|
||||
[clean]
|
||||
files=$(wildcard $(COMPILER_UNITTARGETDIR)/*$(OEXT)) \
|
||||
$(wildcard $(COMPILER_UNITTARGETDIR)/*$(PPUEXT)) \
|
||||
$(wildcard $(COMPILER_UNITTARGETDIR)/*$(RSTEXT)) \
|
||||
$(wildcard $(COMPILER_UNITTARGETDIR)/*.lfm) \
|
||||
$(wildcard $(COMPILER_UNITTARGETDIR)/*.res) \
|
||||
$(wildcard $(COMPILER_UNITTARGETDIR)/*.compiled) \
|
||||
$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))
|
||||
[prerules]
|
||||
# LCL Platform
|
||||
ifndef LCL_PLATFORM
|
||||
ifeq ($(OS_TARGET),win32)
|
||||
LCL_PLATFORM=win32
|
||||
else
|
||||
ifeq ($(OS_TARGET),win64)
|
||||
LCL_PLATFORM=win32
|
||||
else
|
||||
ifeq ($(OS_TARGET),darwin)
|
||||
LCL_PLATFORM=carbon
|
||||
else
|
||||
LCL_PLATFORM=gtk2
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
export LCL_PLATFORM
|
||||
|
||||
[rules]
|
||||
.PHONY: cleartarget compiled all
|
||||
|
||||
cleartarget:
|
||||
-$(DEL) $(COMPILER_UNITTARGETDIR)/debuggerintf$(PPUEXT)
|
||||
|
||||
compiled:
|
||||
$(CPPROG) -f Makefile.compiled $(COMPILER_UNITTARGETDIR)/DebuggerIntf.compiled
|
||||
|
||||
all: cleartarget $(COMPILER_UNITTARGETDIR) debuggerintf$(PPUEXT) compiled
|
21
components/debuggerintf/dbgintfbasetypes.pas
Normal file
21
components/debuggerintf/dbgintfbasetypes.pas
Normal file
@ -0,0 +1,21 @@
|
||||
unit DbgIntfBaseTypes;
|
||||
(* DebuggerTypes
|
||||
|
||||
Basic types for any Pascal debugger. (not just IDE)
|
||||
|
||||
*)
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils;
|
||||
|
||||
type
|
||||
// datatype pointing to data on the target
|
||||
TDBGPtr = QWord;
|
||||
|
||||
implementation
|
||||
|
||||
end.
|
||||
|
42
components/debuggerintf/dbgintfdebuggerbase.pp
Normal file
42
components/debuggerintf/dbgintfdebuggerbase.pp
Normal file
@ -0,0 +1,42 @@
|
||||
{ $Id: debugger.pp 43417 2013-11-10 23:32:18Z martin $ }
|
||||
{ -------------------------------------------
|
||||
DebuggerBase.pp - Debugger base classes
|
||||
-------------------------------------------
|
||||
|
||||
@author(Marc Weustink <marc@@dommelstein.net>)
|
||||
@author(Martin Friebe)
|
||||
|
||||
This unit contains the base class definitions of the debugger. These
|
||||
classes are only definitions. Implemented debuggers should be
|
||||
derived from these.
|
||||
|
||||
***************************************************************************
|
||||
* *
|
||||
* This source is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This code is distributed in the hope that it will be useful, but *
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||
* General Public License for more details. *
|
||||
* *
|
||||
* A copy of the GNU General Public License is available on the World *
|
||||
* Wide Web at <http://www.gnu.org/copyleft/gpl.html>. You can also *
|
||||
* obtain it by writing to the Free Software Foundation, *
|
||||
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
* *
|
||||
***************************************************************************
|
||||
}
|
||||
unit DbgIntfDebuggerBase;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
|
||||
implementation
|
||||
|
||||
|
||||
end.
|
141
components/debuggerintf/dbgintfmiscclasses.pas
Normal file
141
components/debuggerintf/dbgintfmiscclasses.pas
Normal file
@ -0,0 +1,141 @@
|
||||
unit DbgIntfMiscClasses;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils;
|
||||
|
||||
type
|
||||
|
||||
{ TDelayedUdateItem }
|
||||
|
||||
TDelayedUdateItem = class(TCollectionItem)
|
||||
private
|
||||
FUpdateCount: Integer;
|
||||
FDoChanged: Boolean;
|
||||
protected
|
||||
procedure Changed;
|
||||
procedure DoChanged; virtual;
|
||||
procedure DoEndUpdate; virtual; // even if not changed
|
||||
public
|
||||
procedure Assign(ASource: TPersistent); override;
|
||||
procedure BeginUpdate;
|
||||
constructor Create(ACollection: TCollection); override;
|
||||
procedure EndUpdate;
|
||||
function IsUpdating: Boolean;
|
||||
end;
|
||||
|
||||
{ TRefCountedColectionItem }
|
||||
|
||||
TRefCountedColectionItem = class(TDelayedUdateItem)
|
||||
public
|
||||
constructor Create(ACollection: TCollection); override;
|
||||
destructor Destroy; override;
|
||||
procedure AddReference;
|
||||
procedure ReleaseReference;
|
||||
private
|
||||
FRefCount: Integer;
|
||||
protected
|
||||
procedure DoFree; virtual;
|
||||
property RefCount: Integer read FRefCount;
|
||||
end;
|
||||
|
||||
|
||||
implementation
|
||||
|
||||
|
||||
{ TDelayedUdateItem }
|
||||
|
||||
procedure TDelayedUdateItem.Assign(ASource: TPersistent);
|
||||
begin
|
||||
BeginUpdate;
|
||||
try
|
||||
inherited Assign(ASource);
|
||||
finally
|
||||
EndUpdate;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TDelayedUdateItem.BeginUpdate;
|
||||
begin
|
||||
Inc(FUpdateCount);
|
||||
if FUpdateCount = 1 then FDoChanged := False;
|
||||
end;
|
||||
|
||||
procedure TDelayedUdateItem.Changed;
|
||||
begin
|
||||
if FUpdateCount > 0
|
||||
then FDoChanged := True
|
||||
else DoChanged;
|
||||
end;
|
||||
|
||||
constructor TDelayedUdateItem.Create(ACollection: TCollection);
|
||||
begin
|
||||
inherited Create(ACollection);
|
||||
FUpdateCount := 0;
|
||||
end;
|
||||
|
||||
procedure TDelayedUdateItem.DoChanged;
|
||||
begin
|
||||
inherited Changed(False);
|
||||
end;
|
||||
|
||||
procedure TDelayedUdateItem.DoEndUpdate;
|
||||
begin
|
||||
//
|
||||
end;
|
||||
|
||||
procedure TDelayedUdateItem.EndUpdate;
|
||||
begin
|
||||
Dec(FUpdateCount);
|
||||
if FUpdateCount < 0 then raise EInvalidOperation.Create('TDelayedUdateItem.EndUpdate');
|
||||
if (FUpdateCount = 0)
|
||||
then DoEndUpdate;
|
||||
if (FUpdateCount = 0) and FDoChanged
|
||||
then begin
|
||||
DoChanged;
|
||||
FDoChanged := False;
|
||||
end;
|
||||
end;
|
||||
|
||||
function TDelayedUdateItem.IsUpdating: Boolean;
|
||||
begin
|
||||
Result := FUpdateCount > 0;
|
||||
end;
|
||||
|
||||
|
||||
{ TRefCountedColectionItem }
|
||||
|
||||
constructor TRefCountedColectionItem.Create(ACollection: TCollection);
|
||||
begin
|
||||
FRefCount := 0;
|
||||
inherited Create(ACollection);
|
||||
end;
|
||||
|
||||
destructor TRefCountedColectionItem.Destroy;
|
||||
begin
|
||||
Assert(FRefcount = 0, 'Destroying referenced object');
|
||||
inherited Destroy;
|
||||
end;
|
||||
|
||||
procedure TRefCountedColectionItem.AddReference;
|
||||
begin
|
||||
Inc(FRefcount);
|
||||
end;
|
||||
|
||||
procedure TRefCountedColectionItem.ReleaseReference;
|
||||
begin
|
||||
Assert(FRefCount > 0, 'TRefCountedObject.ReleaseReference RefCount > 0');
|
||||
Dec(FRefCount);
|
||||
if FRefCount = 0 then DoFree;
|
||||
end;
|
||||
|
||||
procedure TRefCountedColectionItem.DoFree;
|
||||
begin
|
||||
Self.Free;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
57
components/debuggerintf/debuggerintf.lpk
Normal file
57
components/debuggerintf/debuggerintf.lpk
Normal file
@ -0,0 +1,57 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<CONFIG>
|
||||
<Package Version="4">
|
||||
<PathDelim Value="\"/>
|
||||
<Name Value="DebuggerIntf"/>
|
||||
<Author Value="Lazarus Team"/>
|
||||
<CompilerOptions>
|
||||
<Version Value="11"/>
|
||||
<PathDelim Value="\"/>
|
||||
<SearchPaths>
|
||||
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<Other>
|
||||
<CompilerMessages>
|
||||
<MsgFileName Value=""/>
|
||||
</CompilerMessages>
|
||||
<CompilerPath Value="$(CompPath)"/>
|
||||
</Other>
|
||||
</CompilerOptions>
|
||||
<Description Value="DebuggerIntf
|
||||
|
||||
Provides an interface to add debuggers to the IDE"/>
|
||||
<License Value="GPL"/>
|
||||
<Files Count="3">
|
||||
<Item1>
|
||||
<Filename Value="dbgintfbasetypes.pas"/>
|
||||
<UnitName Value="dbgintfbasetypes"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<Filename Value="dbgintfdebuggerbase.pp"/>
|
||||
<UnitName Value="DbgIntfDebuggerBase"/>
|
||||
</Item2>
|
||||
<Item3>
|
||||
<Filename Value="dbgintfmiscclasses.pas"/>
|
||||
<UnitName Value="DbgIntfMiscClasses"/>
|
||||
</Item3>
|
||||
</Files>
|
||||
<Type Value="DesignTime"/>
|
||||
<RequiredPkgs Count="2">
|
||||
<Item1>
|
||||
<PackageName Value="LazUtils"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<PackageName Value="FCL"/>
|
||||
</Item2>
|
||||
</RequiredPkgs>
|
||||
<UsageOptions>
|
||||
<UnitPath Value="$(PkgOutDir)"/>
|
||||
</UsageOptions>
|
||||
<PublishOptions>
|
||||
<Version Value="2"/>
|
||||
</PublishOptions>
|
||||
<CustomOptions Items="ExternHelp" Version="2">
|
||||
<_ExternHelp Items="Count"/>
|
||||
</CustomOptions>
|
||||
</Package>
|
||||
</CONFIG>
|
20
components/debuggerintf/debuggerintf.pas
Normal file
20
components/debuggerintf/debuggerintf.pas
Normal file
@ -0,0 +1,20 @@
|
||||
{ This file was automatically created by Lazarus. Do not edit!
|
||||
This source is only used to compile and install the package.
|
||||
}
|
||||
|
||||
unit DebuggerIntf;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
DbgIntfBaseTypes, DbgIntfDebuggerBase, DbgIntfMiscClasses, LazarusPackageIntf;
|
||||
|
||||
implementation
|
||||
|
||||
procedure Register;
|
||||
begin
|
||||
end;
|
||||
|
||||
initialization
|
||||
RegisterPackage('DebuggerIntf', @Register);
|
||||
end.
|
Loading…
Reference in New Issue
Block a user