FpDebug: clean up compile hints

This commit is contained in:
Martin 2023-03-12 22:33:33 +01:00
parent ca71d82350
commit db27ef882d
9 changed files with 15 additions and 30 deletions

View File

@ -565,7 +565,7 @@ end;
function TFpDbgInfoCallContext.AddOrdinalParam(AValue: QWord): Boolean;
begin
AddOrdinalParam(nil, AValue);
Result := AddOrdinalParam(nil, AValue);
end;
function TFpDbgInfoCallContext.AddStringResult: Boolean;
@ -590,7 +590,7 @@ function TFpDbgInfoCallContext.AddOrdinalViaRefAsParam(AValue: QWord): Boolean;
var
m: TDBGPtr;
begin
AddOrdinalViaRefAsParam(AValue, m);
Result := AddOrdinalViaRefAsParam(AValue, m);
end;
function TFpDbgInfoCallContext.AddOrdinalViaRefAsParam(AValue: QWord; out

View File

@ -2766,8 +2766,6 @@ end;
function TDbgProcess.InsertBreakInstructionCode(const ALocation: TDBGPtr; out
OrigValue: Byte; AMakeTempRemoved: Boolean): Boolean;
var
i: Integer;
begin
Result := FProcess.ReadData(ALocation, 1, OrigValue);
if not Result then begin

View File

@ -1966,7 +1966,6 @@ procedure TDbgController.SendEvents(out continue: boolean);
var
HasPauseRequest: Boolean;
CurWatch: TFpInternalWatchpoint;
i: Integer;
begin
// reset pause request. If Pause() is called after this, it will be seen in the next loop
HasPauseRequest := InterLockedExchange(FPauseRequest, 0) = 1;

View File

@ -1179,9 +1179,6 @@ end;
function TAvrAsmDecoder.GetFunctionFrameReturnAddress(AnAddress, AStartPC,
AEndPC: TDBGPtr; out returnAddressOffset: word; out AnIsOutsideFrame: Boolean
): Boolean;
var
ADataLen: Cardinal;
AData: PByte;
begin
{ Cases to consider:
A - if (AStartPC + MaxPrologueSize < AnAddress) and (AnAddress + MaxEpilogueSize < AEndPC)

View File

@ -322,13 +322,14 @@ type
function GetFieldFlags: TFpValueFieldFlags; override;
function GetDataAddress: TFpDbgMemLocation; override;
function GetDerefAddress: TFpDbgMemLocation; override;
function GetAsString: AnsiString; override;
function GetAsWideString: WideString; override;
function GetMember(AIndex: Int64): TFpValue; override;
public
function GetSubString(AStartIndex, ALen: Int64; out ASubStr: AnsiString;
AIgnoreBounds: Boolean = False): Boolean; override;
function GetSubWideString(AStartIndex, ALen: Int64; out
ASubStr: WideString; AIgnoreBounds: Boolean = False): Boolean; override;
function GetAsString: AnsiString; override;
function GetAsWideString: WideString; override;
function GetMember(AIndex: Int64): TFpValue; override;
end;
{ TFpValueDwarfEnum }
@ -963,6 +964,7 @@ DECL = DW_AT_decl_column, DW_AT_decl_file, DW_AT_decl_line
FLastChildByName: TFpSymbolDwarf;
procedure CreateMembers;
protected
function GetNestedSymbolEx(AIndex: Int64; out AnParentTypeSymbol: TFpSymbolDwarfType): TFpSymbol; override;
function GetNestedSymbolExByName(const AIndex: String; out AnParentTypeSymbol: TFpSymbolDwarfType): TFpSymbol; override;
function GetNestedSymbolCount: Integer; override;
@ -1031,12 +1033,12 @@ DECL = DW_AT_decl_column, DW_AT_decl_file, DW_AT_decl_line
FStateMachine: TDwarfLineInfoStateMachine;
FFrameBaseParser: TDwarfLocationExpression;
FDwarf: TFpDwarfInfo;
function GetLineEndAddress: TDBGPtr; override;
function GetLineStartAddress: TDBGPtr; override;
function GetLineUnfixed: TDBGPtr;
function StateMachineValid: Boolean;
function ReadVirtuality(out AFlags: TDbgSymbolFlags): Boolean;
protected
function GetLineEndAddress: TDBGPtr; override;
function GetLineStartAddress: TDBGPtr; override;
function GetFrameBase(ASender: TDwarfLocationExpression): TDbgPtr;
function GetFlags: TDbgSymbolFlags; override;
procedure TypeInfoNeeded; override;
@ -2547,7 +2549,6 @@ function TFpValueDwarfPointer.GetSubString(AStartIndex, ALen: Int64; out
ASubStr: AnsiString; AIgnoreBounds: Boolean): Boolean;
var
t: TFpSymbol;
i: Cardinal;
Size: TFpDbgValueSize;
Addr: TFpDbgMemLocation;
WSubStr: WideString;
@ -2621,7 +2622,6 @@ function TFpValueDwarfPointer.GetSubWideString(AStartIndex, ALen: Int64; out
ASubStr: WideString; AIgnoreBounds: Boolean): Boolean;
var
t: TFpSymbol;
i: Cardinal;
Size: TFpDbgValueSize;
Addr: TFpDbgMemLocation;
NSubStr: AnsiString;
@ -2694,7 +2694,6 @@ end;
function TFpValueDwarfPointer.GetAsString: AnsiString;
var
t: TFpSymbol;
i: Cardinal;
Size: TFpDbgValueSize;
begin
Result := '';
@ -2728,7 +2727,6 @@ end;
function TFpValueDwarfPointer.GetAsWideString: WideString;
var
t: TFpSymbol;
i: Cardinal;
begin
Result := '';
t := TypeInfo;
@ -5821,9 +5819,6 @@ end;
function TFpSymbolDwarfTypeVariant.GetNestedSymbolEx(AIndex: Int64; out
AnParentTypeSymbol: TFpSymbolDwarfType): TFpSymbol;
var
i: Int64;
ti: TFpSymbolDwarfType;
begin
CreateMembers;

View File

@ -256,16 +256,16 @@ type
function IsValidTypeCast: Boolean; override;
procedure Reset; override;
function GetFieldFlags: TFpValueFieldFlags; override;
function GetSubString(AStartIndex, ALen: Int64; out ASubStr: AnsiString;
AIgnoreBounds: Boolean = False): Boolean; override;
function GetSubWideString(AStartIndex, ALen: Int64; out
ASubStr: WideString; AIgnoreBounds: Boolean = False): Boolean; override;
function GetAsString: AnsiString; override;
function GetAsWideString: WideString; override;
procedure SetAsCardinal(AValue: QWord); override;
function GetAsCardinal: QWord; override;
function GetMemberCount: Integer; override;
public
function GetSubString(AStartIndex, ALen: Int64; out ASubStr: AnsiString;
AIgnoreBounds: Boolean = False): Boolean; override;
function GetSubWideString(AStartIndex, ALen: Int64; out
ASubStr: WideString; AIgnoreBounds: Boolean = False): Boolean; override;
function GetFpcRefCount(out ARefCount: Int64): Boolean; override;
property DynamicCodePage: TSystemCodePage read GetCodePage;
end;

View File

@ -870,7 +870,6 @@ end;
function TFpPasParserValueCastToPointer.GetAsString: AnsiString;
var
t: TFpSymbol;
i: Cardinal;
Size: TFpDbgValueSize;
a: TFpDbgMemLocation;
begin
@ -909,7 +908,6 @@ end;
function TFpPasParserValueCastToPointer.GetAsWideString: WideString;
var
t: TFpSymbol;
i: Cardinal;
Size: TFpDbgValueSize;
a: TFpDbgMemLocation;
begin
@ -2162,7 +2160,7 @@ function TFpPascalExpressionPartIntrinsic.DoSubStr(
AParams: TFpPascalExpressionPartBracketArgumentList): TFpValue;
var
Tmp, Tmp2, Tmp3, Tmp4: TFpValue;
s1, s2: String;
s1: String;
w1: WideString;
p1, p2: Int64;
UsePtr: Boolean;

View File

@ -766,7 +766,7 @@ function TFpWatchResultConvertor.ProcToResData(AnFpValue: TFpValue;
AnResData: TLzDbgWatchDataIntf): Boolean;
var
addr: TDBGPtr;
s, LocName, TpName: String;
s, LocName: String;
t, sym: TFpSymbol;
proc: TFpSymbolDwarf;
par: TFpValueDwarf;

View File

@ -2496,8 +2496,6 @@ begin
end;
function TFpLineInfo.IndexOf(const ASource: String): integer;
var
Src: String;
begin
Result := FRequestedSources.IndexOf(ASource);
(* For dsInit, dsPause: