Sign in Join

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

Mailing lists / fpc-devel / 2014-06

dwarf error when using const on mipsel arch

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

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

Michael Ring

Hi!

consts seem to sometimes mix up dwarf debuginfo.

the following simple program:

program hello;
const
   const1: longword = 1;
//  const2: longword = 1;
//  const3: longword = 1;
//  const4: longword = 1;
//var
//  i : integer;
begin
end.

causes the following dwarf error on load in gdb:

Reading symbols from /Users/ring/devel/pic32mx795f512h/hello.elf...Dwarf Error: wrong version in compilation unit header (is 273, should be 2, 3, or 4) [in module /Users/ring/dev
el/pic32mx795f512h/hello.elf]

when I comment in var i:integer then error changes to:

Reading symbols from /Users/ring/devel/pic32mx795f512h/hello.elf...done. invalid dwarf2 offset 9633792
Connected to the simulator.
invalid dwarf2 offset 9633792
invalid dwarf2 offset 9633792

when I comment out the const lines then all is fine.

I have this problem for the mipsel-embedded target, not sure if the same problem exists in mipsel-linux, I was unable to build a compiler to verify this.

Michael

Reply by email