On Tue, Feb 24, 2015 at 7:01 PM, Luca Barbato <[email protected]> wrote: > On 24/02/15 19:10, Vittorio Giovara wrote: >> On Tue, Feb 24, 2015 at 4:18 PM, Luca Barbato <[email protected]> wrote: >>> On 24/02/15 16:33, Vittorio Giovara wrote: >>>> >>>> Enabled only in debug mode and only when run under Valgrind. >>>> >>>> Signed-off-by: Vittorio Giovara <[email protected]> >>>> --- >>>> This is a neat trick I found reading >>>> https://blog.mozilla.org/nnethercote/2011/01/11/using-valgrind-to-get-stack-traces/ >>>> >>>> It should help in identifying where an error occurred if it is logged. >>>> >>>> I was looking for such a thing for some time, and other solutions like >>>> debugbreak https://github.com/scottt/debugbreak are simply too fragile. >>>> >>>> The function is a static import so there are no additional libraries or >>>> dependencies. Additionally it only appears on valgrind runs so it doesn't >>>> pollute normal log and it is possible to turn it off if desired. >>>> >>>> I am not sure if I should keep everything under a single CONFIG_ or if >>>> it's >>>> better to have the header check serpatedly (like in the proposed patch). >>>> >>> >>> --enable-valgrind might be a better option, I think there are another couple >>> of tricks we could leverage from it. >> >> Such as? I'd rather not use the name of the tool since users might >> infer that they need to set that to be able use valgrind. >> Also imho the option should be an opt-opt not an opt-in. > > Why? it is yet another automagic option that annoys the hell of packagers.
It is not? There is no dependency added as the code is enabled only in debug mode and will work just fine when the packager does not have valgrind installed. Besides, its output is visible only when run under valgrind, so it would made a valuable asset for debug builds when users report bugs. -- Vittorio _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
