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.

lu

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to