[fpc-pascal] DWARF line info cannot be used gdb

dmitry boyarintsev skalogryz.lists at gmail.com
Sun Dec 28 15:33:41 CET 2008


Hi, all

i'm trying to use gdb to debug FPC compiled file with DWARF debug information.
fpc -gw3 test.pas

here's test.pas listing
---codestart--
procedure TestUp;
begin
  writeln(5);
end;

begin
  Testup;
  writeln('hello world');
end.
---codeend--
the sample compiles, ok,
but then i'm trying to setup a breakpoint, the breakpoint is set at
the proper place, but gives two identical warnings :
warning: (Internal error: pc 0x40144e in read in psymtab, but not in symtab.)

If code is modified, just by adding a parameter to Testup function,
gdb can no longer set a breakpoint
---codestart--
procedure TestUp(i: integer);
begin
  writeln(i);
end;

begin
  Testup(5);
  writeln('hello world');
end.
---codeend--

(gdb) b test.pas:7
invalid dwarf2 offset 4247672

there's an issue at bug report about dwarf line information
http://bugs.freepascal.org/view.php?id=9671
i wonder if it's the same. or may be there're some switches that i'm missing?

Thanks
Dmitry



More information about the fpc-pascal mailing list