PStack  2.0
Stack trace printer for MSVC and GCC binaries
dbghelp_symbol_engine.hpp
Go to the documentation of this file.
1 // ===-- include/psystem/dbghelp_symbol_engine.hpp -------- -*- C++ -*- --=== //
2 // Copyright (c) 2014 Matt Bisson. All rights reserved.
3 
18 #pragma once
19 #ifndef PSYSTEM_DBGHELP_SYMBOL_ENGINE_HPP
20 #define PSYSTEM_DBGHELP_SYMBOL_ENGINE_HPP
21 
22 #include "psystem_ns.hpp"
23 
24 #include <functional>
25 #include <memory>
27 
28 namespace psystem {
29 
30 class symbol;
31 
56  : public psystem::not_copyable
57 {
61 public:
78  explicit dbghelp_symbol_engine(HANDLE h_process);
79 
84 
88 public:
106  std::unique_ptr<symbol> find_symbol(address_t address);
107 
108 private:
112 
114  HANDLE const m_process_handle;
115 };
116 
117 } // namespace psystem
118 
119 #endif // PSYSTEM_DBGHELP_SYMBOL_ENGINE_HPP
HANDLE const m_process_handle
An open handle to the process used to gather symbol information.
Definition: dbghelp_symbol_engine.hpp:114
Provide an facility (using DbgHelp) for reading and mapping debugger symbols.
Definition: dbghelp_symbol_engine.hpp:55
Defines the psystem::not_assignable interface.
std::uintptr_t address_t
Container type for a memory address.
Definition: platform.hpp:221
Remove the ability to copy or reassign from derived classes.
Definition: not_copyable.hpp:43
The basic header file for the PSystem namespce.
Contains the process examination "system" and basic frameworks.
Definition: pstack_event_handler.hpp:28
~dbghelp_symbol_engine()
Free previously allocated resources for debug symbol usage.
Definition: dbghelp_symbol_engine.cpp:65
dbghelp_symbol_engine(HANDLE h_process)
Construct an instance of the symbol engine.
Definition: dbghelp_symbol_engine.cpp:34
std::unique_ptr< symbol > find_symbol(address_t address)
Create a psystem::symbol instance for a symbol at the provided memory address.
Definition: dbghelp_symbol_engine.cpp:88