|
From: Nicholas N. <nj...@cs...> - 2005-08-23 15:16:31
|
On Thu, 18 Aug 2005, Rob Holland wrote: > On Thu, 2005-08-18 at 23:13 +0100, Tom Hughes wrote: >> I'd be surprised if that works - that dlopen would normally return a >> handle for the existing C library which would meand the symbols have >> the same address and would get redirected again. > > It does work :) Something to note: Julian's planning on removing Valgrind's (currently small) dependence on glibc entirely, in which case you won't be able to use dlopen(). So as Tom said, what you need here are function wrappers rather than function replacements; Jeremy started adding support for them (see the bottom section of coregrind/m_redir.c, under "General function wrapping") but it's currently all commented out and I'm not sure if it was working properly. It's interesting, your tool is a bit different to the existing ones and so is stressing the core/tool interface in new ways. I'm keen to help you with this; if it's helpful I can take a look at the wrapping code, although my hacking time is limited. N |