On Thu, May 19, 2011 at 8:11 PM,
<[email protected]> wrote:
> Message: 6
> Date: Wed, 18 May 2011 17:52:20 +0100
> From: Trevor Spiteri <[email protected]>
> Subject: [Valgrind-users] excluding parameters from demangled C++
>        function        names
> To: [email protected]
> Message-ID: <[email protected]>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> Is there a way to omit the parameters from the demangled C++ function
> names in valgrind? Templates cause long lines, which then become
> difficult to read, and using --demangle=no doesn't help much, mangled
> function names are still long and not much easier to read. For example,
> if function foo takes a reference to vector of int as an argument,
> valgrind shows something like:
>
>     foo(std::vector<int, std::allocator<int> > const&) (filename.cpp:100)
>
> This will become much worse for more complicated templates. So my
> question is, is there any way to reduce the output to something like this?
>
>     foo(...) (filename.cpp:100)
>
> Thanks.
>
> Trevor
Hi Trevor,
[sorry for a bad message format, I'm not sure how to answer to digest
emails correctly :( ]

I think there's no such functionality in Valgrind atm.
However, recently I wrote a function which goes almost exactly what
you want in ThreadSanitizer for both Valgrind and PIN
You can look at the source code here:
http://code.google.com/p/data-race-test/source/browse/trunk/tsan/ts_util.cc?spec=svn3464&r=3442#417
and the current set of tests here:
http://code.google.com/p/data-race-test/source/browse/trunk/tsan/thread_sanitizer_test.cc?spec=svn3464&r=3355#259

I'd be happy if someone cleans up the code and upstreams it.
FTR, I drop the "(...)" part as well because Intel PIN doesn't give us
the list of arguments on Windows and we wanted to have cross-platform
suppressions for Chromium. Hence, we've decided to drop it on
Linux/Mac too.

Hope that helps,
Timur Iskhodzhanov
Google Russia

------------------------------------------------------------------------------
What Every C/C++ and Fortran developer Should Know!
Read this article and learn how Intel has extended the reach of its 
next-generation tools to help Windows* and Linux* C/C++ and Fortran 
developers boost performance applications - including clusters. 
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
Valgrind-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to