FpDebug: Test, fix compile

git-svn-id: trunk@63776 -
This commit is contained in:
martin 2020-08-18 11:37:52 +00:00
parent f2959d4c98
commit 633b2735dd
2 changed files with 14 additions and 7 deletions

View File

@ -289,6 +289,14 @@ begin
TestExpr([2], TFpPascalExpressionPartIdentifier, 'b', 0);
TestExpr([3], TFpPascalExpressionPartIdentifier, 'c', 0);
CreateExpr('f(x(a),b)', True);
TestExpr([], TFpPascalExpressionPartBracketArgumentList, '(', 3);
TestExpr([0], TFpPascalExpressionPartIdentifier, 'f', 0);
TestExpr([1], TFpPascalExpressionPartBracketArgumentList, '(', 2);
TestExpr([1,0], TFpPascalExpressionPartIdentifier, 'x', 0);
TestExpr([1,1], TFpPascalExpressionPartIdentifier, 'a', 0);
TestExpr([2], TFpPascalExpressionPartIdentifier, 'b', 0);
CreateExpr('f(,)', False);
CreateExpr('f(,,)', False);
CreateExpr('f(a,)', False);

View File

@ -338,8 +338,7 @@ begin
FImageLoaderList.Add(FImageLoader);
FMemReader := TTestMemReader.Create;
FMemManager := TFpDbgMemManager.Create(FMemReader, TFpDbgMemConvertorLittleEndian.Create);
FDwarfInfo := TFpDwarfInfo.Create(FImageLoaderList);
FDwarfInfo.MemManager := FMemManager;
FDwarfInfo := TFpDwarfInfo.Create(FImageLoaderList, FMemManager);
FDwarfInfo.LoadCompilationUnits;
end;
@ -380,7 +379,7 @@ begin
//FMemReader.RegisterValues[5] := TDbgPtr(@ImgLoader.TestStackFrame.EndPoint);
FCurrentContext := FDwarfInfo.FindContext(TTestSetupBasicProcMainAddr);
FCurrentContext := FDwarfInfo.FindContext(0, 0, TTestSetupBasicProcMainAddr);
AssertTrue('got ctx', FCurrentContext <> nil);
sym := FCurrentContext.FindSymbol('VarEnum0');
@ -430,7 +429,7 @@ begin
//FMemReader.RegisterValues[5] := TDbgPtr(@ImgLoader.TestStackFrame.EndPoint);
FCurrentContext := FDwarfInfo.FindContext(TTestSetupBasicProcMainAddr);
FCurrentContext := FDwarfInfo.FindContext(0, 0, TTestSetupBasicProcMainAddr);
AssertTrue('got ctx', FCurrentContext <> nil);
sym := FCurrentContext.FindSymbol('VarEnum0');
@ -494,7 +493,7 @@ begin
ImgLoader := TTestLoaderSetupArray(FImageLoader);
//FMemReader.RegisterValues[5] := TDbgPtr(@ImgLoader.TestStackFrame.EndPoint);
FCurrentContext := FDwarfInfo.FindContext(TTestSetupArrayProcMainAddr);
FCurrentContext := FDwarfInfo.FindContext(0, 0, TTestSetupArrayProcMainAddr);
AssertTrue('got ctx', FCurrentContext <> nil);
sym := FCurrentContext.FindSymbol('VarDynIntArray');
@ -599,7 +598,7 @@ begin
ImgLoader.TestStackFrame.Int1 := -299;
ImgLoader.TestStackFrame.Obj1 := obj1;
try
FCurrentContext := FDwarfInfo.FindContext(TTestSetup1ProcBarAddr);
FCurrentContext := FDwarfInfo.FindContext(0, 0, TTestSetup1ProcBarAddr);
AssertTrue('got ctx', FCurrentContext <> nil);
sym := FCurrentContext.FindSymbol('Int1');
@ -1251,7 +1250,7 @@ begin
//FMemReader.RegisterValues[5] := TDbgPtr(@ImgLoader.TestStackFrame.EndPoint);
FCurrentContext := FDwarfInfo.FindContext(TTestSetupBasicProcMainAddr);
FCurrentContext := FDwarfInfo.FindContext(0, 0, TTestSetupBasicProcMainAddr);
AssertTrue('got ctx', FCurrentContext <> nil);
sym := FCurrentContext.FindSymbol('VarEnum0');