]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Remove the hard-coding of "_vgi_" as the intercept prefix in
authorNicholas Nethercote <njn@valgrind.org>
Sat, 11 Jun 2005 03:28:48 +0000 (03:28 +0000)
committerNicholas Nethercote <njn@valgrind.org>
Sat, 11 Jun 2005 03:28:48 +0000 (03:28 +0000)
vg_replace_malloc.c.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3882

coregrind/core.h
coregrind/m_replacemalloc/vg_replace_malloc.c

index f064750800092452c8eda1e90e0f138239c5fff1..f715672de26420a0e54137c502aa137742d6774b 100644 (file)
 #define VG_USERREQ__LIBC_FREERES_DONE       0x3029
 
 /* Intercept prefix stuff.  See
-   coregrind/m_replace_malloc/vg_replace_malloc.c for details.
-   Unfortunately the "_vgi_" literal is also hardcoded in that file, so if
-   you change this one you must also change the other one. */
-#define VG_INTERCEPT_PREFIX "_vgi_"
-#define VG_INTERCEPT_PREFIX_LEN 5
+   coregrind/m_replace_malloc/vg_replace_malloc.c for details. */
+#define VG_INTERCEPT(name)       _vgi_##name
+#define VG_INTERCEPT_PREFIX      "_vgi_"
+#define VG_INTERCEPT_PREFIX_LEN  5
 
 /* Not sure what these are for.  Todo: clarify */
-#define VG_WRAPPER_PREFIX "_vgw_"
-#define VG_WRAPPER_PREFIX_LEN 5
-#define VG_WRAPPER(name) _vgw_##name
-#define VG_WRAPPER_ALIAS(name) "_vgw_" #name
+#define VG_WRAPPER_PREFIX        "_vgw_"
+#define VG_WRAPPER_PREFIX_LEN    5
+#define VG_WRAPPER(name)         _vgw_##name
+#define VG_WRAPPER_ALIAS(name)   "_vgw_" #name
 
 
 /* ---------------------------------------------------------------------
index 023d2103a5a7e7778a062d7055b69b65a12a16f7..cac07cc756736a6694bf620905dadf9b6e765450 100644 (file)
    Z         -->  ZZ
 */
 
-
-/* It would be nice to be able to write VG_INTERCEPT_PREFIX instead of
-   "_vgi_" here, but I can't figure out how to get cpp to cooperate.
-   If you change this "_vgi_" you should also change the definitiion
-   of VG_INTERCEPT_PREFIX in core.h accordingly.
-*/
-#define ENCODE(libname,fnname) _vgi_##libname##_##fnname
-
+#define ENCODE(libname,fnname) VG_INTERCEPT(libname##_##fnname)
 
 /* Some handy mangled names */
 #define  m_libstc_plus_plus_star  libstdcZpZpZa   // libstdc++*