|
PStack
2.0
Stack trace printer for MSVC and GCC binaries
|
Encapsulates a module (file) for the purpose of gathering debugging symbols. More...
#include <symbol_file_module.hpp>


Construction / Destruction | |
| symbol_file_module (std::string const &file_name) | |
Construct an instance by loading file_name. More... | |
| symbol_file_module (symbol_file_module &&o) noexcept | |
| Move from an object of this type. More... | |
| ~symbol_file_module () noexcept | |
| Clean up resources used by the symbol_file_module instance. More... | |
Public Interface | |
| void | dump_module_info () const |
| Prints executable image headers to the console. More... | |
| uint8_t const * | get_base_address () const noexcept |
| Acquire the base memory address where this module has been loaded. More... | |
| dll_export_view const * | get_dll_export_view () |
| Obtain a "view" into the exported DLL symbols for this module. More... | |
| symbol_view const * | get_symbol_view () |
| Obtain a "view" into the debugging symbols for this module. More... | |
Member Data | |
| std::unique_ptr< uint8_t, std::function< void(uint8_t *)> > | m_view |
| Address of the bytes for the memory mapped file. | |
| psystem::unique_handle | m_mapping_handle |
| System handle to the memory mapping. | |
| psystem::unique_handle | m_file_handle |
| Open handle to the file-system file (to be mapped). | |
| std::unique_ptr< symbol_view > | m_symbol_view |
Loaded view of debugging symbols (may be NULL). | |
| std::unique_ptr< dll_export_view > | m_dll_export_view |
Loaded view of DLL exports (may be NULL). | |
Additional Inherited Members | |
Private Member Functions inherited from psystem::not_copyable | |
| not_copyable (not_copyable const &)=delete | |
| Delete the copy constructor. | |
| not_copyable & | operator= (not_copyable const &)=delete |
| Delete the assignment operator. | |
| constexpr | not_copyable () noexcept |
| A simple CTOR suitable for noexcept and constexpr uses. | |
| ~not_copyable () noexcept | |
| A simple CTOR suitable for noexcept uses. | |
Encapsulates a module (file) for the purpose of gathering debugging symbols.
This class maps a physical file containing executable code or debugging symbols into memory, and provides views into both debugging symbols and exported (DLL) symbols. Currently, this only supports executable and DLL images.
|
explicit |
Construct an instance by loading file_name.
This method maps an executable module into memory for later examination. It makes no validation of the contents of the file during construction, so later invocations may decide that file_name is not applicable for their purposes.
| [in] | file_name | The path of a file that will be checked for symbols. This may be a full path or simply a file; normal Win32 name resolution applies. |
| psystem::exception::system_exception | If the file specified by file_name did not exist, or could not be mapped into memory. |
|
noexcept |
Move from an object of this type.
| [in,out] | o | The instance from which data will be moved. |
o, transfer to this instance.
|
noexcept |
Clean up resources used by the symbol_file_module instance.
| void psystem::symbol_file_module::dump_module_info | ( | ) | const |
Prints executable image headers to the console.
| psystem::exception::system_exception | If the file backing this instance is not a Windows Portable Executable (PE), or the "optional" header is not present. |
|
noexcept |
Acquire the base memory address where this module has been loaded.
Acquiring this "base" address gives a readable view of the raw bits the exist in the module that this instance represents.
NULL. | dll_export_view const * psystem::symbol_file_module::get_dll_export_view | ( | ) |
Obtain a "view" into the exported DLL symbols for this module.
NULL if no export table exists.| psystem::exception::system_exception | If the file backing this instance is not a Windows Portable Executable (PE). |
| symbol_view const * psystem::symbol_file_module::get_symbol_view | ( | ) |
Obtain a "view" into the debugging symbols for this module.
NULL if there is no debugging information.| psystem::exception::system_exception | If the file backing this instance is not a Windows Portable Executable (PE), or the "optional" header is not present. |