FpDebug, apps: Compilation fixes

git-svn-id: trunk@63785 -
This commit is contained in:
martin 2020-08-18 23:12:48 +00:00
parent 1ba76474e3
commit d8007187b8
2 changed files with 10 additions and 7 deletions

View File

@ -105,7 +105,7 @@ type
FBreakPointIdCnt: Integer;
FBreakPointIdMap: TBreakPointIdMap;
public
constructor Create; override;
constructor Create(AMemManager: TFpDbgMemManager); override;
destructor Destroy; override;
function AddInternalBreakPointToId(ABrkPoint: TFpInternalBreakpoint): Integer;
function GetInternalBreakPointFromId(AnId: Integer): TFpDbgBreakpoint;
@ -243,11 +243,11 @@ begin
Result := PPointer(Key1)^ - PPointer(Key1)^;
end;
constructor TFpServerDbgController.Create;
constructor TFpServerDbgController.Create(AMemManager: TFpDbgMemManager);
begin
FBreakPointIdMap := TBreakPointIdMap.Create;
FBreakPointIdMap.OnDataPtrCompare := @DoBreakPointCompare;
inherited Create;
inherited Create(AMemManager);
end;
destructor TFpServerDbgController.Destroy;
@ -416,7 +416,7 @@ end;
procedure TFpDebugThread.FControllerDebugInfoLoaded(Sender: TObject);
begin
TFpDwarfInfo(FController.CurrentProcess.DbgInfo).MemManager := FMemManager;
//TFpDwarfInfo(FController.CurrentProcess.DbgInfo).MemManager := FMemManager;
end;
procedure TFpDebugThread.FreeConsoleOutputThread;
@ -493,7 +493,7 @@ var
ARunLoop: boolean;
AnEvent: TFpDebugEvent;
begin
FController := TFpServerDbgController.Create;
FController := TFpServerDbgController.Create(FMemManager);
FController.RedirectConsoleOutput:=true;
FController.OnCreateProcessEvent:=@FControllerCreateProcessEvent;
FController.OnProcessExitEvent:=@FControllerProcessExitEvent;

View File

@ -610,6 +610,7 @@ function TFpDebugThreadStackTraceCommand.Execute(AController: TFpServerDbgContro
var
ThreadCallStack: TDbgCallstackEntryList;
i: integer;
PrettyPrinter: TFpPascalPrettyPrinter;
begin
result := false;
DoProcessLoop:=false;
@ -622,11 +623,12 @@ begin
AController.CurrentProcess.MainThread.PrepareCallStackEntryList;
ThreadCallStack := AController.CurrentProcess.MainThread.CallStackEntryList;
SetLength(FStackEntryArray, ThreadCallStack.Count);
PrettyPrinter := TFpPascalPrettyPrinter.Create(sizeof(pointer));
for i := 0 to ThreadCallStack.Count-1 do
begin
FStackEntryArray[i].AnAddress:=ThreadCallStack[i].AnAddress;
FStackEntryArray[i].FrameAdress:=ThreadCallStack[i].FrameAdress;
FStackEntryArray[i].FunctionName:=ThreadCallStack[i].FunctionName+ThreadCallStack[i].GetParamsAsString;
FStackEntryArray[i].FunctionName:=ThreadCallStack[i].FunctionName+ThreadCallStack[i].GetParamsAsString(PrettyPrinter);
FStackEntryArray[i].Line:=ThreadCallStack[i].Line;
FStackEntryArray[i].SourceFile:=ThreadCallStack[i].SourceFile;
end;
@ -634,6 +636,7 @@ begin
// cumbersome. And the chances that this command is called twice, so that
// caching the result is usefull, are slim.
AController.CurrentProcess.MainThread.ClearCallStack;
PrettyPrinter.Free;
result := true;
end;
@ -683,7 +686,7 @@ begin
end;
Result := True;
AContext.MemManager.DefaultContext := AContext;
AContext.MemManager.DefaultContext := AContext.LocationContext;
APasExpr := TFpPascalExpression.Create(FExpression, AContext);
try
APasExpr.ResultValue; // trigger full validation