From 8e646ba31d9023db342ec0deae59abfc5683b4ef Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Fri, 19 May 2017 05:02:06 +0300 Subject: add displacement to symbols --- include/pdb/symbol.hpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'include') 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; -- cgit v1.2.3