|
From: <sv...@va...> - 2012-06-05 07:12:31
|
sewardj 2012-06-05 08:12:15 +0100 (Tue, 05 Jun 2012)
New Revision: 12613
Log:
Add macros I_REPLACE_SONAME_FNNAME_Z{U,Z} for general end-user use.
The I_WRAP_SONAME_FNNAME_Z{U,Z} equivalents have been present for
years. Seems inconsistent for the REPLACE versions to be missing.
Modified files:
trunk/include/valgrind.h
Modified: trunk/include/valgrind.h (+12 -0)
===================================================================
--- trunk/include/valgrind.h 2012-06-05 01:32:51 +01:00 (rev 12612)
+++ trunk/include/valgrind.h 2012-06-05 08:12:15 +01:00 (rev 12613)
@@ -715,6 +715,18 @@
macros. The type of the argument _lval is OrigFn. */
#define VALGRIND_GET_ORIG_FN(_lval) VALGRIND_GET_NR_CONTEXT(_lval)
+/* Also provide end-user facilities for function replacement, rather
+ than wrapping. A replacement function differs from a wrapper in
+ that it has no way to get hold of the original function being
+ called, and hence no way to call onwards to it. In a replacement
+ function, VALGRIND_GET_ORIG_FN always returns zero. */
+
+#define I_REPLACE_SONAME_FNNAME_ZU(soname,fnname) \
+ VG_CONCAT4(_vgr00000ZU_,soname,_,fnname)
+
+#define I_REPLACE_SONAME_FNNAME_ZZ(soname,fnname) \
+ VG_CONCAT4(_vgr00000ZZ_,soname,_,fnname)
+
/* Derivatives of the main macros below, for calling functions
returning void. */
|