Am Tuesday 11 September 2012 18:14:57 schrieb Mark Morgan Lloyd: > Martin wrote: > > On 11/09/2012 10:28, Rainer Stratmann wrote: > >> I found out that there is no line information shown (-gl) if an error > >> occurs > >> (more or less shortly) after the program loads a dynamic library. > >> > >> This same behaviour happens with fpc version 2.4.2-0 and 2.6.0. > >> > >> If no library is loaded line information is shown. > >> The error adresses are the same in both cases. > > How is the library being loaded: using FPC's dynlibs unit? Yes. > If using dynlibs, is the problem immediately after loading the library > (.so) or is it on a call of an entry point in the library? Immediately after loading the library. > > This is about debug info written by "DumpStack" or similar (written by > > the exe itself, to the console)? > > > > Or debug info shown by gdb using "bt"? > > If the first, does the latter work? > > > > As from your other replies, the exception occurs in your pascal code. > > But is this code in a callback from the DLL? (This would mean that > > stackframes of the DLL exist, and they have no line info) > > Or could for any other reason (including compiled with optimization) > > there be a stackframe (just one) that has no line info? > > Is the DLL successfully called, does it exit predictably, and does the > stack recover to the state it was on entry (i.e. without an extra or > missing word)?
The program restarts some times and there is no error. Stack recovery I don't know. I think it will be ok. How can I see that? I use loadlibrary and freelibrary. There are only 3 functions/procedures calling from the program. (init_proc, loop_proc, exit_proc). The library calls back a procedure (add a key to a keybuffer) but in this procedure there is no error. I tried safeloadlibrary but the same thing. _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal