[Libreoffice] Assertions and Logging

Michael Stahl mstahl at redhat.com
Mon Nov 28 03:51:38 PST 2011


[somehow this mail got eaten somewhere, so i'll send it again...]

On 22/11/11 13:15, Bjoern Michaelsen wrote:
> Hi Michael, Stephan, all,
> 
> On Tue, Nov 22, 2011 at 12:46:52PM +0100, Michael Stahl wrote:
>> one requirement i would have on conditional compilation is that, whether
>> --disable-dbgutil or --enable-dbgutil, objects built with debug=t
>> (resulting in OSL_DEBUG_LEVEL being set to non-zero) should always be
>> binary compatible with objects built without debug=t.
>>
>> this makes e.g. tracking down bugs introduced by mis-optimisation much
>> easier; i think we are in agreement on this point.
> 
> Full agreement here.
> 
>> i think i've seen members of SwDoc being added with:
>>  #if OSL_DEBUG_LEVEL > 1
>>  #if OSL_DEBUG_LEVEL > 0
>> this kind of thing always struck me as wrong: it should be DBG_UTIL,
>> will try to clean that up a bit...
> 
> A bit of digging in gits history shows that to be a blunt removal commit of
> DBG_UTIL in sw in 2010. I cant make any sense of it, as it completly broke non
> DBG_UTIL debug builds for no gain. Can anyone enlighten me on this?

have fixed this now with:

http://cgit.freedesktop.org/libreoffice/core/commit/?id=279a176397623ea83e98fac5a7f4132325b42594

so in sw at least we should have ABI compatible objects now.

also, noticed that in a lot of places debug checks and OSL_ENSUREs were
behind #if OSL_DEBUG_LEVEL > 1, which is not true for either
--enable-debug or --enable-dbgutil, so most developers would not get
these; have tried to fix that up as well by checking > 0 instead.

finally, i have deployed our new aborting assertions for some definitely
wrong cases in SwIndex:
http://cgit.freedesktop.org/libreoffice/core/commit/?id=0d2a6999fc320843e4db0c99d961414416a8451c

in summary, debug builds of "sw" should be a lot more useful now :)



More information about the LibreOffice mailing list