mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-02 07:22:03 +02:00
Merge branch 'fpd1' into 'main'
Fix compilation of fpdebug\app\fpd See merge request freepascal.org/lazarus/lazarus!49
This commit is contained in:
commit
b03c9ccbb7
@ -37,6 +37,9 @@ program fpd;
|
||||
{$mode objfpc}{$H+}
|
||||
{$APPTYPE CONSOLE}
|
||||
uses
|
||||
{$ifdef unix}
|
||||
cthreads,
|
||||
{$endif}
|
||||
SysUtils,
|
||||
CustApp,
|
||||
{$ifdef windows}
|
||||
@ -82,12 +85,6 @@ begin
|
||||
WriteLn('Copyright (c) 2006-2009 by Marc Weustink');
|
||||
WriteLN('starting....');
|
||||
|
||||
if ParamCount > 0
|
||||
then begin
|
||||
GController.ExecutableFilename := ParamStr(1);
|
||||
WriteLN('Using file: ', GController.ExecutableFilename);
|
||||
end;
|
||||
|
||||
{$ifdef windows}
|
||||
SetConsoleCtrlHandler(@CtrlCHandler, True);
|
||||
{$endif}
|
||||
@ -97,4 +94,3 @@ begin
|
||||
SetConsoleCtrlHandler(@CtrlCHandler, False);
|
||||
{$endif}
|
||||
end.
|
||||
|
||||
|
@ -50,8 +50,4 @@ var
|
||||
|
||||
implementation
|
||||
|
||||
initialization
|
||||
GController := TDbgController.Create;
|
||||
finalization
|
||||
GController.Free;
|
||||
end.
|
||||
|
@ -70,7 +70,8 @@ implementation
|
||||
uses
|
||||
FPDCommand,
|
||||
FpDbgUtil,
|
||||
FPDGlobal;
|
||||
FPDGlobal,
|
||||
FPDbgController;
|
||||
|
||||
type
|
||||
|
||||
@ -119,7 +120,7 @@ end;
|
||||
|
||||
procedure TFPDLoop.GControllerDebugInfoLoaded(Sender: TObject);
|
||||
begin
|
||||
TFpDwarfInfo(GController.CurrentProcess.DbgInfo).MemManager := FMemManager;
|
||||
|
||||
end;
|
||||
|
||||
procedure TFPDLoop.ShowDisas;
|
||||
@ -264,6 +265,14 @@ begin
|
||||
FMemReader := TPDDbgMemReader.Create;
|
||||
FMemConvertor := TFpDbgMemConvertorLittleEndian.Create;
|
||||
FMemManager := TFpDbgMemManager.Create(FMemReader, FMemConvertor);
|
||||
GController := TDbgController.Create(FMemManager);
|
||||
|
||||
if ParamCount > 0
|
||||
then begin
|
||||
GController.ExecutableFilename := ParamStr(1);
|
||||
WriteLN('Using file: ', GController.ExecutableFilename);
|
||||
end;
|
||||
|
||||
//TODO: Maybe DebugLogger.OnLog ....
|
||||
//GController.OnLog:=@OnLog;
|
||||
GController.OnHitBreakpointEvent:=@GControllerHitBreakpointEvent;
|
||||
@ -278,6 +287,7 @@ begin
|
||||
FMemManager.Free;
|
||||
FMemReader.Free;
|
||||
FMemConvertor.Free;
|
||||
GController.Free;
|
||||
inherited Destroy;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user