On 4 May 2012 23:03, Henry Vermaak <henry.verm...@gmail.com> wrote: > On 4 May 2012 22:14, Guillermo Martínez Jiménez <gmarti...@burdjia.com> wrote: >> Hello everybody, >> >> I'm working on a wrapper of a C library. I've found a bug, but I >> can't debug it with GDB because if I compile with "-g" and link with >> the debug version of the library it works correctly. >> >> But if I compile with "-g" and link with the release version of the >> library, I can't debug it because it fails inside the library. So I >> suspect there's a problem with a data conversion CPU exception >> activated by FPC. > > Can you give any more information about how it fails? You may have to > set the fpu exception mask if you're talking to c code, as a quick > guess (search the archives for how). Don't know why this works with > debugging enabled, though.
e.g. {$if defined(cpui386) or defined(cpux86_64)} SetExceptionMask(GetExceptionMask + [exZeroDivide, exInvalidOp]); {$ifend} _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal