|
From: Julian S. <js...@ac...> - 2008-05-05 00:13:27
|
On Monday 05 May 2008 02:08, TongKe Xue wrote:
> Hi!
>
> Is it possible,
>
> in my C/C++ code (which compies to a.out)
> to call some function foo()
>
> so that when I run: valgrind ./a.out,
> whenever execution hits foo()
>
> a backtrace / stack frames are printed out (like the print outs for
> invalid read/writes).
#include <valgrind/valgrind.h>
...
VALGRIND_PRINTF_BACKTRACE("The answer is %d\n", 42);
J
|