sanitizer_dbghelp.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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. #ifndef SANITIZER_SYMBOLIZER_WIN_H
  14. #define SANITIZER_SYMBOLIZER_WIN_H
  15. #if !SANITIZER_WINDOWS
  16. #error "sanitizer_dbghelp.h is a Windows-only header"
  17. #endif
  18. #define WIN32_LEAN_AND_MEAN
  19. #include <windows.h>
  20. #include <dbghelp.h>
  21. namespace __sanitizer {
  22. extern decltype(::StackWalk64) *StackWalk64;
  23. extern decltype(::SymCleanup) *SymCleanup;
  24. extern decltype(::SymFromAddr) *SymFromAddr;
  25. extern decltype(::SymFunctionTableAccess64) *SymFunctionTableAccess64;
  26. extern decltype(::SymGetLineFromAddr64) *SymGetLineFromAddr64;
  27. extern decltype(::SymGetModuleBase64) *SymGetModuleBase64;
  28. extern decltype(::SymGetSearchPathW) *SymGetSearchPathW;
  29. extern decltype(::SymInitialize) *SymInitialize;
  30. extern decltype(::SymSetOptions) *SymSetOptions;
  31. extern decltype(::SymSetSearchPathW) *SymSetSearchPathW;
  32. extern decltype(::UnDecorateSymbolName) *UnDecorateSymbolName;
  33. } // namespace __sanitizer
  34. #endif // SANITIZER_SYMBOLIZER_WIN_H