PStack  2.0
Stack trace printer for MSVC and GCC binaries
symbol.hpp
Go to the documentation of this file.
1 // ===-- include/psystem/symbol.hpp ----------------------- -*- C++ -*- --=== //
2 // Copyright (c) 2014 Matt Bisson. All rights reserved.
3 
18 #pragma once
19 #ifndef PSYSTEM_SYMBOL_HPP
20 #define PSYSTEM_SYMBOL_HPP
21 
22 #include "psystem_ns.hpp"
23 
24 namespace psystem {
25 
41 class symbol
42 {
46 public:
55  symbol(
56  address_t address,
57  address_t code_offset,
58  tstring const& name) noexcept;
59 
63 public:
69 
77 
84  tstring get_name() const noexcept;
85 
89 private:
92 
99 
102 };
103 
104 } // namespace psystem
105 
106 #endif // PSYSTEM_SYMBOL_HPP
address_t m_address
The memory location of the symbol.
Definition: symbol.hpp:91
tstring get_name() const noexcept
The symbol name.
Definition: symbol.cpp:54
#define noexcept
Replace keyword with something useful.
Definition: platform.hpp:71
std::string tstring
A std::string implementation based on the UNICODE macro.
Definition: platform.hpp:266
std::uintptr_t address_t
Container type for a memory address.
Definition: platform.hpp:221
The basic header file for the PSystem namespce.
address_t get_code_offset() const noexcept
Access the code offset from the PC to the symbol start.
Definition: symbol.cpp:48
Contains the process examination "system" and basic frameworks.
Definition: pstack_event_handler.hpp:28
tstring m_name
The symbol's (possibly mangled) name.
Definition: symbol.hpp:101
symbol(address_t address, address_t code_offset, tstring const &name) noexcept
Construct an instance of the psystem::symbol.
Definition: symbol.cpp:26
address_t get_address() const noexcept
Access the memory location of the symbol.
Definition: symbol.cpp:42
A container for data about a single debugger symbol.
Definition: symbol.hpp:41
address_t m_code_offset
The distance from the function entry point of the PC (in the current frame context).
Definition: symbol.hpp:98