diff options
Diffstat (limited to 'include/pdb')
-rw-r--r-- | include/pdb/symbol.hpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/include/pdb/symbol.hpp b/include/pdb/symbol.hpp index 9e11d04..8cb66d1 100644 --- a/include/pdb/symbol.hpp +++ b/include/pdb/symbol.hpp @@ -28,7 +28,7 @@ namespace pdb raw.MaxNameLen = MAX_SYM_NAME; } - SymbolInfo(const Raw& raw) + explicit SymbolInfo(const Raw& raw) : SymbolInfo{} { std::memcpy(buffer, &raw, raw.SizeOfStruct + raw.NameLen - 1); @@ -38,6 +38,13 @@ namespace pdb explicit operator const Raw&() const { return raw; } + Address get_displacement() const { return displacement; } + + void set_displacement(Address new_value) + { + displacement = new_value; + } + std::string get_name() const { return {raw.Name, raw.NameLen}; } Address get_offline_base() const { return raw.ModBase; } @@ -60,6 +67,7 @@ namespace pdb private: unsigned char buffer[sizeof(Raw) + MAX_SYM_NAME - 1]; + Address displacement = 0; protected: Raw& raw; |