Lazarus

Miscellaneous => Other => Topic started by: John_Nicol on March 09, 2019, 03:25:12 am

Title: interpreting error messages - runtime in machine code advice
Post by: John_Nicol on March 09, 2019, 03:25:12 am
I find myself very frustrated by the system of error messages which are outside the framework of an error number or clear description and which simply gives a line number in a compiler code   unit or whatever  Such notice as "SUVFPE error at 1030469999" followed by a coupe of brief code statements which appear to be in machine code.

How can I find the line number in my code which relates to this statement number and the code? 

John Nicol jonicol18@bigpond.com
Title: Re: interpreting error messages - runtime in machine code advice
Post by: Leledumbo on March 09, 2019, 09:31:54 pm
You have to recompile all units with -gl (and probably optimizations off, as it turns out the accuracy decreases as the optimization level increases). You can of course have both versions and use a conditional -Fu in fpc.cfg to build debug and release version of your app. Furthermore, you can also compile units that comes with fpc and lazarus to get line number in those units.
Title: Re: interpreting error messages - runtime in machine code advice
Post by: marcov on March 22, 2019, 02:08:49 pm
Do a "uses sysutils", which converts runtime errors to exceptions that have slightly more descriptive error messages.
TinyPortal © 2005-2018