[fpc-pascal] How to get to Range Check Error location
Jonas Maebe
jonas.maebe at elis.ugent.be
Sat Oct 2 16:51:08 CEST 2010
On 02 Oct 2010, at 16:43, Graeme Geldenhuys wrote:
> On 02/10/2010, Juha Manninen (gmail) <juha.manninen62 at gmail.com> wrote:
>> Anyway, I made a clean build wirh -gl and still had the problem. I will do
>> some more experiments...
>
> Debug and Line Info information is missing in FPC under 64-bit Linux,
> even with -gl parameter enabled.
That's incorrect.
$ cat tt3.pp
{$r+}
procedure test;
var
b: byte;
begin
b:=255;
b:=b+1;
end;
begin
test;
end.
$ ppcx28 -gl tt3
Target OS: Linux for x86-64
Compiling tt3.pp
Linking tt3
12 lines compiled, 2.9 sec
$ ./tt3
Runtime error 201 at $00000000004001C3
$00000000004001C3 line 7 of tt3.pp
$00000000004001D6 line 11 of tt3.pp
$0000000000400180
One thing to keep in mind: FPC's way of handling DWARF debug information (which is used by default on Linux/x86_64) is incompatible with smart linking. FPC 2.5.1 and 2.4.2 automatically disable smart linking when using DWARF debug info (and prints a warning about this), but FPC 2.4.0 may not yet do that.
Jonas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20101002/a04fdda4/attachment.html>
More information about the fpc-pascal
mailing list