On Tue, Mar 20, 2012 at 9:34 AM, Martin <laza...@mfriebe.de> wrote: > > On 20/03/2012 12:08, Marcos Douglas wrote: >> >> Hi, >> >> I was testing the new connector to MSSQL when I found a problem. >> If I compile and run in console, I have no memleak. Good. But if I put >> a breakpoint in AConnection.Free; and press F8, I got this: >> >> ERROR >> ,msg="Warning:\nCannot insert breakpoint -237.\nError accessing memory >> address 0x7816cd30: Input/output error.\n" >> >> > > A negative breakpoint means internal to gdb (like a breakpoint gdb sets > for stepping). So when you press F8 gdb apparently can't get the correct > location where the step should end. > > Are you sure your app (and package that has debug info) are compiled: > - with either -O0 or -O1 (no other optimization enabled) > - your app is NOT smartlinked > > wiki.lazarus.freepascal.org/GDB_Debugger_Tips
I compile FPC using these options: UPXPROG=echo COPYTREE=echo OPT="-gl" My applications, in debbuger mode, always use -O1 option. I use smartlinked option just for release. Marcos Douglas _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal