Home | History | Annotate | Download | only in interception

Lines Matching refs:func

124 # define DECLARE_WRAPPER(ret_type, func, ...)
130 # define DECLARE_WRAPPER(ret_type, func, ...) \
131 extern "C" ret_type func(__VA_ARGS__);
132 # define DECLARE_WRAPPER_WINAPI(ret_type, func, ...) \
133 extern "C" __declspec(dllimport) ret_type __stdcall func(__VA_ARGS__);
138 # define DECLARE_WRAPPER(ret_type, func, ...)
146 # define DECLARE_WRAPPER(ret_type, func, ...) \
147 extern "C" ret_type func(__VA_ARGS__) \
148 __attribute__((alias("__interceptor_" #func), visibility("default")));
153 # define DECLARE_WRAPPER(ret_type, func, ...) \
154 extern "C" ret_type func(__VA_ARGS__) \
155 __attribute__((weak, alias("__interceptor_" #func), visibility("default")));
165 # define DECLARE_REAL(ret_type, func, ...)
168 # define DECLARE_REAL(ret_type, func, ...) \
169 extern "C" ret_type REAL(func)(__VA_ARGS__);
175 # define DECLARE_REAL(ret_type, func, ...) \
176 typedef ret_type (*FUNC_TYPE(func))(__VA_ARGS__); \
178 extern FUNC_TYPE(func) PTR_TO_REAL(func); \
183 # define DECLARE_REAL(ret_type, func, ...) \
184 extern "C" ret_type func(__VA_ARGS__);
189 #define DECLARE_REAL_AND_INTERCEPTOR(ret_type, func, ...) \
190 DECLARE_REAL(ret_type, func, __VA_ARGS__) \
191 extern "C" ret_type WRAP(func)(__VA_ARGS__);
193 #define DECLARE_REAL_AND_INTERCEPTOR(ret_type, func, ...)
201 # define DEFINE_REAL(ret_type, func, ...) \
202 typedef ret_type (*FUNC_TYPE(func))(__VA_ARGS__); \
204 FUNC_TYPE(func) PTR_TO_REAL(func); \
207 # define DEFINE_REAL(ret_type, func, ...)
213 // sanitizer_common/scripts/gen_dynamic_list.py to export func.
215 #define INTERCEPTOR(ret_type, func, ...) \
216 extern "C"[[ gnu::alias(#func), gnu::visibility("hidden") ]] ret_type \
217 __interceptor_##func(__VA_ARGS__); \
218 extern "C" INTERCEPTOR_ATTRIBUTE ret_type func(__VA_ARGS__)
222 #define INTERCEPTOR(ret_type, func, ...) \
223 DEFINE_REAL(ret_type, func, __VA_ARGS__) \
224 DECLARE_WRAPPER(ret_type, func, __VA_ARGS__) \
227 ret_type WRAP(func)(__VA_ARGS__)
230 #define INTERCEPTOR_WITH_SUFFIX(ret_type, func, ...) \
231 INTERCEPTOR(ret_type, func, __VA_ARGS__)
235 #define INTERCEPTOR_ZZZ(suffix, ret_type, func, ...) \
236 extern "C" ret_type func(__VA_ARGS__) suffix; \
237 extern "C" ret_type WRAP(func)(__VA_ARGS__); \
238 INTERPOSER(func); \
239 extern "C" INTERCEPTOR_ATTRIBUTE ret_type WRAP(func)(__VA_ARGS__)
241 #define INTERCEPTOR(ret_type, func, ...) \
242 INTERCEPTOR_ZZZ(/*no symbol variants*/, ret_type, func, __VA_ARGS__)
244 #define INTERCEPTOR_WITH_SUFFIX(ret_type, func, ...) \
245 INTERCEPTOR_ZZZ(__DARWIN_ALIAS_C(func), ret_type, func, __VA_ARGS__)
253 # define INTERCEPTOR_WINAPI(ret_type, func, ...) \
254 typedef ret_type (__stdcall *FUNC_TYPE(func))(__VA_ARGS__); \
256 FUNC_TYPE(func) PTR_TO_REAL(func); \
260 ret_type __stdcall WRAP(func)(__VA_ARGS__)
282 # define INTERCEPT_FUNCTION(func) INTERCEPT_FUNCTION_LINUX_OR_FREEBSD(func)
283 # define INTERCEPT_FUNCTION_VER(func, symver) \
284 INTERCEPT_FUNCTION_VER_LINUX_OR_FREEBSD(func, symver)
287 # define INTERCEPT_FUNCTION(func) INTERCEPT_FUNCTION_MAC(func)
288 # define INTERCEPT_FUNCTION_VER(func, symver) \
289 INTERCEPT_FUNCTION_VER_MAC(func, symver)
292 # define INTERCEPT_FUNCTION(func) INTERCEPT_FUNCTION_WIN(func)
293 # define INTERCEPT_FUNCTION_VER(func, symver) \
294 INTERCEPT_FUNCTION_VER_WIN(func, symver)