[Lazarus] [fpc-pascal] SQLdb: problem using GDB, but do not have memleak

Martin lazarus at mfriebe.de
Wed Mar 21 16:33:45 CET 2012


On 21/03/2012 15:11, Marcos Douglas wrote:
> On Wed, Mar 21, 2012 at 12:01 PM, Martin<lazarus at mfriebe.de>  wrote:
>> So far I have no plans to update to 7.4 until either:
>> - I find some existing problem solved in it
>> - I start supporting new features
>>
>> However, my tests so far, have not shown any problems when using 7.4.
> So, when you move to 7.4 the only thing I need to do is update from SVN, right?
yes.
>
> To everything work together between FPC 2.6.1 and Lazarus trunk, what
> are the best OPT options to compile both?
> I always used "-gl" and never had problems. Jonas said OPT="-O- -gl"
> that is one more option.
> Well, I need to use this option(s) in Lazarus Build too. I use the IDE
> to do this. So, the right way is click in "Configure Build" and put
> the same OPT in Options box, is that right?
>

Well do you want/need fpc with debug info?

If yes, then the fpc makefiles include -O2 and you need to cancel that. 
Because "-O2 -O1" is still -O2, but "-O2 -O-1" (or the long version "-O2 
-O- -O1") is -O1

In any case, that affects if you can inspect variables in the RTL.
It does not seem to be related to the original issue

Mind: rtl with debug info, will step into every ansistring_dec/inc_ref 
and similar. That can be highly annoying
But: rtl with debug info also allows to access some global vars (like 
the local time-date-format setting var)


Whatever you do:
-g defaults to stabs

I recommend to not mix stabs and dwarf (it may work, but I do not know).
So use the same for LCL, packages and app

Maybe best to be explicit

-gs
-gw -godwarfsets

-dwarf allows some properties (those directly mapped to a field)
-stabs (and modern gdb) can do -gp (preserve the case of symbols, 
instead of getting the all caps stuff.

I have NOT got a full list of diffs...





More information about the Lazarus mailing list