Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2013-10

unused dwarf entries produced by FPC

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Martin

I ask here before reporting on mantis, maybe I overlooked something

program Test_Record_var_param;
type
   TFoo = record
     a,b: Integer;
   end;
   PFoo = ^TFoo;
var
   r1, r2: TFoo;
   p1, p2: PFoo;
begin
   P1 := @r1;
   P2 := @r1;
end.

objdump.exe -Wia Test_Record_var_param.exe

Shows an dwarf entry
<1><f1>: Abbrev Number: 7 (DW_TAG_reference_type)
<f2> DW_AT_type : <0xcb>

This entry is not referenced by any other entry. IT seems unused. Also (afaik) there should not be a DW_TAG_reference_type, as P1 and P2 are DW_TAG_pointer_type

Reply by email

Jonas Maebe
to Martin
Martin wrote 26 lines
I ask here before reporting on mantis, maybe I overlooked something program Test_Record_var_param; type TFoo = record a,b: Integer; end; PFoo = ^TFoo; var r1, r2: TFoo; p1, p2: PFoo; begin P1 := @r1; P2 := @r1; end. objdump.exe -Wia Test_Record_var_param.exe Shows an dwarf entry <1><f1>: Abbrev Number: 7 (DW_TAG_reference_type) <f2> DW_AT_type : <0xcb> This entry is not referenced by any other entry. IT seems unused. Also (afaik) there should not be a DW_TAG_reference_type, as P1 and P2 are DW_TAG_pointer_type

Reference types are generated for every type to use when a call-by- reference parameter with this type exists. This is by design.

Jonas

Reply by email