Re: [Valgrind-users] C++ function wrapping: wrong mangled names

2010-07-20 Thread Bart Van Assche
On Tue, Jul 20, 2010 at 5:43 PM, Patrick Heckeler < hecke...@informatik.uni-tuebingen.de> wrote: > > On 20 July 2010 17:13, Dan Kegel wrote: > >> On Tue, Jul 20, 2010 at 7:33 AM, Patrick Heckeler >> wrote: >> > Is there any other possibility to wrap C++ functions? >> >> Well, you could use exter

Re: [Valgrind-users] C++ function wrapping: wrong mangled names

2010-07-20 Thread Patrick Heckeler
I have tested extern "C"and it works. But I want to use the wrapping later on for C++ methods. And extern "C" cannot handle class methods :-) On 20 July 2010 17:13, Dan Kegel wrote: > On Tue, Jul 20, 2010 at 7:33 AM, Patrick Heckeler > wrote: > > Is there any other possibility to wrap C++ fun

Re: [Valgrind-users] C++ function wrapping: wrong mangled names

2010-07-20 Thread Dan Kegel
On Tue, Jul 20, 2010 at 7:33 AM, Patrick Heckeler wrote: > Is there any other possibility to wrap C++ functions? Well, you could use extern "C" on that one function to disable the mangling, but you already knew that. (And it won't work if you have several functions with the same name but differen

[Valgrind-users] C++ function wrapping: wrong mangled names

2010-07-20 Thread Patrick Heckeler
Hi everybody, I have a question about function wrapping for C++ code: I want to wrap a function foo: int foo( int x, int y ) { return x + y; } with the following wrapper code: int I_WRAP_SONAME_FNNAME_ZU(NONE,foo)( int x, int y ) { intresult; OrigFn fn; VALGRIND_GET_ORIG_FN(fn); pr