mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-09 02:28:14 +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
|
||||
append_entry(DW_TAG_structure_type,true,[]);
|
||||
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)));
|
||||
{ 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,
|
||||
see issue #36017 }
|
||||
if not(is_object(def) or is_cppclass(def)) then
|
||||
begin
|
||||
{ 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)));
|
||||
end;
|
||||
finish_entry;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user