1//===--- rtsan_diagnostics.h - Realtime Sanitizer ---------------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// Part of the RealtimeSanitizer runtime library
10//
11//===----------------------------------------------------------------------===//
12
13#pragma once
14
15#include "sanitizer_common/sanitizer_common.h"
16#include "sanitizer_common/sanitizer_internal_defs.h"
17
18namespace __rtsan {
19
20enum class DiagnosticsInfoType {
21 InterceptedCall,
22 BlockingCall,
23};
24
25struct DiagnosticsInfo {
26 DiagnosticsInfoType type;
27 const char *func_name;
28 __sanitizer::uptr pc;
29 __sanitizer::uptr bp;
30};
31
32void PrintDiagnostics(const DiagnosticsInfo &info);
33void PrintErrorSummary(const DiagnosticsInfo &info,
34 const __sanitizer::BufferedStackTrace &stack);
35} // namespace __rtsan
36