mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-15 18:29:09 +02:00
* Dwarf3: Classes are not encoded as a pointer to a class-structure, but
as a class-structure directly. Make sure that in this case: - The size is the size of the structure, not the size of a pointer - The (hidden) pointer is dereferenced - The class is marked as unallocated when the (hidden) pointer is nil git-svn-id: trunk@16674 -
This commit is contained in:
parent
dbb2a44286
commit
a7cea8606f
@ -3801,13 +3801,20 @@ implementation
|
|||||||
begin
|
begin
|
||||||
if assigned(def.objname) then
|
if assigned(def.objname) then
|
||||||
append_entry(tag,true,[
|
append_entry(tag,true,[
|
||||||
DW_AT_name,DW_FORM_string,def.objrealname^+#0,
|
DW_AT_name,DW_FORM_string,def.objrealname^+#0
|
||||||
DW_AT_byte_size,DW_FORM_udata,def.size
|
|
||||||
])
|
])
|
||||||
else
|
else
|
||||||
append_entry(DW_TAG_structure_type,true,[
|
append_entry(DW_TAG_structure_type,true,[]);
|
||||||
DW_AT_byte_size,DW_FORM_udata,def.size
|
append_attribute(DW_AT_byte_size,DW_FORM_udata,[tobjectsymtable(def.symtable).datasize]);
|
||||||
]);
|
// The pointer to the class-structure is hidden. The debug-information
|
||||||
|
// does not contain an implicit pointer, but the data-adress is dereferenced here.
|
||||||
|
// In case of a nil-pointer, report the class as being unallocated.
|
||||||
|
append_block1(DW_AT_allocated,2);
|
||||||
|
current_asmdata.asmlists[al_dwarf_info].concat(tai_const.create_8bit(ord(DW_OP_push_object_address)));
|
||||||
|
current_asmdata.asmlists[al_dwarf_info].concat(tai_const.create_8bit(ord(DW_OP_deref)));
|
||||||
|
append_block1(DW_AT_data_location,2);
|
||||||
|
current_asmdata.asmlists[al_dwarf_info].concat(tai_const.create_8bit(ord(DW_OP_push_object_address)));
|
||||||
|
current_asmdata.asmlists[al_dwarf_info].concat(tai_const.create_8bit(ord(DW_OP_deref)));
|
||||||
finish_entry;
|
finish_entry;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -3869,10 +3876,6 @@ implementation
|
|||||||
end;
|
end;
|
||||||
odt_class:
|
odt_class:
|
||||||
begin
|
begin
|
||||||
{ not sure if the implicit pointer is needed for tag_class (MWE)}
|
|
||||||
{
|
|
||||||
doimplicitpointer;
|
|
||||||
}
|
|
||||||
dostruct(DW_TAG_class_type);
|
dostruct(DW_TAG_class_type);
|
||||||
doparent(false);
|
doparent(false);
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user