mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-15 08:43:14 +02:00
FpDebug: allow calling functions from function-pointer variables. (Not yet method variables)
This commit is contained in:
parent
9569f7beff
commit
57da4cd7fd
@ -1197,9 +1197,12 @@ begin
|
|||||||
Result := InvalidLoc;
|
Result := InvalidLoc;
|
||||||
if (FDataSymbol = nil) then
|
if (FDataSymbol = nil) then
|
||||||
exit;
|
exit;
|
||||||
assert(FDataSymbol is TFpSymbolDwarfDataProc, 'TFpValueDwarfSubroutine.GetEntryPCAddress: FDataSymbol is TFpSymbolDwarfDataProc');
|
if FDataSymbol is TFpSymbolDwarfDataProc then begin
|
||||||
if not TFpSymbolDwarfDataProc(FDataSymbol).GetEntryPCAddress(Self, Result) then
|
if not TFpSymbolDwarfDataProc(FDataSymbol).GetEntryPCAddress(Self, Result) then
|
||||||
Result := InvalidLoc;
|
Result := InvalidLoc;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
Result := DataAddress;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TFpDwarfDefaultSymbolClassMap }
|
{ TFpDwarfDefaultSymbolClassMap }
|
||||||
|
@ -1654,7 +1654,7 @@ begin
|
|||||||
if (tmp = nil) or (not Expression.Valid) then
|
if (tmp = nil) or (not Expression.Valid) then
|
||||||
exit;
|
exit;
|
||||||
|
|
||||||
if (tmp.DbgSymbol <> nil) and (tmp.DbgSymbol.Kind = skFunction) then begin
|
if (tmp.DbgSymbol <> nil) and (tmp.DbgSymbol.Kind in [skFunction, skFunctionRef]) then begin
|
||||||
if not Assigned(Expression.OnFunctionCall) then begin
|
if not Assigned(Expression.OnFunctionCall) then begin
|
||||||
SetError('calling functions not allowed');
|
SetError('calling functions not allowed');
|
||||||
exit;
|
exit;
|
||||||
|
Loading…
Reference in New Issue
Block a user