|
From: Tom H. <to...@co...> - 2005-08-28 11:59:12
|
In message <200...@ja...>
sv...@va... wrote:
> Author: tom
> Date: 2005-08-28 12:01:13 +0100 (Sun, 28 Aug 2005)
> New Revision: 4551
>
> Log:
> Move the tool specific executables to the valgrind library directory
> and implement a trivial launcher program that decides which tool to use
> and exec's the relevant executable.
One problem with this at the moment is that it only looks for --tool in
the arguments to valgrind and not in VALGRIND_OPTS or .valgrindrc.
I have abstracted out the command line processing from m_main.c into a
new file which can then be linked into the launcher program so that it
can easily process all the options, and it seems to work.
The problem is that the command line handling uses various functions
from valgrind's internal libc and in order to avoid linking that into
the launcher (which quickly got out of control, especially malloc) I had
to give the launcher versions of about a dozen VG_ libc routines which
are implemented using the real libc.
The real pains were assert_fail and strcmp_ws which don't exist as
such in the normal C library.
Does all this sound like a reasonable approach? or does anybody have
a better suggestion how to handle this?
Tom
--
Tom Hughes (to...@co...)
http://www.compton.nu/
|