[fpc-pascal] Find error?
cubrewer at yahoo.com
Tue Nov 9 20:13:30 CET 2004
Thanks David, Pete amd Florian,
When I try Peter's advice, I get
(gdb) info line 0x08071049^
Function "0x08071049" not defined.
I found the section of the FPC User's Manual that talks about gdb and
I assumed that I hadn't used the '-g' option ... but now I'm
wondering if '-gl' should allow gdb debugging? The docs on gdb seem
pretty volumnous but I didn't see 'info' as a command...
Regarding the EOutOfMemory exception, is that thrown only when all
(physical+virtual) memory is exhausted? Or is it also possible to
try to allocate too big a chunk (say, a chunk that exceeds physical
but not physical+virtual)? I'm running FC1 with the 2.4 kernel
(although I may upgrade to FC2 with the 2.6 kernel).
--- David Emerson <dle3ab at angelbase.com> wrote:
> 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
> > executable with -gl but I get the below:
> > An unhandled exception occurred at 0x08071049 :
> > EOutOfMemory : Out of memory
> > $08071049
> > $080705FD
> > $08068B2A
> > $08068E30
> > $4D664F74 P$LSA2_finalize_implicit, line 683 of lsa2.pas
> > -Alan
> > _______________________________________________
> > fpc-pascal maillist - fpc-pascal at lists.freepascal.org
> > http://lists.freepascal.org/mailman/listinfo/fpc-pascal
> fpc-pascal maillist - fpc-pascal at lists.freepascal.org
More information about the fpc-pascal