Can Valgrind show the value of the leaked memory?

Viewed 580

I am wondering if there is a possibility in valgrind to show the value of the leaked memory, such as (NOT a real valgrind output!):

==15060== 12 bytes (***HERE***) in 1 blocks are definitely lost in loss record 1 of 1
==15060==    at 0x4C2AAA4: operator new[](unsigned long) (in vgpreload_memcheck-amd64-linux.so)
==15060==    by 0x5DC8236: char* allocate(unsigned long, char const*, long) (mem.h:149)
==15060==    by 0x5EAC286: trim(char const*, nap_compiler const*) (file.cpp:107)

Where the ***HERE*** shows the exact value of the string that is being leaked. I've been looking all over the documentation, but found nothing. Maybe someone more familiar with the tool can point out what to do to achieve this! (I'm not afraid of compiling it myself :) )

1 Answers
Related