mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-24 13:19:18 +02:00
LazDebuggerFpLldb: Add option for IntrinsicPrefix and "modeswitch AutoDeref" .
This commit is contained in:
parent
1f70742be3
commit
315be6c5e1
@ -157,6 +157,8 @@ type
|
|||||||
|
|
||||||
TFpLldbDebuggerProperties = class(TLldbDebuggerProperties)
|
TFpLldbDebuggerProperties = class(TLldbDebuggerProperties)
|
||||||
private
|
private
|
||||||
|
FAutoDeref: Boolean;
|
||||||
|
FIntrinsicPrefix: TFpIntrinsicPrefix;
|
||||||
FMemLimits: TFpLldbDebugDebuggerPropertiesMemLimits;
|
FMemLimits: TFpLldbDebugDebuggerPropertiesMemLimits;
|
||||||
procedure SetMemLimits(AValue: TFpLldbDebugDebuggerPropertiesMemLimits);
|
procedure SetMemLimits(AValue: TFpLldbDebugDebuggerPropertiesMemLimits);
|
||||||
public
|
public
|
||||||
@ -165,6 +167,8 @@ type
|
|||||||
procedure Assign(Source: TPersistent); override;
|
procedure Assign(Source: TPersistent); override;
|
||||||
published
|
published
|
||||||
property MemLimits: TFpLldbDebugDebuggerPropertiesMemLimits read FMemLimits write SetMemLimits;
|
property MemLimits: TFpLldbDebugDebuggerPropertiesMemLimits read FMemLimits write SetMemLimits;
|
||||||
|
property IntrinsicPrefix: TFpIntrinsicPrefix read FIntrinsicPrefix write FIntrinsicPrefix default ipColon;
|
||||||
|
property AutoDeref: Boolean read FAutoDeref write FAutoDeref default False;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TFpLldbDebugger }
|
{ TFpLldbDebugger }
|
||||||
@ -444,6 +448,8 @@ constructor TFpLldbDebuggerProperties.Create;
|
|||||||
begin
|
begin
|
||||||
inherited Create;
|
inherited Create;
|
||||||
FMemLimits := TFpLldbDebugDebuggerPropertiesMemLimits.Create;
|
FMemLimits := TFpLldbDebugDebuggerPropertiesMemLimits.Create;
|
||||||
|
FIntrinsicPrefix := ipColon;
|
||||||
|
FAutoDeref := False;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
destructor TFpLldbDebuggerProperties.Destroy;
|
destructor TFpLldbDebuggerProperties.Destroy;
|
||||||
@ -457,6 +463,8 @@ begin
|
|||||||
inherited Assign(Source);
|
inherited Assign(Source);
|
||||||
if Source is TFpLldbDebuggerProperties then begin
|
if Source is TFpLldbDebuggerProperties then begin
|
||||||
FMemLimits.Assign(TFpLldbDebuggerProperties(Source).MemLimits);
|
FMemLimits.Assign(TFpLldbDebuggerProperties(Source).MemLimits);
|
||||||
|
FIntrinsicPrefix:=TFpLldbDebuggerProperties(Source).FIntrinsicPrefix;
|
||||||
|
FAutoDeref:=TFpLldbDebuggerProperties(Source).FAutoDeref;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -1685,6 +1693,8 @@ begin
|
|||||||
|
|
||||||
LockUnLoadDwarf;
|
LockUnLoadDwarf;
|
||||||
PasExpr := TFpPascalExpression.Create(AExpression, Ctx);
|
PasExpr := TFpPascalExpression.Create(AExpression, Ctx);
|
||||||
|
PasExpr.IntrinsicPrefix := TFpLldbDebuggerProperties(GetProperties).IntrinsicPrefix;
|
||||||
|
PasExpr.AutoDeref := TFpLldbDebuggerProperties(GetProperties).AutoDeref;
|
||||||
try
|
try
|
||||||
if not IsWatchValueAlive then exit;
|
if not IsWatchValueAlive then exit;
|
||||||
if AWatchValue <> nil then
|
if AWatchValue <> nil then
|
||||||
@ -1729,6 +1739,8 @@ DebugLn(DBG_VERBOSE, [ErrorHandler.ErrorAsString(PasExpr.Error)]);
|
|||||||
CNameAddr.Address := CNameAddr.Address + 1;
|
CNameAddr.Address := CNameAddr.Address + 1;
|
||||||
ctx.LocationContext.ReadMemory(CNameAddr, SizeVal(NameLen), @CastName[1]);
|
ctx.LocationContext.ReadMemory(CNameAddr, SizeVal(NameLen), @CastName[1]);
|
||||||
PasExpr2 := TFpPascalExpression.Create(CastName+'('+AExpression+')', Ctx);
|
PasExpr2 := TFpPascalExpression.Create(CastName+'('+AExpression+')', Ctx);
|
||||||
|
PasExpr2.IntrinsicPrefix := TFpLldbDebuggerProperties(GetProperties).IntrinsicPrefix;
|
||||||
|
PasExpr2.AutoDeref := TFpLldbDebuggerProperties(GetProperties).AutoDeref;
|
||||||
PasExpr2.ResultValue;
|
PasExpr2.ResultValue;
|
||||||
if PasExpr2.Valid then begin
|
if PasExpr2.Valid then begin
|
||||||
PasExpr.Free;
|
PasExpr.Free;
|
||||||
|
Loading…
Reference in New Issue
Block a user