[fpc-devel] dwarf 2 warning CIE

Dimitrios Chr. Ioannidis d.ioannidis at nephelae.eu
Tue Feb 2 11:24:28 CET 2021


Hi,

   while I investigate some problems I'm having regarding avr debugging, 
I noticed that the dwarf 2 / 3 generation gives a warning when I call a 
procedure from another unit. Is it a bug or because it's a warning I can 
safely ignore it ?


Reading dwarf information with avr-embedded-objdump.exe --dwarf returns 
: "avr-embedded-objdump.exe: Warning: Invalid CIE pointer 0x00c80000 in 
FDE at 0x000014"

This is the debug frame section ( avr-embedded-objdump.exe 
--dwarf=frames dwarf_CIE_FDE_Bug.elf )

"dwarf_CIE_FDE_Bug.elf:     file format elf32-avr

Contents of the .debug_frame section:


00000000 0010 ffffffff CIE
   Version:               1
   Augmentation:          ""
   Code alignment factor: 1
   Data alignment factor: -4
   Return address column: 24

   DW_CFA_def_cfa: r32 ofs 2
   DW_CFA_offset_extended: r36 at cfa+0
   DW_CFA_nop

00000014 0000 00c80000 FDE cie=fd39e538 pc=0002..0002"


The test program :

==========CODE=========

program dwarf_CIE_FDE_Bug;

uses
   dwarf_CIE_FDE_Bug_used_unit;

begin
   dummy;
end.

==========CODE=========

==========CODE=========

unit dwarf_CIE_FDE_Bug_used_unit;

interface

procedure dummy;

implementation

procedure dummy;
begin
end;

end.

==========CODE=========


Compiled with : "ppcrossavr.exe -MObjFPC -Tembedded -Pavr -CpAVR5 
-WpATMEGA328p -Xm -gw2 -O1 dwarf_CIE_FDE_Bug.pas"


I'm using fpc trunk on Windows 10 :

"Free Pascal Compiler version 3.3.1

Compiler date      : 2021/02/02
Compiler CPU target: avr"


regards,

-- 

Dimitrios Chr. Ioannidis



More information about the fpc-devel mailing list