Recent

Author Topic: interpreting error messages - runtime in machine code advice  (Read 787 times)

John_Nicol

  • New member
  • *
  • Posts: 8
interpreting error messages - runtime in machine code advice
« 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

Leledumbo

  • Hero Member
  • *****
  • Posts: 8063
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: interpreting error messages - runtime in machine code advice
« Reply #1 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.

marcov

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 6993
Re: interpreting error messages - runtime in machine code advice
« Reply #2 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.