1//===-- sanitizer_dbghelp.h ------------------------------*- 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// Wrappers for lazy loaded dbghelp.dll. Provides function pointers and a
10// callback to initialize them.
11//
12//===----------------------------------------------------------------------===//
13
14#ifndef SANITIZER_SYMBOLIZER_WIN_H
15#define SANITIZER_SYMBOLIZER_WIN_H
16
17#if !SANITIZER_WINDOWS
18#error "sanitizer_dbghelp.h is a Windows-only header"
19#endif
20
21#define WIN32_LEAN_AND_MEAN
22#include <windows.h>
23#include <dbghelp.h>
24
25namespace __sanitizer {
26
27extern decltype(::StackWalk64) *StackWalk64;
28extern decltype(::SymCleanup) *SymCleanup;
29extern decltype(::SymFromAddr) *SymFromAddr;
30extern decltype(::SymFunctionTableAccess64) *SymFunctionTableAccess64;
31extern decltype(::SymGetLineFromAddr64) *SymGetLineFromAddr64;
32extern decltype(::SymGetModuleBase64) *SymGetModuleBase64;
33extern decltype(::SymGetSearchPathW) *SymGetSearchPathW;
34extern decltype(::SymInitialize) *SymInitialize;
35extern decltype(::SymSetOptions) *SymSetOptions;
36extern decltype(::SymSetSearchPathW) *SymSetSearchPathW;
37extern decltype(::UnDecorateSymbolName) *UnDecorateSymbolName;
38
39}  // namespace __sanitizer
40
41#endif  // SANITIZER_SYMBOLIZER_WIN_H
42