|
From: Nicholas N. <nj...@cs...> - 2005-08-28 15:43:52
|
On Sun, 28 Aug 2005, Tom Hughes wrote: > 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. You could do it more concisely with pre-processor hackery. See memcheck/tests/oset_test.c for an example. It's a bit nasty, though. For assert_fail, I'd do a simpler version. For example, you don't have to distinguish between core vs tool errors. Also, I wouldn't worry about the call to report_and_quit(), ie. all the stack tracing stuff. (More or less) duplicating strcmp_ws seems fine to me. Nick |