|
From: Robert W. <rj...@du...> - 2008-05-05 04:00:41
|
There's nothing there to do that right now but it would be fairly easy
to custom hack something to do it.
On May 4, 2008, at 7:23 PM, TongKe Xue wrote:
> Being greed here now ... how can I get this returned as a const
> char* or
> have it write it to a buffer I pass it?
>
> (Don't see any obvious way from the implement of
> VALGRIND_PRINTF_BACKTRACE).
>
> --TongKe
>
> On Mon, 5 May 2008, Julian Seward wrote:
>
>> 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
>>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
> Don't miss this year's exciting event. There's still time to save
> $100.
> Use priority code J8TL2D2.
> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
> _______________________________________________
> Valgrind-users mailing list
> Val...@li...
> https://lists.sourceforge.net/lists/listinfo/valgrind-users
|