win32: line info using dwarf with trunk no longer regognized by gdb
Original Reporter info from Mantis: Martin @martin_frb
-
Reporter name: Martin Friebe
Original Reporter info from Mantis: Martin @martin_frb
- Reporter name: Martin Friebe
Description:
The debug info (line numbers) generated by fpc trunk (rev 22969) is no longer recognized by GDB (tested with various GDB between 6.3 and 7.5).
2.6.0 and 2.6.1 work fine.
See also http://forum.lazarus.freepascal.org/index.php/topic,18816.0.html
Unfortunately I am unable to find the exact revision in which this was introduced.
Steps to reproduce:
Compile the below program with either:
fpc.exe -gw -O-1 TestPrg.pas
fpc.exe -gw -O-1 -Xe TestPrg.pas
fpc.exe -gw -O-1 -al -Xe TestPrg.pas
Then run GDB and try (10 = "writeln(1)"
info line TestPrg.pas:10
-symbol-list-lines TestPrg.pas
It will say there are no lines. (Btw using an modified filename "info line TestPrgXX.pas:10" gives an error indicating, that there is no such file)
Additional information:
program EnvPrg;
uses sysutils;
var
s: String;
begin
s := GetEnvironmentVariable('ETEST1');
if s = 'ab123c' then
writeln(1)
else
writeln(2);
end.
Mantis conversion info:
- Mantis ID: 23330
- OS: win
- OS Build: vista
- Build: 22969
- Platform: w32
- Version: 2.7.1
- Fixed in version: 3.0.0
- Fixed in revision: commit 23046 (#d9568080)
- Target version: 2.7.1