|
From: <sv...@va...> - 2005-06-11 03:29:50
|
Author: njn
Date: 2005-06-11 04:28:48 +0100 (Sat, 11 Jun 2005)
New Revision: 3882
Log:
Remove the hard-coding of "_vgi_" as the intercept prefix in
vg_replace_malloc.c.
Modified:
trunk/coregrind/core.h
trunk/coregrind/m_replacemalloc/vg_replace_malloc.c
Modified: trunk/coregrind/core.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/core.h 2005-06-11 01:31:52 UTC (rev 3881)
+++ trunk/coregrind/core.h 2005-06-11 03:28:48 UTC (rev 3882)
@@ -113,17 +113,16 @@
#define VG_USERREQ__LIBC_FREERES_DONE 0x3029
=20
/* 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
=20
/* 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
=20
=20
/* ---------------------------------------------------------------------
Modified: trunk/coregrind/m_replacemalloc/vg_replace_malloc.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_replacemalloc/vg_replace_malloc.c 2005-06-11 01:31:=
52 UTC (rev 3881)
+++ trunk/coregrind/m_replacemalloc/vg_replace_malloc.c 2005-06-11 03:28:=
48 UTC (rev 3882)
@@ -96,15 +96,8 @@
Z --> ZZ
*/
=20
+#define ENCODE(libname,fnname) VG_INTERCEPT(libname##_##fnname)
=20
-/* 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
-
-
/* Some handy mangled names */
#define m_libstc_plus_plus_star libstdcZpZpZa // libstdc++*
#define m_libc_dot_so_dot_6 libcZdsoZd6 // libc.so.6
|