View Issue Details

IDProjectCategoryView StatusLast Update
0036017FPCCompilerpublic2019-10-13 18:09
ReporterMartin FriebeAssigned ToFlorian 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Platform64bit IntelOSwin 10OS Version10
Product Version3.3.1Product Build 
Target VersionFixed in Version3.3.1 
Summary0036017: Wrong Dwarf-3 for "type foo = OBJECT ...."
DescriptionAn "object" (old style object), is NOT a referenced type. (like a record / allocated on the stack, or embedded)

However FPC (tested 64bit from 3.0.2 up to slightly order 3.1.1) write debug info with a DW_OP_deref.
This is only dwarf-3 (and presumingly dwarf 4)

type
  TObject3Int64 = object a,b,c: Int64; end;

Abr: 20 Tag: 22 DW_TAG_typedef // TObject3Int64
  -- Attr: DW_AT_name: DW_FORM_string >TObject3Int64
  -- Attr: DW_AT_type: DW_FORM_ref4 >[REF:1]

    * REF: 1
Abr: 31 Tag: 19 DW_TAG_structure_type // TObject3Int64
  -- Attr: DW_AT_name: DW_FORM_string >TObject3Int64
  -- Attr: DW_AT_byte_size: DW_FORM_udata >24
  -- Attr: DW_AT_allocated: DW_FORM_block1 >2: 0697 // DW_OP_push_object_address, DW_OP_deref
  -- Attr: DW_AT_data_location: DW_FORM_block1 >2: 0697 // DW_OP_push_object_address, DW_OP_deref
.... members


There should be no DW_AT_data_location.
The data is at the given address, and needs no deref.

Also there should be no DW_AT_allocated
TagsNo tags attached.
Fixed in Revision43183
FPCOldBugId
FPCTarget-
Attached Files

Activities

Florian

2019-10-13 12:07

administrator   ~0118555

Thanks for analyzing it.

Issue History

Date Modified Username Field Change
2019-08-27 01:24 Martin Friebe New Issue
2019-10-13 12:07 Florian Assigned To => Florian
2019-10-13 12:07 Florian Status new => resolved
2019-10-13 12:07 Florian Resolution open => fixed
2019-10-13 12:07 Florian Fixed in Version => 3.3.1
2019-10-13 12:07 Florian Fixed in Revision => 43183
2019-10-13 12:07 Florian FPCTarget => -
2019-10-13 12:07 Florian Note Added: 0118555
2019-10-13 18:09 Martin Friebe Status resolved => closed