[fpc-pascal] Stack trace different for Windows and Linux
tlm at weighbatch.com
Mon Jan 23 10:17:10 CET 2017
I'm a new poster to the mail list. I have a problem logging call stack
trace info following an exception.
The following simple program generates a divide by zero error.
VAR i, j, k : Integer;
i := i - 1;
k := j DIV i;
i := 1; j := 1;
When compiled and run under Windows it generates the stack trace:
Runtime error 200 at $00401404
$00401404 TEST1, line 6 of test.pas
$00401428 TEST2, line 11 of test.pas
$00401451 main, line 16 of test.pas
Which is what you would expect. When compiled and run on an ARM
processor under Linux (Debian Jessie) it generates the stack trace:
Runtime error 200 at $000101AC
$000101AC TEST2, line 11 of test.pas
$000101E0 main, line 16 of test.pas
Ie. it does not contain the reference to the actual line which caused
the problem. The first entry is to the return address of the faulting
The same compile options are used for both and include the -gl option.
FPC version is 2.6.4.
Anyone have any idea why this happens or more usefully how the Linux
result can be fixed ?
This email has been checked for viruses by Avast antivirus software.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the fpc-pascal