[fpc-pascal] Find error?
dle3ab at angelbase.com
Tue Nov 9 18:57:24 CET 2004
When you compile with -gl you need to make sure that you recompile all the units, as well as the main program, with the -gl flag. Passing a -B flag will recompile all units (whose sources are found in the path), so:
fpc -gl -B myprogram
If, after doing so, you still lack line info, it's probably because it's hitting an error in the rtl or some other part of the fpc system, in which case you ought to be able to trace the erroneous call back to the last call made by your code.
If you'll be running in debug mode for any appreciable length of time, you might consider putting -gl in your fpc.cfg, so fpc will always compile all your programs with the line info. The drawback is that the executables are bigger; I don't know if there are any speed considerations.
Of course, as Peter suggested, you could also use the IDE or Lazarus or some other gdb-supporting editor, which can take you straight to the error from the address, rather than needing the line info in english.
-------- Original Message --------
> From: Alan Mead <cubrewer at yahoo.com>
> Sent: Tuesday, November 09, 2004 8:58 AM
> To: free pascal <fpc-pascal at lists.freepascal.org>
> Subject: [fpc-pascal] Find error?
> Turbo Pascal used to have a "find error" function... Is there a
> similar function in Free Pascal (I'm using 1.9.4)? I compiled the
> executable with -gl but I get the below:
> An unhandled exception occurred at 0x08071049 :
> EOutOfMemory : Out of memory
> $4D664F74 P$LSA2_finalize_implicit, line 683 of lsa2.pas
> fpc-pascal maillist - fpc-pascal at lists.freepascal.org
More information about the fpc-pascal