mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-30 04:51:24 +02:00
FPDebug: more Value handling / pointers
git-svn-id: trunk@43886 -
This commit is contained in:
parent
3ab0ac8feb
commit
64b56efefb
@ -1918,6 +1918,9 @@ end;
|
||||
function TDbgDwarfNumericSymbolValue.CanUseTypeCastAddress: Boolean;
|
||||
begin
|
||||
Result := True;
|
||||
if (FTypeCastSource.FieldFlags * [svfAddress, svfSize, svfSizeOfPointer] = [svfAddress]) then
|
||||
exit
|
||||
else
|
||||
if (FTypeCastSource.FieldFlags * [svfAddress, svfSize] = [svfAddress, svfSize]) and
|
||||
(FTypeCastSource.Size = FSize)
|
||||
then
|
||||
|
@ -590,7 +590,7 @@ begin
|
||||
FSigned := ASigned;
|
||||
end;
|
||||
|
||||
{ TPasParserTypeCastSymbolValue }
|
||||
{ TPasParserWrapperSymbolValue }
|
||||
|
||||
function TPasParserWrapperSymbolValue.GetKind: TDbgSymbolKind;
|
||||
begin
|
||||
@ -1698,13 +1698,17 @@ begin
|
||||
else
|
||||
if tmp.Kind = skPointer then begin
|
||||
if (svfDataAddress in tmp.FieldFlags) and (tmp.DataAddress <> 0) and
|
||||
(tmp.TypeInfo <> nil) and (tmp.TypeInfo.TypeInfo <> nil)
|
||||
(tmp.TypeInfo <> nil) //and (tmp.TypeInfo.TypeInfo <> nil)
|
||||
then begin
|
||||
//TODO: maybe introduce a method TypeCastFromAddress, so we can skip the twp2 object
|
||||
tmp2 := TPasParserDerefPointerSymbolValue.Create(tmp);
|
||||
Result := tmp.TypeInfo.TypeInfo.TypeCastValue(tmp2);
|
||||
if (tmp.TypeInfo.TypeInfo <> nil) then
|
||||
Result := tmp.TypeInfo.TypeInfo.TypeCastValue(tmp2)
|
||||
else
|
||||
Result := tmp2;
|
||||
{$IFDEF WITH_REFCOUNT_DEBUG} if Result <> nil then Result.DbgRenameReference(nil, 'DoGetResultValue'){$ENDIF};
|
||||
tmp2.ReleaseReference;
|
||||
if (tmp.TypeInfo.TypeInfo <> nil) then
|
||||
tmp2.ReleaseReference;
|
||||
end;
|
||||
end
|
||||
//if tmp.Kind = skArray then // dynarray
|
||||
|
@ -427,7 +427,14 @@ begin
|
||||
ExpResult(svfInteger, -299);
|
||||
ExpFlags([svfInteger, svfOrdinal, svfAddress], [svfDataAddress]); // svfSize;
|
||||
|
||||
// TODO Integer(pointer(pi)^)
|
||||
StartTest('LongInt(pointer(pi)^)', skInteger, [ttHasType]);
|
||||
ExpResult(svfInteger, -299);
|
||||
ExpFlags([svfInteger, svfOrdinal, svfAddress], [svfDataAddress]); // svfSize;
|
||||
|
||||
StartTest('LongInt(GlobTestSetup1Pointer^)', skInteger, [ttHasType]);
|
||||
ExpResult(svfInteger, -299);
|
||||
ExpFlags([svfInteger, svfOrdinal, svfAddress], [svfDataAddress]); // svfSize;
|
||||
|
||||
|
||||
///////////////////////////
|
||||
finally
|
||||
|
Loading…
Reference in New Issue
Block a user