mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-18 19:49:12 +02:00
* do not write DW_AT_allocated and DW_AT_data_location tags for old style objects and cppobjects, resolves #36017
git-svn-id: trunk@43183 -
This commit is contained in:
parent
3e11f1b2fe
commit
6e58178963
@ -4459,15 +4459,21 @@ implementation
|
|||||||
else
|
else
|
||||||
append_entry(DW_TAG_structure_type,true,[]);
|
append_entry(DW_TAG_structure_type,true,[]);
|
||||||
append_attribute(DW_AT_byte_size,DW_FORM_udata,[tobjectsymtable(def.symtable).datasize]);
|
append_attribute(DW_AT_byte_size,DW_FORM_udata,[tobjectsymtable(def.symtable).datasize]);
|
||||||
// The pointer to the class-structure is hidden. The debug-information
|
{ an old style object and a cpp class are accessed directly, so we do not need DW_AT_allocated and DW_AT_data_location tags,
|
||||||
// does not contain an implicit pointer, but the data-adress is dereferenced here.
|
see issue #36017 }
|
||||||
// In case of a nil-pointer, report the class as being unallocated.
|
if not(is_object(def) or is_cppclass(def)) then
|
||||||
append_block1(DW_AT_allocated,2);
|
begin
|
||||||
current_asmdata.asmlists[al_dwarf_info].concat(tai_const.create_8bit(ord(DW_OP_push_object_address)));
|
{ The pointer to the class-structure is hidden. The debug-information
|
||||||
current_asmdata.asmlists[al_dwarf_info].concat(tai_const.create_8bit(ord(DW_OP_deref)));
|
does not contain an implicit pointer, but the data-adress is dereferenced here.
|
||||||
append_block1(DW_AT_data_location,2);
|
In case of a nil-pointer, report the class as being unallocated.
|
||||||
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_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)));
|
||||||
|
end;
|
||||||
finish_entry;
|
finish_entry;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user