common_interface_defs.h revision 250f221ae0dee295098da8aa631977b6c2ebc99b
1//===-- sanitizer/common_interface_defs.h -----------------------*- C++ -*-===//
2//
3//                     The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9//
10// Common part of the public sanitizer interface.
11//===----------------------------------------------------------------------===//
12
13#ifndef SANITIZER_COMMON_INTERFACE_DEFS_H
14#define SANITIZER_COMMON_INTERFACE_DEFS_H
15
16#include <stddef.h>
17#include <stdint.h>
18
19#ifdef __cplusplus
20extern "C" {
21#endif
22  // Tell the tools to write their reports to "path.<pid>" instead of stderr.
23  void __sanitizer_set_report_path(const char *path);
24
25  // Tell the tools to write their reports to given file descriptor instead of
26  // stderr.
27  void __sanitizer_set_report_fd(int fd);
28
29  // Notify the tools that the sandbox is going to be turned on. The reserved
30  // parameter will be used in the future to hold a structure with functions
31  // that the tools may call to bypass the sandbox.
32  void __sanitizer_sandbox_on_notify(void *reserved);
33
34#ifdef __cplusplus
35}  // extern "C"
36#endif
37
38#endif  // SANITIZER_COMMON_INTERFACE_DEFS_H
39