mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-20 05:22:34 +01:00
FpDebug: Refactor class names for TFpDbgValue and TFpDbgSymbol descendants.
git-svn-id: trunk@61722 -
This commit is contained in:
parent
a8233705f3
commit
5a7c9f1487
@ -216,7 +216,7 @@ var
|
||||
bp: TFpInternalBreakpoint;
|
||||
|
||||
AContext: TFpDbgInfoContext;
|
||||
AValue: TFpDbgValue;
|
||||
AValue: TFpValue;
|
||||
|
||||
begin
|
||||
CallProcessLoop:=false;
|
||||
|
||||
@ -154,7 +154,7 @@ end;
|
||||
procedure TFPDLoop.ShowCode;
|
||||
var
|
||||
a: TDbgPtr;
|
||||
sym, symproc: TFpDbgSymbol;
|
||||
sym, symproc: TFpSymbol;
|
||||
S: TStringList;
|
||||
AName: String;
|
||||
begin
|
||||
|
||||
@ -306,9 +306,9 @@ end;
|
||||
function TFpDebugLocalsCommand.Execute(AController: TFpServerDbgController; out DoProcessLoop: boolean): boolean;
|
||||
var
|
||||
AContext: TFpDbgInfoContext;
|
||||
ProcVal: TFpDbgValue;
|
||||
ProcVal: TFpValue;
|
||||
i: Integer;
|
||||
m: TFpDbgValue;
|
||||
m: TFpValue;
|
||||
n, v: String;
|
||||
Reg: TDBGPtr;
|
||||
PrettyPrinter: TFpPascalPrettyPrinter;
|
||||
@ -393,7 +393,7 @@ function TFpDebugThreadDisassembleCommand.Execute(AController: TFpServerDbgContr
|
||||
|
||||
function {$ifndef disassemblernestedproc}TFpDebugThreadDisassembleCommand.{$endif}OnAdjustToKnowFunctionStart(var AStartAddr: TDisassemblerAddress): Boolean;
|
||||
var
|
||||
Sym: TFpDbgSymbol;
|
||||
Sym: TFpSymbol;
|
||||
begin
|
||||
Sym := {$ifndef disassemblernestedproc}FController{$else}AController{$endif}.CurrentProcess.FindSymbol(AStartAddr.GuessedValue);
|
||||
if assigned(Sym) and (Sym.Kind in [skProcedure, skFunction]) then
|
||||
@ -419,7 +419,7 @@ function TFpDebugThreadDisassembleCommand.Execute(AController: TFpServerDbgContr
|
||||
ASrcFileName: string;
|
||||
ASrcFileLine: cardinal;
|
||||
i,j: Integer;
|
||||
Sym: TFpDbgSymbol;
|
||||
Sym: TFpSymbol;
|
||||
StatIndex: integer;
|
||||
FirstIndex: integer;
|
||||
AResultList: TDBGDisassemblerEntryRange;
|
||||
@ -883,7 +883,7 @@ end;
|
||||
|
||||
function TFpDebugThreadGetLocationInfoCommand.Execute(AController: TFpServerDbgController; out DoProcessLoop: boolean): boolean;
|
||||
var
|
||||
sym, symproc: TFpDbgSymbol;
|
||||
sym, symproc: TFpSymbol;
|
||||
begin
|
||||
DoProcessLoop:=false;
|
||||
result := false;
|
||||
|
||||
@ -92,11 +92,11 @@ type
|
||||
FFrameAdress: TDBGPtr;
|
||||
FThread: TDbgThread;
|
||||
FIsSymbolResolved: boolean;
|
||||
FSymbol: TFpDbgSymbol;
|
||||
FSymbol: TFpSymbol;
|
||||
FRegisterValueList: TDbgRegisterValueList;
|
||||
FIndex: integer;
|
||||
function GetFunctionName: string;
|
||||
function GetSymbol: TFpDbgSymbol;
|
||||
function GetSymbol: TFpSymbol;
|
||||
function GetLine: integer;
|
||||
function GetSourceFile: string;
|
||||
public
|
||||
@ -109,7 +109,7 @@ type
|
||||
property FunctionName: string read GetFunctionName;
|
||||
property Line: integer read GetLine;
|
||||
property RegisterValueList: TDbgRegisterValueList read FRegisterValueList;
|
||||
property ProcSymbol: TFpDbgSymbol read GetSymbol;
|
||||
property ProcSymbol: TFpSymbol read GetSymbol;
|
||||
property Index: integer read FIndex;
|
||||
end;
|
||||
|
||||
@ -296,7 +296,7 @@ type
|
||||
|
||||
function AddBreak(const AFileName: String; ALine: Cardinal): TFpInternalBreakpoint; overload;
|
||||
function AddrOffset: Int64; virtual; // gives the offset between the loaded addresses and the compiled addresses
|
||||
function FindSymbol(AAdress: TDbgPtr): TFpDbgSymbol;
|
||||
function FindSymbol(AAdress: TDbgPtr): TFpSymbol;
|
||||
procedure LoadInfo; virtual;
|
||||
|
||||
property Process: TDbgProcess read FProcess;
|
||||
@ -370,8 +370,8 @@ type
|
||||
destructor Destroy; override;
|
||||
function AddBreak(const ALocation: TDBGPtr): TFpInternalBreakpoint; overload;
|
||||
function AddBreak(const ALocation: TDBGPtrArray): TFpInternalBreakpoint; overload;
|
||||
function FindSymbol(const AName: String): TFpDbgSymbol;
|
||||
function FindSymbol(AAdress: TDbgPtr): TFpDbgSymbol;
|
||||
function FindSymbol(const AName: String): TFpSymbol;
|
||||
function FindSymbol(AAdress: TDbgPtr): TFpSymbol;
|
||||
function GetLib(const AHandle: THandle; out ALib: TDbgLibrary): Boolean;
|
||||
function GetThread(const AID: Integer; out AThread: TDbgThread): Boolean;
|
||||
procedure RemoveBreak(const ABreakPoint: TFpInternalBreakpoint);
|
||||
@ -713,7 +713,7 @@ end;
|
||||
|
||||
{ TDbgCallstackEntry }
|
||||
|
||||
function TDbgCallstackEntry.GetSymbol: TFpDbgSymbol;
|
||||
function TDbgCallstackEntry.GetSymbol: TFpSymbol;
|
||||
begin
|
||||
if not FIsSymbolResolved then begin
|
||||
if FIndex > 0 then
|
||||
@ -727,7 +727,7 @@ end;
|
||||
|
||||
function TDbgCallstackEntry.GetFunctionName: string;
|
||||
var
|
||||
Symbol: TFpDbgSymbol;
|
||||
Symbol: TFpSymbol;
|
||||
begin
|
||||
Symbol := GetSymbol;
|
||||
if assigned(Symbol) then
|
||||
@ -738,11 +738,11 @@ end;
|
||||
|
||||
function TDbgCallstackEntry.GetParamsAsString: string;
|
||||
var
|
||||
ProcVal: TFpDbgValue;
|
||||
ProcVal: TFpValue;
|
||||
InstrPointerValue: TDBGPtr;
|
||||
AContext: TFpDbgInfoContext;
|
||||
APrettyPrinter: TFpPascalPrettyPrinter;
|
||||
m: TFpDbgValue;
|
||||
m: TFpValue;
|
||||
v: String;
|
||||
i: Integer;
|
||||
begin
|
||||
@ -778,7 +778,7 @@ end;
|
||||
|
||||
function TDbgCallstackEntry.GetLine: integer;
|
||||
var
|
||||
Symbol: TFpDbgSymbol;
|
||||
Symbol: TFpSymbol;
|
||||
begin
|
||||
Symbol := GetSymbol;
|
||||
if assigned(Symbol) then
|
||||
@ -789,7 +789,7 @@ end;
|
||||
|
||||
function TDbgCallstackEntry.GetSourceFile: string;
|
||||
var
|
||||
Symbol: TFpDbgSymbol;
|
||||
Symbol: TFpSymbol;
|
||||
begin
|
||||
Symbol := GetSymbol;
|
||||
if assigned(Symbol) then
|
||||
@ -1005,7 +1005,7 @@ begin
|
||||
inherited;
|
||||
end;
|
||||
|
||||
function TDbgInstance.FindSymbol(AAdress: TDbgPtr): TFpDbgSymbol;
|
||||
function TDbgInstance.FindSymbol(AAdress: TDbgPtr): TFpSymbol;
|
||||
begin
|
||||
Result := FDbgInfo.FindSymbol(AAdress + AddrOffset);
|
||||
if not assigned(Result) then
|
||||
@ -1133,12 +1133,12 @@ begin
|
||||
inherited;
|
||||
end;
|
||||
|
||||
function TDbgProcess.FindSymbol(const AName: String): TFpDbgSymbol;
|
||||
function TDbgProcess.FindSymbol(const AName: String): TFpSymbol;
|
||||
begin
|
||||
Result := FDbgInfo.FindSymbol(AName);
|
||||
end;
|
||||
|
||||
function TDbgProcess.FindSymbol(AAdress: TDbgPtr): TFpDbgSymbol;
|
||||
function TDbgProcess.FindSymbol(AAdress: TDbgPtr): TFpSymbol;
|
||||
var
|
||||
n: Integer;
|
||||
Inst: TDbgInstance;
|
||||
@ -1581,7 +1581,7 @@ end;
|
||||
function TDbgThread.CompareStepInfo: TFPDCompareStepInfo;
|
||||
var
|
||||
AnAddr: TDBGPtr;
|
||||
Sym: TFpDbgSymbol;
|
||||
Sym: TFpSymbol;
|
||||
begin
|
||||
AnAddr := GetInstructionPointerRegisterValue;
|
||||
sym := FProcess.FindSymbol(AnAddr);
|
||||
@ -1603,7 +1603,7 @@ end;
|
||||
function TDbgThread.IsAtStartOfLine: boolean;
|
||||
var
|
||||
AnAddr, b: TDBGPtr;
|
||||
Sym: TFpDbgSymbol;
|
||||
Sym: TFpSymbol;
|
||||
CU: TDwarfCompilationUnit;
|
||||
a: TDBGPtrArray;
|
||||
begin
|
||||
@ -1627,7 +1627,7 @@ end;
|
||||
procedure TDbgThread.StoreStepInfo;
|
||||
var
|
||||
AnAddr: TDBGPtr;
|
||||
Sym: TFpDbgSymbol;
|
||||
Sym: TFpSymbol;
|
||||
begin
|
||||
FStoreStepStackFrame := GetStackBasePointerRegisterValue;
|
||||
AnAddr := GetInstructionPointerRegisterValue;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -453,45 +453,45 @@ type
|
||||
end;
|
||||
TDbgDwarfSymbolBaseClass = class of TDbgDwarfSymbolBase;
|
||||
|
||||
{ TFpDwarfSymbolClassMap
|
||||
{ TFpSymbolDwarfClassMap
|
||||
Provides Symbol and VAlue evaluation classes depending on the compiler
|
||||
}
|
||||
|
||||
PFpDwarfSymbolClassMap = ^TFpDwarfSymbolClassMap;
|
||||
PFpDwarfSymbolClassMap = ^TFpSymbolDwarfClassMap;
|
||||
|
||||
TFpDwarfSymbolClassMap = class
|
||||
TFpSymbolDwarfClassMap = class
|
||||
private
|
||||
NextExistingClassMap: TFpDwarfSymbolClassMap;
|
||||
NextExistingClassMap: TFpSymbolDwarfClassMap;
|
||||
protected
|
||||
function CanHandleCompUnit(ACU: TDwarfCompilationUnit; AHelperData: Pointer): Boolean; virtual;
|
||||
class function GetExistingClassMap: PFpDwarfSymbolClassMap; virtual; abstract; // Each class must have its own storage
|
||||
class function DoGetInstanceForCompUnit(ACU: TDwarfCompilationUnit; AHelperData: Pointer): TFpDwarfSymbolClassMap;
|
||||
class function DoGetInstanceForCompUnit(ACU: TDwarfCompilationUnit; AHelperData: Pointer): TFpSymbolDwarfClassMap;
|
||||
public
|
||||
class function GetInstanceForCompUnit(ACU: TDwarfCompilationUnit): TFpDwarfSymbolClassMap; virtual;
|
||||
class function GetInstanceForCompUnit(ACU: TDwarfCompilationUnit): TFpSymbolDwarfClassMap; virtual;
|
||||
class procedure FreeAllInstances;
|
||||
class function ClassCanHandleCompUnit(ACU: TDwarfCompilationUnit): Boolean; virtual; abstract;
|
||||
public
|
||||
constructor Create(ACU: TDwarfCompilationUnit; AHelperData: Pointer); virtual;
|
||||
function GetDwarfSymbolClass(ATag: Cardinal): TDbgDwarfSymbolBaseClass; virtual; abstract;
|
||||
function CreateContext(AThreadId, AStackFrame: Integer; AnAddress: TDbgPtr; ASymbol: TFpDbgSymbol;
|
||||
function CreateContext(AThreadId, AStackFrame: Integer; AnAddress: TDbgPtr; ASymbol: TFpSymbol;
|
||||
ADwarf: TFpDwarfInfo): TFpDbgInfoContext; virtual; abstract;
|
||||
function CreateProcSymbol(ACompilationUnit: TDwarfCompilationUnit;
|
||||
AInfo: PDwarfAddressInfo; AAddress: TDbgPtr): TDbgDwarfSymbolBase; virtual; abstract;
|
||||
end;
|
||||
TFpDwarfSymbolClassMapClass = class of TFpDwarfSymbolClassMap;
|
||||
TFpSymbolDwarfClassMapClass = class of TFpSymbolDwarfClassMap;
|
||||
|
||||
{ TFpDwarfSymbolClassMapList }
|
||||
{ TFpSymbolDwarfClassMapList }
|
||||
|
||||
TFpDwarfSymbolClassMapList = class
|
||||
TFpSymbolDwarfClassMapList = class
|
||||
private
|
||||
FDefaultMap: TFpDwarfSymbolClassMapClass;
|
||||
FMapList: array of TFpDwarfSymbolClassMapClass;
|
||||
FDefaultMap: TFpSymbolDwarfClassMapClass;
|
||||
FMapList: array of TFpSymbolDwarfClassMapClass;
|
||||
public
|
||||
destructor Destroy; override;
|
||||
function FindMapForCompUnit(ACU: TDwarfCompilationUnit): TFpDwarfSymbolClassMap;
|
||||
function FindMapForCompUnit(ACU: TDwarfCompilationUnit): TFpSymbolDwarfClassMap;
|
||||
procedure FreeAllInstances;
|
||||
procedure AddMap(AMap: TFpDwarfSymbolClassMapClass);
|
||||
procedure SetDefaultMap(AMap: TFpDwarfSymbolClassMapClass);
|
||||
procedure AddMap(AMap: TFpSymbolDwarfClassMapClass);
|
||||
procedure SetDefaultMap(AMap: TFpSymbolDwarfClassMapClass);
|
||||
end;
|
||||
{%endregion Base classes for handling Symbols in unit FPDbgDwarf}
|
||||
|
||||
@ -516,7 +516,7 @@ type
|
||||
private
|
||||
FOwner: TFpDwarfInfo;
|
||||
FDebugFile: PDwarfDebugFile;
|
||||
FDwarfSymbolClassMap: TFpDwarfSymbolClassMap;
|
||||
FDwarfSymbolClassMap: TFpSymbolDwarfClassMap;
|
||||
FValid: Boolean; // set if the compilationunit has compile unit tag.
|
||||
|
||||
// --- Header ---
|
||||
@ -625,7 +625,7 @@ type
|
||||
property Owner: TFpDwarfInfo read FOwner;
|
||||
property DebugFile: PDwarfDebugFile read FDebugFile;
|
||||
|
||||
property DwarfSymbolClassMap: TFpDwarfSymbolClassMap read FDwarfSymbolClassMap;
|
||||
property DwarfSymbolClassMap: TFpSymbolDwarfClassMap read FDwarfSymbolClassMap;
|
||||
property FirstScope: TDwarfScopeInfo read FScope;
|
||||
|
||||
// public for FpDbgDwarfVerbosePrinter
|
||||
@ -655,7 +655,7 @@ type
|
||||
destructor Destroy; override;
|
||||
function FindContext(AThreadId, AStackFrame: Integer; AAddress: TDbgPtr = 0): TFpDbgInfoContext; override;
|
||||
function FindContext(AAddress: TDbgPtr): TFpDbgInfoContext; override;
|
||||
function FindSymbol(AAddress: TDbgPtr): TFpDbgSymbol; override;
|
||||
function FindSymbol(AAddress: TDbgPtr): TFpSymbol; override;
|
||||
//function FindSymbol(const AName: String): TDbgSymbol; override;
|
||||
function GetLineAddresses(const AFileName: String; ALine: Cardinal; var AResultList: TDBGPtrArray): Boolean; override;
|
||||
function GetLineAddressMap(const AFileName: String): PDWarfLineMap;
|
||||
@ -734,9 +734,9 @@ function Dbgs(AScope: TDwarfScopeInfo; ACompUnit: TDwarfCompilationUnit): String
|
||||
function Dbgs(AInfoEntry: TDwarfInformationEntry; ACompUnit: TDwarfCompilationUnit): String; overload;
|
||||
function DbgsDump(AScope: TDwarfScopeInfo; ACompUnit: TDwarfCompilationUnit): String; overload;
|
||||
|
||||
function GetDwarfSymbolClassMapList: TFpDwarfSymbolClassMapList; inline;
|
||||
function GetDwarfSymbolClassMapList: TFpSymbolDwarfClassMapList; inline;
|
||||
|
||||
property DwarfSymbolClassMapList: TFpDwarfSymbolClassMapList read GetDwarfSymbolClassMapList;
|
||||
property DwarfSymbolClassMapList: TFpSymbolDwarfClassMapList read GetDwarfSymbolClassMapList;
|
||||
|
||||
implementation
|
||||
|
||||
@ -746,12 +746,12 @@ var
|
||||
FPDBG_DWARF_VERBOSE_LOAD: PLazLoggerLogGroup;
|
||||
|
||||
var
|
||||
TheDwarfSymbolClassMapList: TFpDwarfSymbolClassMapList;
|
||||
TheDwarfSymbolClassMapList: TFpSymbolDwarfClassMapList;
|
||||
|
||||
const
|
||||
SCOPE_ALLOC_BLOCK_SIZE = 4096; // Increase scopelist in steps of
|
||||
|
||||
function GetDwarfSymbolClassMapList: TFpDwarfSymbolClassMapList;
|
||||
function GetDwarfSymbolClassMapList: TFpSymbolDwarfClassMapList;
|
||||
begin
|
||||
Result := TheDwarfSymbolClassMapList;
|
||||
end;
|
||||
@ -913,17 +913,17 @@ begin
|
||||
|
||||
end;
|
||||
|
||||
{ TFpDwarfSymbolClassMap }
|
||||
{ TFpSymbolDwarfClassMap }
|
||||
|
||||
class function TFpDwarfSymbolClassMap.GetInstanceForCompUnit(
|
||||
ACU: TDwarfCompilationUnit): TFpDwarfSymbolClassMap;
|
||||
class function TFpSymbolDwarfClassMap.GetInstanceForCompUnit(
|
||||
ACU: TDwarfCompilationUnit): TFpSymbolDwarfClassMap;
|
||||
begin
|
||||
Result := DoGetInstanceForCompUnit(ACU, nil);
|
||||
end;
|
||||
|
||||
class procedure TFpDwarfSymbolClassMap.FreeAllInstances;
|
||||
class procedure TFpSymbolDwarfClassMap.FreeAllInstances;
|
||||
var
|
||||
pm, next: TFpDwarfSymbolClassMap;
|
||||
pm, next: TFpSymbolDwarfClassMap;
|
||||
begin
|
||||
pm := GetExistingClassMap^;
|
||||
while pm <> nil do begin
|
||||
@ -934,20 +934,20 @@ begin
|
||||
GetExistingClassMap^ := nil;
|
||||
end;
|
||||
|
||||
constructor TFpDwarfSymbolClassMap.Create(ACU: TDwarfCompilationUnit;
|
||||
constructor TFpSymbolDwarfClassMap.Create(ACU: TDwarfCompilationUnit;
|
||||
AHelperData: Pointer);
|
||||
begin
|
||||
inherited Create;
|
||||
end;
|
||||
|
||||
function TFpDwarfSymbolClassMap.CanHandleCompUnit(ACU: TDwarfCompilationUnit;
|
||||
function TFpSymbolDwarfClassMap.CanHandleCompUnit(ACU: TDwarfCompilationUnit;
|
||||
AHelperData: Pointer): Boolean;
|
||||
begin
|
||||
Result := True;
|
||||
end;
|
||||
|
||||
class function TFpDwarfSymbolClassMap.DoGetInstanceForCompUnit(
|
||||
ACU: TDwarfCompilationUnit; AHelperData: Pointer): TFpDwarfSymbolClassMap;
|
||||
class function TFpSymbolDwarfClassMap.DoGetInstanceForCompUnit(
|
||||
ACU: TDwarfCompilationUnit; AHelperData: Pointer): TFpSymbolDwarfClassMap;
|
||||
var
|
||||
pm: PFpDwarfSymbolClassMap;
|
||||
begin
|
||||
@ -3207,7 +3207,7 @@ begin
|
||||
result := FindContext(1, 0, AAddress);
|
||||
end;
|
||||
|
||||
function TFpDwarfInfo.FindSymbol(AAddress: TDbgPtr): TFpDbgSymbol;
|
||||
function TFpDwarfInfo.FindSymbol(AAddress: TDbgPtr): TFpSymbol;
|
||||
begin
|
||||
Result := FindProcSymbol(AAddress);
|
||||
end;
|
||||
@ -3594,18 +3594,18 @@ begin
|
||||
else FFileName := Format('Unknown fileindex(%u)', [AIndex]);
|
||||
end;
|
||||
|
||||
{ TFpDwarfSymbolClassMapList }
|
||||
{ TFpSymbolDwarfClassMapList }
|
||||
|
||||
destructor TFpDwarfSymbolClassMapList.Destroy;
|
||||
destructor TFpSymbolDwarfClassMapList.Destroy;
|
||||
begin
|
||||
FreeAllInstances;
|
||||
inherited Destroy;
|
||||
end;
|
||||
|
||||
function TFpDwarfSymbolClassMapList.FindMapForCompUnit(ACU: TDwarfCompilationUnit): TFpDwarfSymbolClassMap;
|
||||
function TFpSymbolDwarfClassMapList.FindMapForCompUnit(ACU: TDwarfCompilationUnit): TFpSymbolDwarfClassMap;
|
||||
var
|
||||
i: Integer;
|
||||
ResClass: TFpDwarfSymbolClassMapClass;
|
||||
ResClass: TFpSymbolDwarfClassMapClass;
|
||||
begin
|
||||
ResClass := FDefaultMap;
|
||||
for i := 0 to length(FMapList) - 1 do
|
||||
@ -3616,7 +3616,7 @@ begin
|
||||
Result := ResClass.GetInstanceForCompUnit(ACU);
|
||||
end;
|
||||
|
||||
procedure TFpDwarfSymbolClassMapList.FreeAllInstances;
|
||||
procedure TFpSymbolDwarfClassMapList.FreeAllInstances;
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
||||
@ -3624,7 +3624,7 @@ begin
|
||||
FMapList[i].FreeAllInstances;
|
||||
end;
|
||||
|
||||
procedure TFpDwarfSymbolClassMapList.AddMap(AMap: TFpDwarfSymbolClassMapClass);
|
||||
procedure TFpSymbolDwarfClassMapList.AddMap(AMap: TFpSymbolDwarfClassMapClass);
|
||||
var
|
||||
l: Integer;
|
||||
begin
|
||||
@ -3633,7 +3633,7 @@ begin
|
||||
FMapList[l] := AMap;
|
||||
end;
|
||||
|
||||
procedure TFpDwarfSymbolClassMapList.SetDefaultMap(AMap: TFpDwarfSymbolClassMapClass);
|
||||
procedure TFpSymbolDwarfClassMapList.SetDefaultMap(AMap: TFpSymbolDwarfClassMapClass);
|
||||
begin
|
||||
FDefaultMap := AMap;
|
||||
end;
|
||||
@ -4618,7 +4618,7 @@ begin
|
||||
end;
|
||||
|
||||
initialization
|
||||
TheDwarfSymbolClassMapList := TFpDwarfSymbolClassMapList.Create;
|
||||
TheDwarfSymbolClassMapList := TFpSymbolDwarfClassMapList.Create;
|
||||
|
||||
FPDBG_DWARF_ERRORS := DebugLogger.FindOrRegisterLogGroup('FPDBG_DWARF_ERRORS' {$IFDEF FPDBG_DWARF_ERRORS} , True {$ENDIF} );
|
||||
FPDBG_DWARF_WARNINGS := DebugLogger.FindOrRegisterLogGroup('FPDBG_DWARF_WARNINGS' {$IFDEF FPDBG_DWARF_WARNINGS} , True {$ENDIF} );
|
||||
|
||||
@ -18,14 +18,14 @@ type
|
||||
|
||||
TFpDwarfFreePascalSymbolClassMap = class(TFpDwarfDefaultSymbolClassMap)
|
||||
strict private
|
||||
class var ExistingClassMap: TFpDwarfSymbolClassMap;
|
||||
class var ExistingClassMap: TFpSymbolDwarfClassMap;
|
||||
protected
|
||||
class function GetExistingClassMap: PFpDwarfSymbolClassMap; override;
|
||||
public
|
||||
class function ClassCanHandleCompUnit(ACU: TDwarfCompilationUnit): Boolean; override;
|
||||
public
|
||||
function GetDwarfSymbolClass(ATag: Cardinal): TDbgDwarfSymbolBaseClass; override;
|
||||
function CreateContext(AThreadId, AStackFrame: Integer; AnAddress: TDBGPtr; ASymbol: TFpDbgSymbol;
|
||||
function CreateContext(AThreadId, AStackFrame: Integer; AnAddress: TDBGPtr; ASymbol: TFpSymbol;
|
||||
ADwarf: TFpDwarfInfo): TFpDbgInfoContext; override;
|
||||
//class function CreateProcSymbol(ACompilationUnit: TDwarfCompilationUnit;
|
||||
// AInfo: PDwarfAddressInfo; AAddress: TDbgPtr): TDbgDwarfSymbolBase; override;
|
||||
@ -35,14 +35,14 @@ type
|
||||
|
||||
TFpDwarfFreePascalSymbolClassMapDwarf2 = class(TFpDwarfFreePascalSymbolClassMap)
|
||||
strict private
|
||||
class var ExistingClassMap: TFpDwarfSymbolClassMap;
|
||||
class var ExistingClassMap: TFpSymbolDwarfClassMap;
|
||||
protected
|
||||
class function GetExistingClassMap: PFpDwarfSymbolClassMap; override;
|
||||
public
|
||||
class function ClassCanHandleCompUnit(ACU: TDwarfCompilationUnit): Boolean; override;
|
||||
public
|
||||
function GetDwarfSymbolClass(ATag: Cardinal): TDbgDwarfSymbolBaseClass; override;
|
||||
//class function CreateContext(AThreadId, AStackFrame: Integer; AnAddress: TDBGPtr; ASymbol: TFpDbgSymbol;
|
||||
//class function CreateContext(AThreadId, AStackFrame: Integer; AnAddress: TDBGPtr; ASymbol: TFpSymbol;
|
||||
// ADwarf: TFpDwarfInfo): TFpDbgInfoContext; override;
|
||||
//class function CreateProcSymbol(ACompilationUnit: TDwarfCompilationUnit;
|
||||
// AInfo: PDwarfAddressInfo; AAddress: TDbgPtr): TDbgDwarfSymbolBase; override;
|
||||
@ -52,19 +52,19 @@ type
|
||||
|
||||
TFpDwarfFreePascalSymbolClassMapDwarf3 = class(TFpDwarfFreePascalSymbolClassMap)
|
||||
strict private
|
||||
class var ExistingClassMap: TFpDwarfSymbolClassMap;
|
||||
class var ExistingClassMap: TFpSymbolDwarfClassMap;
|
||||
private
|
||||
FCompilerVersion: Cardinal;
|
||||
protected
|
||||
function CanHandleCompUnit(ACU: TDwarfCompilationUnit; AHelperData: Pointer): Boolean; override;
|
||||
class function GetExistingClassMap: PFpDwarfSymbolClassMap; override;
|
||||
public
|
||||
class function GetInstanceForCompUnit(ACU: TDwarfCompilationUnit): TFpDwarfSymbolClassMap; override;
|
||||
class function GetInstanceForCompUnit(ACU: TDwarfCompilationUnit): TFpSymbolDwarfClassMap; override;
|
||||
class function ClassCanHandleCompUnit(ACU: TDwarfCompilationUnit): Boolean; override;
|
||||
public
|
||||
constructor Create(ACU: TDwarfCompilationUnit; AHelperData: Pointer); override;
|
||||
function GetDwarfSymbolClass(ATag: Cardinal): TDbgDwarfSymbolBaseClass; override;
|
||||
//class function CreateContext(AThreadId, AStackFrame: Integer; AnAddress: TDBGPtr; ASymbol: TFpDbgSymbol;
|
||||
//class function CreateContext(AThreadId, AStackFrame: Integer; AnAddress: TDBGPtr; ASymbol: TFpSymbol;
|
||||
// ADwarf: TFpDwarfInfo): TFpDbgInfoContext; override;
|
||||
//class function CreateProcSymbol(ACompilationUnit: TDwarfCompilationUnit;
|
||||
// AInfo: PDwarfAddressInfo; AAddress: TDbgPtr): TDbgDwarfSymbolBase; override;
|
||||
@ -81,7 +81,7 @@ type
|
||||
FOuterNotFound: Boolean;
|
||||
protected
|
||||
function FindLocalSymbol(const AName: String; PNameUpper, PNameLower: PChar;
|
||||
InfoEntry: TDwarfInformationEntry; out ADbgValue: TFpDbgValue): Boolean; override;
|
||||
InfoEntry: TDwarfInformationEntry; out ADbgValue: TFpValue): Boolean; override;
|
||||
public
|
||||
destructor Destroy; override;
|
||||
end;
|
||||
@ -91,76 +91,76 @@ type
|
||||
|
||||
(* *** Record vs ShortString *** *)
|
||||
|
||||
{ TFpDwarf2FreePascalSymbolTypeStructure }
|
||||
{ TFpSymbolDwarfV2FreePascalTypeStructure }
|
||||
|
||||
TFpDwarf2FreePascalSymbolTypeStructure = class(TFpDwarfSymbolTypeStructure)
|
||||
TFpSymbolDwarfV2FreePascalTypeStructure = class(TFpSymbolDwarfTypeStructure)
|
||||
private
|
||||
FIsShortString: (issUnknown, issShortString, issStructure);
|
||||
function IsShortString: Boolean;
|
||||
protected
|
||||
function GetTypedValueObject(ATypeCast: Boolean): TFpDwarfValue; override;
|
||||
function GetTypedValueObject(ATypeCast: Boolean): TFpValueDwarf; override;
|
||||
procedure KindNeeded; override;
|
||||
function GetMemberCount: Integer; override;
|
||||
//function GetMemberByName(AIndex: String): TFpDbgSymbol; override;
|
||||
//function GetMemberByName(AIndex: String): TFpSymbol; override;
|
||||
end;
|
||||
|
||||
{ TFpDwarfV2ValueFreePascalShortString }
|
||||
{ TFpValueDwarfV2FreePascalShortString }
|
||||
|
||||
TFpDwarfV2ValueFreePascalShortString = class(TFpDwarfValue)
|
||||
TFpValueDwarfV2FreePascalShortString = class(TFpValueDwarf)
|
||||
protected
|
||||
function IsValidTypeCast: Boolean; override;
|
||||
function GetInternMemberByName(AIndex: String): TFpDbgValue;
|
||||
function GetInternMemberByName(AIndex: String): TFpValue;
|
||||
procedure Reset; override;
|
||||
private
|
||||
FValue: String;
|
||||
FValueDone: Boolean;
|
||||
protected
|
||||
function GetFieldFlags: TFpDbgValueFieldFlags; override;
|
||||
function GetFieldFlags: TFpValueFieldFlags; override;
|
||||
function GetAsString: AnsiString; override;
|
||||
function GetAsWideString: WideString; override;
|
||||
end;
|
||||
|
||||
(* *** "Open Array" in params *** *)
|
||||
|
||||
{ TFpDwarfFreePascalSymbolTypeArray }
|
||||
{ TFpSymbolDwarfFreePascalSymbolTypeArray }
|
||||
|
||||
TFpDwarfFreePascalSymbolTypeArray = class(TFpDwarfSymbolTypeArray)
|
||||
TFpSymbolDwarfFreePascalSymbolTypeArray = class(TFpSymbolDwarfTypeArray)
|
||||
protected
|
||||
function GetTypedValueObject(ATypeCast: Boolean): TFpDwarfValue; override;
|
||||
function GetTypedValueObject(ATypeCast: Boolean): TFpValueDwarf; override;
|
||||
end;
|
||||
|
||||
{ TFpDwarfValueFreePascalArray }
|
||||
{ TFpValueDwarfFreePascalArray }
|
||||
|
||||
TFpDwarfValueFreePascalArray = class(TFpDwarfValueArray)
|
||||
TFpValueDwarfFreePascalArray = class(TFpValueDwarfArray)
|
||||
protected
|
||||
function GetMemberCount: Integer; override;
|
||||
end;
|
||||
|
||||
(* *** Array vs AnsiString *** *)
|
||||
|
||||
{ TFpDwarfV3FreePascalSymbolTypeArray }
|
||||
{ TFpSymbolDwarfV3FreePascalSymbolTypeArray }
|
||||
|
||||
TFpDwarfV3FreePascalSymbolTypeArray = class(TFpDwarfFreePascalSymbolTypeArray)
|
||||
TFpSymbolDwarfV3FreePascalSymbolTypeArray = class(TFpSymbolDwarfFreePascalSymbolTypeArray)
|
||||
private type
|
||||
TArrayOrStringType = (iasUnknown, iasArray, iasShortString, iasAnsiString, iasUnicodeString);
|
||||
private
|
||||
FArrayOrStringType: TArrayOrStringType;
|
||||
function GetInternalStringType: TArrayOrStringType;
|
||||
protected
|
||||
function GetTypedValueObject(ATypeCast: Boolean): TFpDwarfValue; override;
|
||||
function GetTypedValueObject(ATypeCast: Boolean): TFpValueDwarf; override;
|
||||
procedure KindNeeded; override;
|
||||
end;
|
||||
|
||||
{ TFpDwarfV3ValueFreePascalString }
|
||||
{ TFpValueDwarfV3FreePascalString }
|
||||
|
||||
TFpDwarfV3ValueFreePascalString = class(TFpDwarfValue) // short & ansi...
|
||||
TFpValueDwarfV3FreePascalString = class(TFpValueDwarf) // short & ansi...
|
||||
private
|
||||
FValue: String;
|
||||
FValueDone: Boolean;
|
||||
protected
|
||||
function IsValidTypeCast: Boolean; override;
|
||||
procedure Reset; override;
|
||||
function GetFieldFlags: TFpDbgValueFieldFlags; override;
|
||||
function GetFieldFlags: TFpValueFieldFlags; override;
|
||||
function GetAsString: AnsiString; override;
|
||||
function GetAsWideString: WideString; override;
|
||||
end;
|
||||
@ -187,14 +187,14 @@ function TFpDwarfFreePascalSymbolClassMap.GetDwarfSymbolClass(
|
||||
begin
|
||||
case ATag of
|
||||
DW_TAG_array_type:
|
||||
Result := TFpDwarfFreePascalSymbolTypeArray;
|
||||
Result := TFpSymbolDwarfFreePascalSymbolTypeArray;
|
||||
else
|
||||
Result := inherited GetDwarfSymbolClass(ATag);
|
||||
end;
|
||||
end;
|
||||
|
||||
function TFpDwarfFreePascalSymbolClassMap.CreateContext(AThreadId, AStackFrame: Integer;
|
||||
AnAddress: TDBGPtr; ASymbol: TFpDbgSymbol; ADwarf: TFpDwarfInfo): TFpDbgInfoContext;
|
||||
AnAddress: TDBGPtr; ASymbol: TFpSymbol; ADwarf: TFpDwarfInfo): TFpDbgInfoContext;
|
||||
begin
|
||||
Result := TFpDwarfFreePascalAddressContext.Create(AThreadId, AStackFrame, AnAddress, ASymbol, ADwarf);
|
||||
end;
|
||||
@ -218,19 +218,19 @@ function TFpDwarfFreePascalSymbolClassMapDwarf2.GetDwarfSymbolClass(
|
||||
begin
|
||||
case ATag of
|
||||
DW_TAG_structure_type:
|
||||
Result := TFpDwarf2FreePascalSymbolTypeStructure; // maybe record
|
||||
Result := TFpSymbolDwarfV2FreePascalTypeStructure; // maybe record
|
||||
// // TODO:
|
||||
// //DW_TAG_reference_type: Result := TFpDwarfSymbolTypeRef;
|
||||
// //DW_TAG_typedef: Result := TFpDwarfSymbolTypeDeclaration;
|
||||
// //DW_TAG_pointer_type: Result := TFpDwarfSymbolTypePointer;
|
||||
// //DW_TAG_reference_type: Result := TFpSymbolDwarfTypeRef;
|
||||
// //DW_TAG_typedef: Result := TFpSymbolDwarfTypeDeclaration;
|
||||
// //DW_TAG_pointer_type: Result := TFpSymbolDwarfTypePointer;
|
||||
// //
|
||||
// //DW_TAG_base_type: Result := TFpDwarfSymbolTypeBasic;
|
||||
// //DW_TAG_subrange_type: Result := TFpDwarfSymbolTypeSubRange;
|
||||
// //DW_TAG_enumeration_type: Result := TFpDwarfSymbolTypeEnum;
|
||||
// //DW_TAG_enumerator: Result := TFpDwarfSymbolValueEnumMember;
|
||||
// //DW_TAG_array_type: Result := TFpDwarfSymbolTypeArray;
|
||||
// //DW_TAG_base_type: Result := TFpSymbolDwarfTypeBasic;
|
||||
// //DW_TAG_subrange_type: Result := TFpSymbolDwarfTypeSubRange;
|
||||
// //DW_TAG_enumeration_type: Result := TFpSymbolDwarfTypeEnum;
|
||||
// //DW_TAG_enumerator: Result := TFpSymbolDwarfDataEnumMember;
|
||||
// //DW_TAG_array_type: Result := TFpSymbolDwarfTypeArray;
|
||||
// ////
|
||||
// //DW_TAG_compile_unit: Result := TFpDwarfSymbolUnit;
|
||||
// //DW_TAG_compile_unit: Result := TFpSymbolDwarfUnit;
|
||||
//
|
||||
else
|
||||
Result := inherited GetDwarfSymbolClass(ATag);
|
||||
@ -252,7 +252,7 @@ begin
|
||||
end;
|
||||
|
||||
class function TFpDwarfFreePascalSymbolClassMapDwarf3.GetInstanceForCompUnit(
|
||||
ACU: TDwarfCompilationUnit): TFpDwarfSymbolClassMap;
|
||||
ACU: TDwarfCompilationUnit): TFpSymbolDwarfClassMap;
|
||||
var
|
||||
s: String;
|
||||
i, j, v: Integer;
|
||||
@ -316,21 +316,21 @@ function TFpDwarfFreePascalSymbolClassMapDwarf3.GetDwarfSymbolClass(
|
||||
begin
|
||||
case ATag of
|
||||
DW_TAG_array_type:
|
||||
Result := TFpDwarfV3FreePascalSymbolTypeArray;
|
||||
Result := TFpSymbolDwarfV3FreePascalSymbolTypeArray;
|
||||
// DW_TAG_structure_type:
|
||||
// Result := TFpDwarf2FreePascalSymbolTypeStructure; // maybe record
|
||||
// Result := TFpSymbolDwarfV2FreePascalTypeStructure; // maybe record
|
||||
// // TODO:
|
||||
// //DW_TAG_reference_type: Result := TFpDwarfSymbolTypeRef;
|
||||
// //DW_TAG_typedef: Result := TFpDwarfSymbolTypeDeclaration;
|
||||
// //DW_TAG_pointer_type: Result := TFpDwarfSymbolTypePointer;
|
||||
// //DW_TAG_reference_type: Result := TFpSymbolDwarfTypeRef;
|
||||
// //DW_TAG_typedef: Result := TFpSymbolDwarfTypeDeclaration;
|
||||
// //DW_TAG_pointer_type: Result := TFpSymbolDwarfTypePointer;
|
||||
// //
|
||||
// //DW_TAG_base_type: Result := TFpDwarfSymbolTypeBasic;
|
||||
// //DW_TAG_subrange_type: Result := TFpDwarfSymbolTypeSubRange;
|
||||
// //DW_TAG_enumeration_type: Result := TFpDwarfSymbolTypeEnum;
|
||||
// //DW_TAG_enumerator: Result := TFpDwarfSymbolValueEnumMember;
|
||||
// //DW_TAG_array_type: Result := TFpDwarfSymbolTypeArray;
|
||||
// //DW_TAG_base_type: Result := TFpSymbolDwarfTypeBasic;
|
||||
// //DW_TAG_subrange_type: Result := TFpSymbolDwarfTypeSubRange;
|
||||
// //DW_TAG_enumeration_type: Result := TFpSymbolDwarfTypeEnum;
|
||||
// //DW_TAG_enumerator: Result := TFpSymbolDwarfDataEnumMember;
|
||||
// //DW_TAG_array_type: Result := TFpSymbolDwarfTypeArray;
|
||||
// ////
|
||||
// //DW_TAG_compile_unit: Result := TFpDwarfSymbolUnit;
|
||||
// //DW_TAG_compile_unit: Result := TFpSymbolDwarfUnit;
|
||||
//
|
||||
else
|
||||
Result := inherited GetDwarfSymbolClass(ATag);
|
||||
@ -340,7 +340,7 @@ end;
|
||||
{ TFpDwarfFreePascalAddressContext }
|
||||
|
||||
function TFpDwarfFreePascalAddressContext.FindLocalSymbol(const AName: String; PNameUpper,
|
||||
PNameLower: PChar; InfoEntry: TDwarfInformationEntry; out ADbgValue: TFpDbgValue): Boolean;
|
||||
PNameLower: PChar; InfoEntry: TDwarfInformationEntry; out ADbgValue: TFpValue): Boolean;
|
||||
const
|
||||
parentfp: string = 'parentfp';
|
||||
parentfp2: string = '$parentfp';
|
||||
@ -352,11 +352,11 @@ const
|
||||
RegPc32 = 8;
|
||||
var
|
||||
StartScopeIdx, RegFp, RegPc: Integer;
|
||||
ParentFpVal: TFpDbgValue;
|
||||
ParentFpVal: TFpValue;
|
||||
SearchCtx: TFpDwarfFreePascalAddressContext;
|
||||
par_fp, cur_fp, prev_fp, pc: TDbgPtr;
|
||||
d, i: Integer;
|
||||
ParentFpSym: TFpDwarfSymbol;
|
||||
ParentFpSym: TFpSymbolDwarf;
|
||||
begin
|
||||
if Dwarf.Image64Bit then begin
|
||||
RegFP := RegFp64;
|
||||
@ -402,10 +402,10 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
ParentFpSym := TFpDwarfSymbol.CreateSubClass(AName, InfoEntry);
|
||||
ParentFpSym := TFpSymbolDwarf.CreateSubClass(AName, InfoEntry);
|
||||
ParentFpVal := ParentFpSym.Value;
|
||||
ApplyContext(ParentFpVal);
|
||||
//TFpDwarfSymbol(ADbgValue.DbgSymbol).ParentTypeInfo := TFpDwarfSymbolValueProc(FSymbol);
|
||||
//TFpSymbolDwarf(ADbgValue.DbgSymbol).ParentTypeInfo := TFpSymbolDwarfDataProc(FSymbol);
|
||||
if not (svfOrdinal in ParentFpVal.FieldFlags) then begin
|
||||
DebugLn('no ordinal for parentfp');
|
||||
ParentFpSym.ReleaseReference;
|
||||
@ -469,11 +469,11 @@ begin
|
||||
inherited Destroy;
|
||||
end;
|
||||
|
||||
{ TFpDwarf2FreePascalSymbolTypeStructure }
|
||||
{ TFpSymbolDwarfV2FreePascalTypeStructure }
|
||||
|
||||
function TFpDwarf2FreePascalSymbolTypeStructure.IsShortString: Boolean;
|
||||
function TFpSymbolDwarfV2FreePascalTypeStructure.IsShortString: Boolean;
|
||||
var
|
||||
LenSym, StSym, StSymType: TFpDbgSymbol;
|
||||
LenSym, StSym, StSymType: TFpSymbol;
|
||||
begin
|
||||
if FIsShortString <> issUnknown then
|
||||
exit(FIsShortString = issShortString);
|
||||
@ -492,11 +492,11 @@ begin
|
||||
if (StSym = nil) then
|
||||
exit;
|
||||
StSymType := StSym.TypeInfo;
|
||||
if (StSymType = nil) or (StSymType.Kind <> skArray) or not (StSymType is TFpDwarfSymbolTypeArray) then
|
||||
if (StSymType = nil) or (StSymType.Kind <> skArray) or not (StSymType is TFpSymbolDwarfTypeArray) then
|
||||
exit;
|
||||
|
||||
// If it were a user declared array, fpc puts the stride in the subrange
|
||||
if not TFpDwarfSymbolTypeArray(StSymType).InformationEntry.HasAttrib(DW_AT_byte_stride) then
|
||||
if not TFpSymbolDwarfTypeArray(StSymType).InformationEntry.HasAttrib(DW_AT_byte_stride) then
|
||||
exit;
|
||||
// check the subrange?
|
||||
|
||||
@ -504,16 +504,16 @@ begin
|
||||
Result := True;
|
||||
end;
|
||||
|
||||
function TFpDwarf2FreePascalSymbolTypeStructure.GetTypedValueObject(
|
||||
ATypeCast: Boolean): TFpDwarfValue;
|
||||
function TFpSymbolDwarfV2FreePascalTypeStructure.GetTypedValueObject(
|
||||
ATypeCast: Boolean): TFpValueDwarf;
|
||||
begin
|
||||
if not IsShortString then
|
||||
Result := inherited GetTypedValueObject(ATypeCast)
|
||||
else
|
||||
Result := TFpDwarfV2ValueFreePascalShortString.Create(Self);
|
||||
Result := TFpValueDwarfV2FreePascalShortString.Create(Self);
|
||||
end;
|
||||
|
||||
procedure TFpDwarf2FreePascalSymbolTypeStructure.KindNeeded;
|
||||
procedure TFpSymbolDwarfV2FreePascalTypeStructure.KindNeeded;
|
||||
begin
|
||||
if not IsShortString then
|
||||
inherited KindNeeded
|
||||
@ -521,7 +521,7 @@ begin
|
||||
SetKind(skString);
|
||||
end;
|
||||
|
||||
function TFpDwarf2FreePascalSymbolTypeStructure.GetMemberCount: Integer;
|
||||
function TFpSymbolDwarfV2FreePascalTypeStructure.GetMemberCount: Integer;
|
||||
begin
|
||||
if IsShortString then
|
||||
Result := 0
|
||||
@ -529,57 +529,57 @@ begin
|
||||
Result := inherited GetMemberCount;
|
||||
end;
|
||||
|
||||
{ TFpDwarfV2ValueFreePascalShortString }
|
||||
{ TFpValueDwarfV2FreePascalShortString }
|
||||
|
||||
function TFpDwarfV2ValueFreePascalShortString.IsValidTypeCast: Boolean;
|
||||
function TFpValueDwarfV2FreePascalShortString.IsValidTypeCast: Boolean;
|
||||
begin
|
||||
// currently only allow this / used by array access
|
||||
Result := TypeCastSourceValue is TFpDbgValueConstAddress;
|
||||
Result := TypeCastSourceValue is TFpValueConstAddress;
|
||||
end;
|
||||
|
||||
function TFpDwarfV2ValueFreePascalShortString.GetInternMemberByName(
|
||||
AIndex: String): TFpDbgValue;
|
||||
function TFpValueDwarfV2FreePascalShortString.GetInternMemberByName(
|
||||
AIndex: String): TFpValue;
|
||||
var
|
||||
tmp: TFpDbgSymbol;
|
||||
tmp: TFpSymbol;
|
||||
begin
|
||||
if HasTypeCastInfo then begin
|
||||
Result := nil;
|
||||
tmp := TypeCastTargetType.MemberByName[AIndex];
|
||||
if (tmp <> nil) then begin
|
||||
assert((tmp is TFpDwarfSymbolValue), 'TDbgDwarfStructTypeCastSymbolValue.GetMemberByName'+DbgSName(tmp));
|
||||
assert((tmp is TFpSymbolDwarfData), 'TDbgDwarfStructTypeCastSymbolValue.GetMemberByName'+DbgSName(tmp));
|
||||
Result := tmp.Value;
|
||||
|
||||
TFpDwarfValue(Result).StructureValue := Self;
|
||||
if (TFpDwarfValue(Result).Context = nil) then
|
||||
TFpDwarfValue(Result).Context := Context;
|
||||
TFpValueDwarf(Result).StructureValue := Self;
|
||||
if (TFpValueDwarf(Result).Context = nil) then
|
||||
TFpValueDwarf(Result).Context := Context;
|
||||
end;
|
||||
end
|
||||
else
|
||||
Result := MemberByName[AIndex];
|
||||
end;
|
||||
|
||||
procedure TFpDwarfV2ValueFreePascalShortString.Reset;
|
||||
procedure TFpValueDwarfV2FreePascalShortString.Reset;
|
||||
begin
|
||||
inherited Reset;
|
||||
FValueDone := False;
|
||||
end;
|
||||
|
||||
function TFpDwarfV2ValueFreePascalShortString.GetFieldFlags: TFpDbgValueFieldFlags;
|
||||
function TFpValueDwarfV2FreePascalShortString.GetFieldFlags: TFpValueFieldFlags;
|
||||
begin
|
||||
Result := inherited GetFieldFlags;
|
||||
Result := Result + [svfString];
|
||||
end;
|
||||
|
||||
function TFpDwarfV2ValueFreePascalShortString.GetAsString: AnsiString;
|
||||
function TFpValueDwarfV2FreePascalShortString.GetAsString: AnsiString;
|
||||
var
|
||||
len: QWord;
|
||||
LenSym, StSym: TFpDwarfValue;
|
||||
LenSym, StSym: TFpValueDwarf;
|
||||
begin
|
||||
if FValueDone then
|
||||
exit(FValue);
|
||||
|
||||
LenSym := TFpDwarfValue(GetInternMemberByName('length'));
|
||||
assert(LenSym is TFpDwarfValue, 'LenSym is TFpDwarfValue');
|
||||
LenSym := TFpValueDwarf(GetInternMemberByName('length'));
|
||||
assert(LenSym is TFpValueDwarf, 'LenSym is TFpValueDwarf');
|
||||
len := LenSym.AsCardinal;
|
||||
|
||||
if (TypeInfo.Size < 0) or (len > TypeInfo.Size) then begin
|
||||
@ -587,8 +587,8 @@ begin
|
||||
exit('');
|
||||
end;
|
||||
|
||||
StSym := TFpDwarfValue(GetInternMemberByName('st'));
|
||||
assert(StSym is TFpDwarfValue, 'StSym is TFpDwarfValue');
|
||||
StSym := TFpValueDwarf(GetInternMemberByName('st'));
|
||||
assert(StSym is TFpValueDwarf, 'StSym is TFpValueDwarf');
|
||||
|
||||
|
||||
|
||||
@ -604,28 +604,28 @@ begin
|
||||
FValueDone := True;
|
||||
end;
|
||||
|
||||
function TFpDwarfV2ValueFreePascalShortString.GetAsWideString: WideString;
|
||||
function TFpValueDwarfV2FreePascalShortString.GetAsWideString: WideString;
|
||||
begin
|
||||
Result := GetAsString;
|
||||
end;
|
||||
|
||||
{ TFpDwarfFreePascalSymbolTypeArray }
|
||||
{ TFpSymbolDwarfFreePascalSymbolTypeArray }
|
||||
|
||||
function TFpDwarfFreePascalSymbolTypeArray.GetTypedValueObject(
|
||||
ATypeCast: Boolean): TFpDwarfValue;
|
||||
function TFpSymbolDwarfFreePascalSymbolTypeArray.GetTypedValueObject(
|
||||
ATypeCast: Boolean): TFpValueDwarf;
|
||||
begin
|
||||
Result := TFpDwarfValueFreePascalArray.Create(Self);
|
||||
Result := TFpValueDwarfFreePascalArray.Create(Self);
|
||||
end;
|
||||
|
||||
{ TFpDwarfValueFreePascalArray }
|
||||
{ TFpValueDwarfFreePascalArray }
|
||||
|
||||
function TFpDwarfValueFreePascalArray.GetMemberCount: Integer;
|
||||
function TFpValueDwarfFreePascalArray.GetMemberCount: Integer;
|
||||
var
|
||||
t, t2: TFpDbgSymbol;
|
||||
t, t2: TFpSymbol;
|
||||
Info: TDwarfInformationEntry;
|
||||
n: AnsiString;
|
||||
UpperBoundSym: TFpDwarfSymbol;
|
||||
val: TFpDbgValue;
|
||||
UpperBoundSym: TFpSymbolDwarf;
|
||||
val: TFpValue;
|
||||
l, h: Int64;
|
||||
Addr: TFpDbgMemLocation;
|
||||
begin
|
||||
@ -635,23 +635,23 @@ begin
|
||||
exit(inherited GetMemberCount);
|
||||
|
||||
t2 := t.Member[0]; // IndexType[0];
|
||||
if not (t2 is TFpDwarfSymbolTypeSubRange) then
|
||||
if not (t2 is TFpSymbolDwarfTypeSubRange) then
|
||||
exit(inherited GetMemberCount);
|
||||
|
||||
|
||||
TFpDwarfSymbolTypeSubRange(t2).GetValueBounds(Self, l, h);
|
||||
TFpSymbolDwarfTypeSubRange(t2).GetValueBounds(Self, l, h);
|
||||
if (l <> 0) or
|
||||
(TFpDwarfSymbolTypeSubRange(t2).LowBoundState <> rfConst) or
|
||||
(TFpDwarfSymbolTypeSubRange(t2).HighBoundState <> rfNotFound) or
|
||||
(TFpDwarfSymbolTypeSubRange(t2).CountState <> rfNotFound)
|
||||
(TFpSymbolDwarfTypeSubRange(t2).LowBoundState <> rfConst) or
|
||||
(TFpSymbolDwarfTypeSubRange(t2).HighBoundState <> rfNotFound) or
|
||||
(TFpSymbolDwarfTypeSubRange(t2).CountState <> rfNotFound)
|
||||
then
|
||||
exit(inherited GetMemberCount);
|
||||
|
||||
// Check for open array param
|
||||
if (t is TFpDwarfSymbolTypeArray) and
|
||||
(DbgSymbol is TFpDwarfSymbolValueParameter) // open array exists only as param
|
||||
if (t is TFpSymbolDwarfTypeArray) and
|
||||
(DbgSymbol is TFpSymbolDwarfDataParameter) // open array exists only as param
|
||||
then begin
|
||||
Info := TFpDwarfSymbolValueParameter(DbgSymbol).InformationEntry.Clone;
|
||||
Info := TFpSymbolDwarfDataParameter(DbgSymbol).InformationEntry.Clone;
|
||||
Info.GoNext;
|
||||
if Info.HasValidScope and
|
||||
Info.HasAttrib(DW_AT_location) and // the high param must have a location / cannot be a constant
|
||||
@ -660,10 +660,10 @@ begin
|
||||
if (n <> '') and (n[1] = '$') then // dwarf3 // TODO: make required in dwarf3
|
||||
delete(n, 1, 1);
|
||||
if (copy(n,1,4) = 'high') and (UpperCase(copy(n, 5, length(n))) = UpperCase(DbgSymbol.Name)) then begin
|
||||
UpperBoundSym := TFpDwarfSymbol.CreateSubClass('', Info);
|
||||
UpperBoundSym := TFpSymbolDwarf.CreateSubClass('', Info);
|
||||
if UpperBoundSym <> nil then begin
|
||||
val := UpperBoundSym.Value;
|
||||
TFpDwarfValue(val).Context := Context;
|
||||
TFpValueDwarf(val).Context := Context;
|
||||
//l := t2.OrdLowBound;
|
||||
h := Val.AsInteger;
|
||||
if h > l then begin
|
||||
@ -686,12 +686,12 @@ begin
|
||||
|
||||
// dynamic array
|
||||
if (sfDynArray in t.Flags) and (AsCardinal <> 0) and
|
||||
GetDwarfDataAddress(Addr, TFpDwarfSymbolType(Owner))
|
||||
GetDwarfDataAddress(Addr, TFpSymbolDwarfType(Owner))
|
||||
then begin
|
||||
if not (IsReadableMem(Addr) and (LocToAddr(Addr) > AddressSize)) then
|
||||
exit(0); // dyn array, but bad data
|
||||
Addr.Address := Addr.Address - AddressSize;
|
||||
//debugln(['TFpDwarfValueArray.GetMemberCount XXXXXXXXXXXXXXX dwarf 2 read len']);
|
||||
//debugln(['TFpValueDwarfArray.GetMemberCount XXXXXXXXXXXXXXX dwarf 2 read len']);
|
||||
if MemManager.ReadSignedInt(Addr, AddressSize, h) then begin
|
||||
Result := Integer(h)+1;
|
||||
exit;
|
||||
@ -706,13 +706,13 @@ begin
|
||||
Result := inherited GetMemberCount;
|
||||
end;
|
||||
|
||||
{ TFpDwarfV3FreePascalSymbolTypeArray }
|
||||
{ TFpSymbolDwarfV3FreePascalSymbolTypeArray }
|
||||
|
||||
function TFpDwarfV3FreePascalSymbolTypeArray.GetInternalStringType: TArrayOrStringType;
|
||||
function TFpSymbolDwarfV3FreePascalSymbolTypeArray.GetInternalStringType: TArrayOrStringType;
|
||||
var
|
||||
Info: TDwarfInformationEntry;
|
||||
t: Cardinal;
|
||||
t2: TFpDbgSymbol;
|
||||
t2: TFpSymbol;
|
||||
begin
|
||||
Result := FArrayOrStringType;
|
||||
if Result <> iasUnknown then
|
||||
@ -755,16 +755,16 @@ begin
|
||||
Info.ReleaseReference;
|
||||
end;
|
||||
|
||||
function TFpDwarfV3FreePascalSymbolTypeArray.GetTypedValueObject(
|
||||
ATypeCast: Boolean): TFpDwarfValue;
|
||||
function TFpSymbolDwarfV3FreePascalSymbolTypeArray.GetTypedValueObject(
|
||||
ATypeCast: Boolean): TFpValueDwarf;
|
||||
begin
|
||||
if GetInternalStringType in [{iasShortString,} iasAnsiString, iasUnicodeString] then
|
||||
Result := TFpDwarfV3ValueFreePascalString.Create(Self)
|
||||
Result := TFpValueDwarfV3FreePascalString.Create(Self)
|
||||
else
|
||||
Result := inherited GetTypedValueObject(ATypeCast);
|
||||
end;
|
||||
|
||||
procedure TFpDwarfV3FreePascalSymbolTypeArray.KindNeeded;
|
||||
procedure TFpSymbolDwarfV3FreePascalSymbolTypeArray.KindNeeded;
|
||||
begin
|
||||
case GetInternalStringType of
|
||||
iasShortString:
|
||||
@ -778,17 +778,17 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
{ TFpDwarfV3ValueFreePascalString }
|
||||
{ TFpValueDwarfV3FreePascalString }
|
||||
|
||||
function TFpDwarfV3ValueFreePascalString.IsValidTypeCast: Boolean;
|
||||
function TFpValueDwarfV3FreePascalString.IsValidTypeCast: Boolean;
|
||||
var
|
||||
f: TFpDbgValueFieldFlags;
|
||||
f: TFpValueFieldFlags;
|
||||
begin
|
||||
Result := HasTypeCastInfo;
|
||||
If not Result then
|
||||
exit;
|
||||
|
||||
assert(TypeCastTargetType.Kind in [skString, skWideString], 'TFpDwarfValueArray.IsValidTypeCast: TypeCastTargetType.Kind = skArray');
|
||||
assert(TypeCastTargetType.Kind in [skString, skWideString], 'TFpValueDwarfArray.IsValidTypeCast: TypeCastTargetType.Kind = skArray');
|
||||
|
||||
f := TypeCastSourceValue.FieldFlags;
|
||||
if (f * [svfAddress, svfSize, svfSizeOfPointer] = [svfAddress]) or
|
||||
@ -817,21 +817,21 @@ begin
|
||||
Result := False;
|
||||
end;
|
||||
|
||||
procedure TFpDwarfV3ValueFreePascalString.Reset;
|
||||
procedure TFpValueDwarfV3FreePascalString.Reset;
|
||||
begin
|
||||
inherited Reset;
|
||||
FValueDone := False;
|
||||
end;
|
||||
|
||||
function TFpDwarfV3ValueFreePascalString.GetFieldFlags: TFpDbgValueFieldFlags;
|
||||
function TFpValueDwarfV3FreePascalString.GetFieldFlags: TFpValueFieldFlags;
|
||||
begin
|
||||
Result := inherited GetFieldFlags;
|
||||
Result := Result + [svfString];
|
||||
end;
|
||||
|
||||
function TFpDwarfV3ValueFreePascalString.GetAsString: AnsiString;
|
||||
function TFpValueDwarfV3FreePascalString.GetAsString: AnsiString;
|
||||
var
|
||||
t, t2: TFpDbgSymbol;
|
||||
t, t2: TFpSymbol;
|
||||
LowBound, HighBound, i: Int64;
|
||||
Addr, Addr2: TFpDbgMemLocation;
|
||||
WResult: UnicodeString;
|
||||
@ -851,7 +851,7 @@ begin
|
||||
exit;
|
||||
|
||||
t2 := t.Member[0]; // subrange type
|
||||
if not( (t2 is TFpDwarfSymbolType) and TFpDwarfSymbolType(t2).GetValueBounds(self, LowBound, HighBound) )
|
||||
if not( (t2 is TFpSymbolDwarfType) and TFpSymbolDwarfType(t2).GetValueBounds(self, LowBound, HighBound) )
|
||||
then
|
||||
exit;
|
||||
|
||||
@ -861,14 +861,14 @@ begin
|
||||
if not IsReadableLoc(Addr) then
|
||||
exit;
|
||||
|
||||
assert((Owner <> nil) and (Owner.CompilationUnit <> nil) and (Owner.CompilationUnit.DwarfSymbolClassMap is TFpDwarfFreePascalSymbolClassMapDwarf3), 'TFpDwarfV3ValueFreePascalString.GetAsString: (Owner <> nil) and (Owner.CompilationUnit <> nil) and (Owner.CompilationUnit.DwarfSymbolClassMap is TFpDwarfFreePascalSymbolClassMapDwarf3)');
|
||||
assert((Owner <> nil) and (Owner.CompilationUnit <> nil) and (Owner.CompilationUnit.DwarfSymbolClassMap is TFpDwarfFreePascalSymbolClassMapDwarf3), 'TFpValueDwarfV3FreePascalString.GetAsString: (Owner <> nil) and (Owner.CompilationUnit <> nil) and (Owner.CompilationUnit.DwarfSymbolClassMap is TFpDwarfFreePascalSymbolClassMapDwarf3)');
|
||||
if (TFpDwarfFreePascalSymbolClassMapDwarf3(Owner.CompilationUnit.DwarfSymbolClassMap).FCompilerVersion > 0) and
|
||||
(TFpDwarfFreePascalSymbolClassMapDwarf3(Owner.CompilationUnit.DwarfSymbolClassMap).FCompilerVersion < $030100)
|
||||
then begin
|
||||
if t.Kind = skWideString then begin
|
||||
if (t2 is TFpDwarfSymbolTypeSubRange) and (LowBound = 1) then begin
|
||||
if (TFpDwarfSymbolTypeSubRange(t2).InformationEntry.GetAttribData(DW_AT_upper_bound, AttrData)) and
|
||||
(TFpDwarfSymbolTypeSubRange(t2).InformationEntry.AttribForm[AttrData.Idx] = DW_FORM_block1) and
|
||||
if (t2 is TFpSymbolDwarfTypeSubRange) and (LowBound = 1) then begin
|
||||
if (TFpSymbolDwarfTypeSubRange(t2).InformationEntry.GetAttribData(DW_AT_upper_bound, AttrData)) and
|
||||
(TFpSymbolDwarfTypeSubRange(t2).InformationEntry.AttribForm[AttrData.Idx] = DW_FORM_block1) and
|
||||
(IsReadableMem(Addr) and (LocToAddr(Addr) > AddressSize))
|
||||
then begin
|
||||
// fpc issue 0035359
|
||||
@ -914,7 +914,7 @@ begin
|
||||
|
||||
end;
|
||||
|
||||
function TFpDwarfV3ValueFreePascalString.GetAsWideString: WideString;
|
||||
function TFpValueDwarfV3FreePascalString.GetAsWideString: WideString;
|
||||
begin
|
||||
// todo: widestring, but currently that is encoded as PWideChar
|
||||
Result := GetAsString;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -46,7 +46,7 @@ uses
|
||||
|
||||
|
||||
{$ifdef windows}
|
||||
procedure AddSymbols(AParent: TFpDbgSymbol; AModule: THandle);
|
||||
procedure AddSymbols(AParent: TFpSymbol; AModule: THandle);
|
||||
{$endif}
|
||||
|
||||
implementation
|
||||
@ -55,7 +55,7 @@ var
|
||||
DBG_WARNINGS, FPDBG_DWARF_VERBOSE_LOAD: PLazLoggerLogGroup;
|
||||
|
||||
{$ifdef windows}
|
||||
procedure AddSymbols(AParent: TFpDbgSymbol; AModule: THandle);
|
||||
procedure AddSymbols(AParent: TFpSymbol; AModule: THandle);
|
||||
var
|
||||
ModulePtr: Pointer;
|
||||
//Is64: Boolean;
|
||||
|
||||
@ -31,7 +31,7 @@ type
|
||||
function GetSizeOfAddress: Integer; override;
|
||||
public
|
||||
constructor Create(AFpSymbolInfo: TFpSymbolInfo);
|
||||
function FindSymbol(const AName: String): TFpDbgValue; override;
|
||||
function FindSymbol(const AName: String): TFpValue; override;
|
||||
end;
|
||||
|
||||
{ TFpSymbolInfo }
|
||||
@ -46,8 +46,8 @@ type
|
||||
destructor Destroy; override;
|
||||
function FindContext(AThreadId, AStackFrame: Integer; AAddress: TDbgPtr = 0): TFpDbgInfoContext; override;
|
||||
function FindContext(AAddress: TDbgPtr): TFpDbgInfoContext; override;
|
||||
function FindSymbol(AAddress: TDbgPtr): TFpDbgSymbol; override;
|
||||
function FindSymbol(const AName: String): TFpDbgSymbol; override;
|
||||
function FindSymbol(AAddress: TDbgPtr): TFpSymbol; override;
|
||||
function FindSymbol(const AName: String): TFpSymbol; override;
|
||||
property Image64Bit: boolean read FImage64Bit;
|
||||
end;
|
||||
|
||||
@ -85,7 +85,7 @@ begin
|
||||
FSizeOfAddress:=4;
|
||||
end;
|
||||
|
||||
function TFpSymbolContext.FindSymbol(const AName: String): TFpDbgValue;
|
||||
function TFpSymbolContext.FindSymbol(const AName: String): TFpValue;
|
||||
var
|
||||
i: integer;
|
||||
val: TFpDbgMemLocation;
|
||||
@ -95,7 +95,7 @@ begin
|
||||
begin
|
||||
val.Address:=FFpSymbolInfo.FSymbolList.Data[i];
|
||||
val.MType:=mlfTargetMem;
|
||||
result := TFpDbgValueConstAddress.Create(val);
|
||||
result := TFpValueConstAddress.Create(val);
|
||||
end
|
||||
else
|
||||
result := nil;
|
||||
@ -135,12 +135,12 @@ begin
|
||||
Result:=FContext;
|
||||
end;
|
||||
|
||||
function TFpSymbolInfo.FindSymbol(AAddress: TDbgPtr): TFpDbgSymbol;
|
||||
function TFpSymbolInfo.FindSymbol(AAddress: TDbgPtr): TFpSymbol;
|
||||
begin
|
||||
Result:=inherited FindSymbol(AAddress);
|
||||
end;
|
||||
|
||||
function TFpSymbolInfo.FindSymbol(const AName: String): TFpDbgSymbol;
|
||||
function TFpSymbolInfo.FindSymbol(const AName: String): TFpSymbol;
|
||||
begin
|
||||
result := nil;
|
||||
//Result:=FContext.FindSymbol(AName);
|
||||
|
||||
@ -54,7 +54,7 @@ type
|
||||
FAddressSize: Integer;
|
||||
FMemManager: TFpDbgMemManager;
|
||||
function InternalPrintValue(out APrintedValue: String;
|
||||
AValue: TFpDbgValue;
|
||||
AValue: TFpValue;
|
||||
AnAddressSize: Integer;
|
||||
AFlags: TFpPrettyPrintValueFlags;
|
||||
ANestLevel: Integer; AnIndent: String;
|
||||
@ -66,14 +66,14 @@ type
|
||||
public
|
||||
constructor Create(AnAddressSize: Integer);
|
||||
function PrintValue(out APrintedValue: String;
|
||||
AValue: TFpDbgValue;
|
||||
AValue: TFpValue;
|
||||
ADisplayFormat: TWatchDisplayFormat = wdfDefault;
|
||||
ARepeatCount: Integer = -1;
|
||||
AOptions: TFpPrettyPrintOptions = []
|
||||
): Boolean;
|
||||
function PrintValue(out APrintedValue: String;
|
||||
out ADBGTypeInfo: TDBGType;
|
||||
AValue: TFpDbgValue;
|
||||
AValue: TFpValue;
|
||||
ADisplayFormat: TWatchDisplayFormat = wdfDefault;
|
||||
ARepeatCount: Integer = -1
|
||||
): Boolean;
|
||||
@ -83,15 +83,15 @@ type
|
||||
|
||||
|
||||
|
||||
function GetTypeName(out ATypeName: String; ADbgSymbol: TFpDbgSymbol; AFlags: TTypeNameFlags = []): Boolean;
|
||||
function GetTypeAsDeclaration(out ATypeDeclaration: String; ADbgSymbol: TFpDbgSymbol;
|
||||
function GetTypeName(out ATypeName: String; ADbgSymbol: TFpSymbol; AFlags: TTypeNameFlags = []): Boolean;
|
||||
function GetTypeAsDeclaration(out ATypeDeclaration: String; ADbgSymbol: TFpSymbol;
|
||||
AFlags: TTypeDeclarationFlags = []; AnIndent: Integer = 0): Boolean;
|
||||
|
||||
function QuoteText(AText: Utf8String): UTf8String;
|
||||
|
||||
implementation
|
||||
|
||||
function GetTypeName(out ATypeName: String; ADbgSymbol: TFpDbgSymbol;
|
||||
function GetTypeName(out ATypeName: String; ADbgSymbol: TFpSymbol;
|
||||
AFlags: TTypeNameFlags): Boolean;
|
||||
var
|
||||
s: String;
|
||||
@ -134,7 +134,7 @@ begin
|
||||
|
||||
end;
|
||||
|
||||
function GetTypeAsDeclaration(out ATypeDeclaration: String; ADbgSymbol: TFpDbgSymbol;
|
||||
function GetTypeAsDeclaration(out ATypeDeclaration: String; ADbgSymbol: TFpSymbol;
|
||||
AFlags: TTypeDeclarationFlags; AnIndent: Integer): Boolean;
|
||||
var
|
||||
IndentString: String;
|
||||
@ -183,7 +183,7 @@ var
|
||||
|
||||
var
|
||||
c, i: Integer;
|
||||
m: TFpDbgSymbol;
|
||||
m: TFpSymbol;
|
||||
s: String;
|
||||
begin
|
||||
Result := True;
|
||||
@ -262,7 +262,7 @@ var
|
||||
function GetParameterList(out ADeclaration: String): Boolean;
|
||||
var
|
||||
i: Integer;
|
||||
m: TFpDbgSymbol;
|
||||
m: TFpSymbol;
|
||||
name, lname: String;
|
||||
begin
|
||||
ADeclaration := '';
|
||||
@ -348,7 +348,7 @@ var
|
||||
function GetEnumType(out ADeclaration: String): Boolean;
|
||||
var
|
||||
i, j, val: Integer;
|
||||
m: TFpDbgSymbol;
|
||||
m: TFpSymbol;
|
||||
begin
|
||||
// TODO assigned value (a,b:=3,...)
|
||||
Result := True;
|
||||
@ -373,7 +373,7 @@ var
|
||||
|
||||
function GetSetType(out ADeclaration: String): Boolean;
|
||||
var
|
||||
t: TFpDbgSymbol;
|
||||
t: TFpSymbol;
|
||||
s: String;
|
||||
lb, hb: Int64;
|
||||
begin
|
||||
@ -407,7 +407,7 @@ var
|
||||
|
||||
function GetArrayType(out ADeclaration: String): Boolean;
|
||||
var
|
||||
t: TFpDbgSymbol;
|
||||
t: TFpSymbol;
|
||||
s: String;
|
||||
i: Integer;
|
||||
lb, hb: Int64;
|
||||
@ -594,7 +594,7 @@ end;
|
||||
{ TFpPascalPrettyPrinter }
|
||||
|
||||
function TFpPascalPrettyPrinter.InternalPrintValue(out APrintedValue: String;
|
||||
AValue: TFpDbgValue; AnAddressSize: Integer; AFlags: TFpPrettyPrintValueFlags;
|
||||
AValue: TFpValue; AnAddressSize: Integer; AFlags: TFpPrettyPrintValueFlags;
|
||||
ANestLevel: Integer; AnIndent: String; ADisplayFormat: TWatchDisplayFormat;
|
||||
ARepeatCount: Integer; ADBGTypeInfo: PDBGType; AOptions: TFpPrettyPrintOptions): Boolean;
|
||||
|
||||
@ -606,7 +606,7 @@ function TFpPascalPrettyPrinter.InternalPrintValue(out APrintedValue: String;
|
||||
then
|
||||
Result := '';
|
||||
end;
|
||||
function ResTypeName(AVal : TFpDbgValue): String;
|
||||
function ResTypeName(AVal : TFpValue): String;
|
||||
begin
|
||||
if not((AVal.TypeInfo<> nil) and
|
||||
GetTypeName(Result, AVal.TypeInfo, []))
|
||||
@ -670,10 +670,10 @@ function TFpPascalPrettyPrinter.InternalPrintValue(out APrintedValue: String;
|
||||
procedure DoFunction;
|
||||
var
|
||||
s: String;
|
||||
proc: TFpDwarfSymbol;
|
||||
proc: TFpSymbolDwarf;
|
||||
v: TDBGPtr;
|
||||
t: TFpDbgSymbol;
|
||||
par: TFpDwarfValue;
|
||||
t: TFpSymbol;
|
||||
par: TFpValueDwarf;
|
||||
begin
|
||||
proc := nil;
|
||||
v := AValue.DataAddress.Address;
|
||||
@ -691,13 +691,13 @@ function TFpPascalPrettyPrinter.InternalPrintValue(out APrintedValue: String;
|
||||
APrintedValue := '$'+IntToHex(v, AnAddressSize*2);
|
||||
|
||||
t := AValue.TypeInfo;
|
||||
proc := TFpDwarfSymbol(TDbgDwarfSymbolBase(t).CompilationUnit.Owner.FindSymbol(v));
|
||||
proc := TFpSymbolDwarf(TDbgDwarfSymbolBase(t).CompilationUnit.Owner.FindSymbol(v));
|
||||
if proc <> nil then begin
|
||||
//t := proc;
|
||||
s := proc.Name;
|
||||
par := nil;
|
||||
if (proc is TFpDwarfSymbolValueProc) then
|
||||
par := TFpDwarfSymbolValueProc(proc).GetSelfParameter;
|
||||
if (proc is TFpSymbolDwarfDataProc) then
|
||||
par := TFpSymbolDwarfDataProc(proc).GetSelfParameter;
|
||||
if (par <> nil) and (par.TypeInfo <> nil) then
|
||||
s := par.TypeInfo.Name + '.' + s;
|
||||
APrintedValue := APrintedValue + ' = ' + s; // TODO: offset to startaddress
|
||||
@ -705,7 +705,7 @@ function TFpPascalPrettyPrinter.InternalPrintValue(out APrintedValue: String;
|
||||
APrintedValue := APrintedValue + ': ';
|
||||
end
|
||||
else
|
||||
t := TFpDwarfValue(AValue).ValueSymbol;
|
||||
t := TFpValueDwarf(AValue).ValueSymbol;
|
||||
|
||||
if AFlags * PV_FORWARD_FLAGS <> [] then
|
||||
GetTypeName(s, t)
|
||||
@ -862,7 +862,7 @@ function TFpPascalPrettyPrinter.InternalPrintValue(out APrintedValue: String;
|
||||
var
|
||||
s: String;
|
||||
i: Integer;
|
||||
m: TFpDbgValue;
|
||||
m: TFpValue;
|
||||
begin
|
||||
APrintedValue := '';
|
||||
for i := 0 to AValue.MemberCount-1 do begin
|
||||
@ -890,10 +890,10 @@ function TFpPascalPrettyPrinter.InternalPrintValue(out APrintedValue: String;
|
||||
var
|
||||
s, s2, MbName, MbVal: String;
|
||||
i: Integer;
|
||||
m: TFpDbgValue;
|
||||
m: TFpValue;
|
||||
fl: TFpPrettyPrintValueFlags;
|
||||
f: TDBGField;
|
||||
ti: TFpDbgSymbol;
|
||||
ti: TFpSymbol;
|
||||
Cache: TFpDbgMemCacheBase;
|
||||
begin
|
||||
if (AValue.Kind = skClass) and (AValue.AsCardinal = 0) then begin
|
||||
@ -1002,7 +1002,7 @@ function TFpPascalPrettyPrinter.InternalPrintValue(out APrintedValue: String;
|
||||
var
|
||||
s: String;
|
||||
i: Integer;
|
||||
m: TFpDbgValue;
|
||||
m: TFpValue;
|
||||
Cnt, FullCnt: Integer;
|
||||
d: Int64;
|
||||
begin
|
||||
@ -1144,7 +1144,7 @@ begin
|
||||
FAddressSize := AnAddressSize;
|
||||
end;
|
||||
|
||||
function TFpPascalPrettyPrinter.PrintValue(out APrintedValue: String; AValue: TFpDbgValue;
|
||||
function TFpPascalPrettyPrinter.PrintValue(out APrintedValue: String; AValue: TFpValue;
|
||||
ADisplayFormat: TWatchDisplayFormat; ARepeatCount: Integer;
|
||||
AOptions: TFpPrettyPrintOptions): Boolean;
|
||||
begin
|
||||
@ -1153,7 +1153,7 @@ begin
|
||||
end;
|
||||
|
||||
function TFpPascalPrettyPrinter.PrintValue(out APrintedValue: String; out
|
||||
ADBGTypeInfo: TDBGType; AValue: TFpDbgValue; ADisplayFormat: TWatchDisplayFormat;
|
||||
ADBGTypeInfo: TDBGType; AValue: TFpValue; ADisplayFormat: TWatchDisplayFormat;
|
||||
ARepeatCount: Integer): Boolean;
|
||||
begin
|
||||
Result := InternalPrintValue(APrintedValue, AValue,
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -31,22 +31,22 @@ type
|
||||
|
||||
procedure AssertEqualsQW(const AMessage: string; Expected, Actual: QWord);
|
||||
|
||||
procedure ExpTestFlags(AVal: TFpDbgValue; ATestFlags: TTestFlags = []);
|
||||
procedure ExpKind(AVal: TFpDbgValue; AExpKind: TDbgSymbolKind; TestFlags: TTestFlags = []);
|
||||
procedure ExpFlags(AVal: TFpDbgValue; AExpFlags: TFpDbgValueFieldFlags; ExpNotFlags: TFpDbgValueFieldFlags = []);
|
||||
procedure ExpResult(AVal: TFpDbgValue; Field: TFpDbgValueFieldFlag; ExpValue: QWord);
|
||||
procedure ExpResult(AVal: TFpDbgValue; Field: TFpDbgValueFieldFlag; ExpValue: Int64);
|
||||
procedure ExpResult(AVal: TFpDbgValue; Field: TFpDbgValueFieldFlag; ExpValue: Boolean);
|
||||
procedure ExpResult(AVal: TFpDbgValue; Field: TFpDbgValueFieldFlag; ExpValue: String);
|
||||
procedure ExpResult(AVal: TFpDbgValue; Field: TFpDbgValueFieldFlag; ExpValue: WideString);
|
||||
procedure ExpMemberCount(AVal: TFpDbgValue; ExpValue: Integer);
|
||||
procedure ExpTestFlags(AVal: TFpValue; ATestFlags: TTestFlags = []);
|
||||
procedure ExpKind(AVal: TFpValue; AExpKind: TDbgSymbolKind; TestFlags: TTestFlags = []);
|
||||
procedure ExpFlags(AVal: TFpValue; AExpFlags: TFpValueFieldFlags; ExpNotFlags: TFpValueFieldFlags = []);
|
||||
procedure ExpResult(AVal: TFpValue; Field: TFpValueFieldFlag; ExpValue: QWord);
|
||||
procedure ExpResult(AVal: TFpValue; Field: TFpValueFieldFlag; ExpValue: Int64);
|
||||
procedure ExpResult(AVal: TFpValue; Field: TFpValueFieldFlag; ExpValue: Boolean);
|
||||
procedure ExpResult(AVal: TFpValue; Field: TFpValueFieldFlag; ExpValue: String);
|
||||
procedure ExpResult(AVal: TFpValue; Field: TFpValueFieldFlag; ExpValue: WideString);
|
||||
procedure ExpMemberCount(AVal: TFpValue; ExpValue: Integer);
|
||||
|
||||
procedure ExpFlags(AExpFlags: TFpDbgValueFieldFlags; ExpNotFlags: TFpDbgValueFieldFlags = []);
|
||||
procedure ExpResult(Field: TFpDbgValueFieldFlag; ExpValue: QWord);
|
||||
procedure ExpResult(Field: TFpDbgValueFieldFlag; ExpValue: Int64);
|
||||
procedure ExpResult(Field: TFpDbgValueFieldFlag; ExpValue: Boolean);
|
||||
procedure ExpResult(Field: TFpDbgValueFieldFlag; ExpValue: String);
|
||||
procedure ExpResult(Field: TFpDbgValueFieldFlag; ExpValue: WideString);
|
||||
procedure ExpFlags(AExpFlags: TFpValueFieldFlags; ExpNotFlags: TFpValueFieldFlags = []);
|
||||
procedure ExpResult(Field: TFpValueFieldFlag; ExpValue: QWord);
|
||||
procedure ExpResult(Field: TFpValueFieldFlag; ExpValue: Int64);
|
||||
procedure ExpResult(Field: TFpValueFieldFlag; ExpValue: Boolean);
|
||||
procedure ExpResult(Field: TFpValueFieldFlag; ExpValue: String);
|
||||
procedure ExpResult(Field: TFpValueFieldFlag; ExpValue: WideString);
|
||||
procedure ExpMemberCount(ExpValue: Integer);
|
||||
|
||||
procedure InitTest(Expr: String; ExtraName: String = '');
|
||||
@ -73,7 +73,7 @@ begin
|
||||
AssertTrue(AMessage + ComparisonMsg(IntToStr(Expected), IntToStr(Actual)), Expected = Actual);
|
||||
end;
|
||||
|
||||
procedure TTestTypeInfo.ExpTestFlags(AVal: TFpDbgValue; ATestFlags: TTestFlags);
|
||||
procedure TTestTypeInfo.ExpTestFlags(AVal: TFpValue; ATestFlags: TTestFlags);
|
||||
var
|
||||
i: TTestFlag;
|
||||
begin
|
||||
@ -90,7 +90,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TTestTypeInfo.ExpKind(AVal: TFpDbgValue; AExpKind: TDbgSymbolKind;
|
||||
procedure TTestTypeInfo.ExpKind(AVal: TFpValue; AExpKind: TDbgSymbolKind;
|
||||
TestFlags: TTestFlags);
|
||||
var
|
||||
s: String;
|
||||
@ -139,28 +139,28 @@ begin
|
||||
FCurrentTestName := s;
|
||||
end;
|
||||
|
||||
procedure TTestTypeInfo.ExpFlags(AVal: TFpDbgValue; AExpFlags: TFpDbgValueFieldFlags;
|
||||
ExpNotFlags: TFpDbgValueFieldFlags);
|
||||
procedure TTestTypeInfo.ExpFlags(AVal: TFpValue; AExpFlags: TFpValueFieldFlags;
|
||||
ExpNotFlags: TFpValueFieldFlags);
|
||||
var
|
||||
i: TFpDbgValueFieldFlag;
|
||||
i: TFpValueFieldFlag;
|
||||
s: string;
|
||||
f: TFpDbgValueFieldFlags;
|
||||
f: TFpValueFieldFlags;
|
||||
begin
|
||||
AssertTrue(FCurrentTestName + 'has ResVal', AVal <> nil);
|
||||
f := AVal.FieldFlags;
|
||||
For i := low(TFpDbgValueFieldFlag) to High(TFpDbgValueFieldFlag) do
|
||||
For i := low(TFpValueFieldFlag) to High(TFpValueFieldFlag) do
|
||||
if i in AExpFlags then begin
|
||||
WriteStr(s, i);
|
||||
AssertTrue(FCurrentTestName + 'Has flag' + s, i in f);
|
||||
end;
|
||||
For i := low(TFpDbgValueFieldFlag) to High(TFpDbgValueFieldFlag) do
|
||||
For i := low(TFpValueFieldFlag) to High(TFpValueFieldFlag) do
|
||||
if i in ExpNotFlags then begin
|
||||
WriteStr(s, i);
|
||||
AssertTrue(FCurrentTestName + 'Has NOT flag' + s, not (i in f));
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TTestTypeInfo.ExpResult(AVal: TFpDbgValue; Field: TFpDbgValueFieldFlag;
|
||||
procedure TTestTypeInfo.ExpResult(AVal: TFpValue; Field: TFpValueFieldFlag;
|
||||
ExpValue: QWord);
|
||||
var
|
||||
s: string;
|
||||
@ -179,7 +179,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TTestTypeInfo.ExpResult(AVal: TFpDbgValue; Field: TFpDbgValueFieldFlag;
|
||||
procedure TTestTypeInfo.ExpResult(AVal: TFpValue; Field: TFpValueFieldFlag;
|
||||
ExpValue: Int64);
|
||||
var
|
||||
s: string;
|
||||
@ -198,7 +198,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TTestTypeInfo.ExpResult(AVal: TFpDbgValue; Field: TFpDbgValueFieldFlag;
|
||||
procedure TTestTypeInfo.ExpResult(AVal: TFpValue; Field: TFpValueFieldFlag;
|
||||
ExpValue: Boolean);
|
||||
var
|
||||
s: string;
|
||||
@ -211,7 +211,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TTestTypeInfo.ExpResult(AVal: TFpDbgValue; Field: TFpDbgValueFieldFlag;
|
||||
procedure TTestTypeInfo.ExpResult(AVal: TFpValue; Field: TFpValueFieldFlag;
|
||||
ExpValue: String);
|
||||
var
|
||||
s: string;
|
||||
@ -225,7 +225,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TTestTypeInfo.ExpResult(AVal: TFpDbgValue; Field: TFpDbgValueFieldFlag;
|
||||
procedure TTestTypeInfo.ExpResult(AVal: TFpValue; Field: TFpValueFieldFlag;
|
||||
ExpValue: WideString);
|
||||
var
|
||||
s: string;
|
||||
@ -238,39 +238,39 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TTestTypeInfo.ExpMemberCount(AVal: TFpDbgValue; ExpValue: Integer);
|
||||
procedure TTestTypeInfo.ExpMemberCount(AVal: TFpValue; ExpValue: Integer);
|
||||
begin
|
||||
ExpFlags([svfMembers]);
|
||||
AssertEquals(FCurrentTestName+'MemberCount', ExpValue, AVal.MemberCount);
|
||||
end;
|
||||
|
||||
procedure TTestTypeInfo.ExpFlags(AExpFlags: TFpDbgValueFieldFlags;
|
||||
ExpNotFlags: TFpDbgValueFieldFlags);
|
||||
procedure TTestTypeInfo.ExpFlags(AExpFlags: TFpValueFieldFlags;
|
||||
ExpNotFlags: TFpValueFieldFlags);
|
||||
begin
|
||||
ExpFlags(FExpression.ResultValue, AExpFlags, ExpNotFlags);
|
||||
end;
|
||||
|
||||
procedure TTestTypeInfo.ExpResult(Field: TFpDbgValueFieldFlag; ExpValue: QWord);
|
||||
procedure TTestTypeInfo.ExpResult(Field: TFpValueFieldFlag; ExpValue: QWord);
|
||||
begin
|
||||
ExpResult(FExpression.ResultValue, Field, ExpValue);
|
||||
end;
|
||||
|
||||
procedure TTestTypeInfo.ExpResult(Field: TFpDbgValueFieldFlag; ExpValue: Int64);
|
||||
procedure TTestTypeInfo.ExpResult(Field: TFpValueFieldFlag; ExpValue: Int64);
|
||||
begin
|
||||
ExpResult(FExpression.ResultValue, Field, ExpValue);
|
||||
end;
|
||||
|
||||
procedure TTestTypeInfo.ExpResult(Field: TFpDbgValueFieldFlag; ExpValue: Boolean);
|
||||
procedure TTestTypeInfo.ExpResult(Field: TFpValueFieldFlag; ExpValue: Boolean);
|
||||
begin
|
||||
ExpResult(FExpression.ResultValue, Field, ExpValue);
|
||||
end;
|
||||
|
||||
procedure TTestTypeInfo.ExpResult(Field: TFpDbgValueFieldFlag; ExpValue: String);
|
||||
procedure TTestTypeInfo.ExpResult(Field: TFpValueFieldFlag; ExpValue: String);
|
||||
begin
|
||||
ExpResult(FExpression.ResultValue, Field, ExpValue);
|
||||
end;
|
||||
|
||||
procedure TTestTypeInfo.ExpResult(Field: TFpDbgValueFieldFlag; ExpValue: WideString);
|
||||
procedure TTestTypeInfo.ExpResult(Field: TFpValueFieldFlag; ExpValue: WideString);
|
||||
begin
|
||||
ExpResult(FExpression.ResultValue, Field, ExpValue);
|
||||
end;
|
||||
@ -361,9 +361,9 @@ end;
|
||||
|
||||
procedure TTestTypeInfo.TestExpressionInt;
|
||||
var
|
||||
sym: TFpDbgValue;
|
||||
sym: TFpValue;
|
||||
ImgLoader: TTestLoaderSetupBasic;
|
||||
TmpResVal: TFpDbgValue;
|
||||
TmpResVal: TFpValue;
|
||||
begin
|
||||
InitDwarf(TTestLoaderSetupBasic);
|
||||
ImgLoader := TTestLoaderSetupBasic(FImageLoader);
|
||||
@ -408,9 +408,9 @@ end;
|
||||
|
||||
procedure TTestTypeInfo.TestExpressionBool;
|
||||
var
|
||||
sym: TFpDbgValue;
|
||||
sym: TFpValue;
|
||||
ImgLoader: TTestLoaderSetupBasic;
|
||||
TmpResVal: TFpDbgValue;
|
||||
TmpResVal: TFpValue;
|
||||
i: Integer;
|
||||
s: String;
|
||||
begin
|
||||
@ -472,9 +472,9 @@ end;
|
||||
|
||||
procedure TTestTypeInfo.TestExpressionArray;
|
||||
var
|
||||
sym: TFpDbgValue;
|
||||
sym: TFpValue;
|
||||
ImgLoader: TTestLoaderSetupArray;
|
||||
TmpResVal: TFpDbgValue;
|
||||
TmpResVal: TFpValue;
|
||||
i: Integer;
|
||||
s: String;
|
||||
begin
|
||||
@ -566,13 +566,13 @@ end;
|
||||
|
||||
procedure TTestTypeInfo.TestExpressionStructures;
|
||||
var
|
||||
sym: TFpDbgValue;
|
||||
sym: TFpValue;
|
||||
|
||||
obj1: TTestSetup1Class;
|
||||
obj1c: TTestSetup1ClassChild;
|
||||
vobj1: TTestSetup1Object;
|
||||
i, j: Integer;
|
||||
FieldsExp: TFpDbgValueFieldFlags;
|
||||
FieldsExp: TFpValueFieldFlags;
|
||||
AddrExp: TDbgPtr;
|
||||
s, s2: String;
|
||||
ImgLoader: TTestLoaderSetup1;
|
||||
@ -1167,7 +1167,7 @@ procedure TTestTypeInfo.TestExpressionEnumAndSet;
|
||||
else
|
||||
ExpMemberCount(0);
|
||||
end;
|
||||
function ExpEnumMemberVal(AnIdent: String; AnOrd: QWord): TFpDbgValue;
|
||||
function ExpEnumMemberVal(AnIdent: String; AnOrd: QWord): TFpValue;
|
||||
begin
|
||||
FCurrentTestName := FCurrentTestName + ' (enum-val)';
|
||||
Result := FExpression.ResultValue.Member[0];
|
||||
@ -1199,7 +1199,7 @@ procedure TTestTypeInfo.TestExpressionEnumAndSet;
|
||||
procedure ExpSetIdent(AnIdentList: array of string);
|
||||
var
|
||||
i: Integer;
|
||||
m: TFpDbgValue;
|
||||
m: TFpValue;
|
||||
begin
|
||||
for i := low(AnIdentList) to high(AnIdentList) do begin
|
||||
m := FExpression.ResultValue.Member[i];
|
||||
@ -1212,7 +1212,7 @@ procedure TTestTypeInfo.TestExpressionEnumAndSet;
|
||||
procedure ExpSetOrd(AnIdentList: array of QWord);
|
||||
var
|
||||
i: Integer;
|
||||
m: TFpDbgValue;
|
||||
m: TFpValue;
|
||||
begin
|
||||
for i := low(AnIdentList) to high(AnIdentList) do begin
|
||||
m := FExpression.ResultValue.Member[i];
|
||||
@ -1224,9 +1224,9 @@ procedure TTestTypeInfo.TestExpressionEnumAndSet;
|
||||
|
||||
|
||||
var
|
||||
sym: TFpDbgValue;
|
||||
sym: TFpValue;
|
||||
ImgLoader: TTestLoaderSetupBasic;
|
||||
TmpResVal: TFpDbgValue;
|
||||
TmpResVal: TFpValue;
|
||||
begin
|
||||
InitDwarf(TTestLoaderSetupBasic);
|
||||
ImgLoader := TTestLoaderSetupBasic(FImageLoader);
|
||||
|
||||
@ -621,7 +621,7 @@ var
|
||||
ThreadCallStack: TDbgCallstackEntryList;
|
||||
v, params: String;
|
||||
i: Integer;
|
||||
ProcVal, m: TFpDbgValue;
|
||||
ProcVal, m: TFpValue;
|
||||
RegList: TDbgRegisterValueList;
|
||||
Reg: TDbgRegisterValue;
|
||||
AController: TDbgController;
|
||||
@ -729,9 +729,9 @@ procedure TFPLocals.RequestData(ALocals: TLocals);
|
||||
var
|
||||
AContext: TFpDbgInfoContext;
|
||||
AController: TDbgController;
|
||||
ProcVal: TFpDbgValue;
|
||||
ProcVal: TFpValue;
|
||||
i: Integer;
|
||||
m: TFpDbgValue;
|
||||
m: TFpValue;
|
||||
n, v: String;
|
||||
CurThreadId, CurStackFrame: Integer;
|
||||
AFrame: TDbgCallstackEntry;
|
||||
@ -981,7 +981,7 @@ var
|
||||
ASrcFileName: string;
|
||||
ASrcFileLine: integer;
|
||||
i,j: Integer;
|
||||
Sym: TFpDbgSymbol;
|
||||
Sym: TFpSymbol;
|
||||
StatIndex: integer;
|
||||
FirstIndex: integer;
|
||||
ALastAddr: TDBGPtr;
|
||||
@ -1333,7 +1333,7 @@ var
|
||||
Res: Boolean;
|
||||
StackFrame, ThreadId: Integer;
|
||||
StackList: TCallStackBase;
|
||||
ResValue: TFpDbgValue;
|
||||
ResValue: TFpValue;
|
||||
CastName, ResText2: String;
|
||||
ClassAddr, CNameAddr: TFpDbgMemLocation;
|
||||
NameLen: QWord;
|
||||
@ -1630,7 +1630,7 @@ end;
|
||||
function TFpDebugDebugger.SetSoftwareExceptionBreakpoint: boolean;
|
||||
var
|
||||
AContext: TFpDbgInfoContext;
|
||||
AValue: TFpDbgValue;
|
||||
AValue: TFpValue;
|
||||
AnAddr: TDBGPtr;
|
||||
begin
|
||||
result := false;
|
||||
@ -2174,7 +2174,7 @@ end;
|
||||
|
||||
function TFpDebugDebugger.GetLocationRec(AnAddress: TDBGPtr): TDBGLocationRec;
|
||||
var
|
||||
sym, symproc: TFpDbgSymbol;
|
||||
sym, symproc: TFpSymbol;
|
||||
begin
|
||||
if Assigned(FDbgController.CurrentProcess) then
|
||||
begin
|
||||
|
||||
@ -269,9 +269,9 @@ end;
|
||||
procedure TFPGDBMILocals.ProcessLocals(ALocals: TLocals);
|
||||
var
|
||||
Ctx: TFpDbgInfoContext;
|
||||
ProcVal: TFpDbgValue;
|
||||
ProcVal: TFpValue;
|
||||
i: Integer;
|
||||
m: TFpDbgValue;
|
||||
m: TFpValue;
|
||||
n, v: String;
|
||||
begin
|
||||
Ctx := FpDebugger.GetInfoContextForContext(ALocals.ThreadId, ALocals.StackFrame);
|
||||
@ -958,7 +958,7 @@ begin
|
||||
end;
|
||||
|
||||
type
|
||||
TGDBMIDwarfTypeIdentifier = class(TFpDwarfSymbolType)
|
||||
TGDBMIDwarfTypeIdentifier = class(TFpSymbolDwarfType)
|
||||
public
|
||||
property InformationEntry;
|
||||
end;
|
||||
@ -973,11 +973,11 @@ function TFpGDBMIDebugger.EvaluateExpression(AWatchValue: TWatchValue; AExpressi
|
||||
var
|
||||
Ctx: TFpDbgInfoContext;
|
||||
PasExpr, PasExpr2: TFpPascalExpression;
|
||||
ResValue: TFpDbgValue;
|
||||
ResValue: TFpValue;
|
||||
s: String;
|
||||
DispFormat: TWatchDisplayFormat;
|
||||
RepeatCnt: Integer;
|
||||
TiSym: TFpDbgSymbol;
|
||||
TiSym: TFpSymbol;
|
||||
|
||||
function IsWatchValueAlive: Boolean;
|
||||
begin
|
||||
|
||||
@ -402,9 +402,9 @@ end;
|
||||
procedure TFPLldbLocals.ProcessLocals(ALocals: TLocals);
|
||||
var
|
||||
Ctx: TFpDbgInfoContext;
|
||||
ProcVal: TFpDbgValue;
|
||||
ProcVal: TFpValue;
|
||||
i: Integer;
|
||||
m: TFpDbgValue;
|
||||
m: TFpValue;
|
||||
n, v: String;
|
||||
begin
|
||||
if FLocalsEvalCancel then begin
|
||||
@ -966,7 +966,7 @@ var
|
||||
AnEntry: TDisassemblerEntry;
|
||||
SrcFileName, LineAddrStr: String;
|
||||
i,j, StatIndex, FirstIndex, SrcFileLine: Integer;
|
||||
Sym: TFpDbgSymbol;
|
||||
Sym: TFpSymbol;
|
||||
ALastAddr, LineAddr: TDBGPtr;
|
||||
begin
|
||||
StatIndex := 0;
|
||||
@ -1041,7 +1041,7 @@ end;
|
||||
procedure TFpLldbDebuggerCommandDisassemble.DoExecute;
|
||||
var
|
||||
DInstr: TLldbInstructionDisassem;
|
||||
Sym: TFpDbgSymbol;
|
||||
Sym: TFpSymbol;
|
||||
StartRange, EndRange: TDBGPtr;
|
||||
begin
|
||||
|
||||
@ -1413,11 +1413,11 @@ function TFpLldbDebugger.EvaluateExpression(AWatchValue: TWatchValue; AExpressio
|
||||
var
|
||||
Ctx: TFpDbgInfoContext;
|
||||
PasExpr, PasExpr2: TFpPascalExpression;
|
||||
ResValue: TFpDbgValue;
|
||||
ResValue: TFpValue;
|
||||
s: String;
|
||||
DispFormat: TWatchDisplayFormat;
|
||||
RepeatCnt: Integer;
|
||||
TiSym: TFpDbgSymbol;
|
||||
TiSym: TFpSymbol;
|
||||
|
||||
function IsWatchValueAlive: Boolean;
|
||||
begin
|
||||
|
||||
@ -908,7 +908,7 @@ var
|
||||
SrcLine: longint;
|
||||
{$ENDIF}
|
||||
BadAddresses: TStackLines;
|
||||
sym: TFpDbgSymbol;
|
||||
sym: TFpSymbol;
|
||||
begin
|
||||
Result := False;
|
||||
{$IFDEF LEAK_RESOLVE_USE_FPC}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user