mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-15 01:19:29 +02:00
FpDebug: Allow structure/class members to have DW_AT_const_value
git-svn-id: trunk@63769 -
This commit is contained in:
parent
ee5e720d74
commit
67a21fe3bb
@ -851,6 +851,8 @@ DECL = DW_AT_decl_column, DW_AT_decl_file, DW_AT_decl_line
|
|||||||
{ TFpSymbolDwarfDataMember }
|
{ TFpSymbolDwarfDataMember }
|
||||||
|
|
||||||
TFpSymbolDwarfDataMember = class(TFpSymbolDwarfDataWithLocation)
|
TFpSymbolDwarfDataMember = class(TFpSymbolDwarfDataWithLocation)
|
||||||
|
private
|
||||||
|
FConstData: TByteDynArray;
|
||||||
protected
|
protected
|
||||||
function DoReadSize(const AValueObj: TFpValue; out ASize: TFpDbgValueSize): Boolean; override;
|
function DoReadSize(const AValueObj: TFpValue; out ASize: TFpDbgValueSize): Boolean; override;
|
||||||
function GetValueAddress(AValueObj: TFpValueDwarf; out AnAddress: TFpDbgMemLocation): Boolean; override;
|
function GetValueAddress(AValueObj: TFpValueDwarf; out AnAddress: TFpDbgMemLocation): Boolean; override;
|
||||||
@ -4759,6 +4761,14 @@ begin
|
|||||||
if AValueObj = nil then debugln([FPDBG_DWARF_VERBOSE, 'TFpSymbolDwarfDataMember.InitLocationParser: NO VAl Obj !!!!!!!!!!!!!!!'])
|
if AValueObj = nil then debugln([FPDBG_DWARF_VERBOSE, 'TFpSymbolDwarfDataMember.InitLocationParser: NO VAl Obj !!!!!!!!!!!!!!!'])
|
||||||
else if AValueObj.StructureValue = nil then debugln(FPDBG_DWARF_VERBOSE, ['TFpSymbolDwarfDataMember.InitLocationParser: NO STRUCT Obj !!!!!!!!!!!!!!!']);
|
else if AValueObj.StructureValue = nil then debugln(FPDBG_DWARF_VERBOSE, ['TFpSymbolDwarfDataMember.InitLocationParser: NO STRUCT Obj !!!!!!!!!!!!!!!']);
|
||||||
|
|
||||||
|
if InformationEntry.HasAttrib(DW_AT_const_value) then begin
|
||||||
|
// fpc specific => constant members
|
||||||
|
Result := ConstantFromTag(DW_AT_const_value, FConstData, AnAddress);
|
||||||
|
exit;
|
||||||
|
// There should not be a DW_AT_data_member_location
|
||||||
|
end;
|
||||||
|
|
||||||
|
AnAddress := InvalidLoc;
|
||||||
if (AValueObj = nil) or (AValueObj.StructureValue = nil) or (AValueObj.FParentTypeSymbol = nil)
|
if (AValueObj = nil) or (AValueObj.StructureValue = nil) or (AValueObj.FParentTypeSymbol = nil)
|
||||||
then begin
|
then begin
|
||||||
debugln(FPDBG_DWARF_ERRORS, ['DWARF ERROR in TFpSymbolDwarfDataMember.InitLocationParser ']);
|
debugln(FPDBG_DWARF_ERRORS, ['DWARF ERROR in TFpSymbolDwarfDataMember.InitLocationParser ']);
|
||||||
|
Loading…
Reference in New Issue
Block a user