aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2017-05-19 05:02:06 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2017-05-19 05:02:06 +0300
commit8e646ba31d9023db342ec0deae59abfc5683b4ef (patch)
tree560fd0c3ed88216134cbf5b1ec0b6c6ccbd8ce6a /include
parentinitial commit (diff)
downloadwinapi-debug-8e646ba31d9023db342ec0deae59abfc5683b4ef.tar.gz
winapi-debug-8e646ba31d9023db342ec0deae59abfc5683b4ef.zip
add displacement to symbols
Diffstat (limited to 'include')
-rw-r--r--include/pdb/symbol.hpp10
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;