diff options
| author | Robert Heinrich | 2012-04-15 12:32:25 +0200 |
|---|---|---|
| committer | Robert Heinrich | 2012-04-15 12:32:25 +0200 |
| commit | cf0d45be785fad65457ae2ebaa8d890afad79953 (patch) | |
| tree | aa9d3e1e229dbdb8d88c28af7dcefead1fb9e333 /library/VersionInfoFactory.cpp | |
| parent | 9f95e67c7575cca9495062eb275ee99a590e41cb (diff) | |
| download | dfhack-cf0d45be785fad65457ae2ebaa8d890afad79953.tar.gz dfhack-cf0d45be785fad65457ae2ebaa8d890afad79953.tar.bz2 dfhack-cf0d45be785fad65457ae2ebaa8d890afad79953.tar.xz | |
merged stuff from peterix
Diffstat (limited to 'library/VersionInfoFactory.cpp')
| -rw-r--r-- | library/VersionInfoFactory.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/library/VersionInfoFactory.cpp b/library/VersionInfoFactory.cpp index cf63e3b1..36dbd9aa 100644 --- a/library/VersionInfoFactory.cpp +++ b/library/VersionInfoFactory.cpp @@ -118,7 +118,8 @@ void VersionInfoFactory::ParseVersion (TiXmlElement* entry, VersionInfo* mem) string type, name, value; const char *cstr_type = pMemEntry->Value(); type = cstr_type; - if(type == "global-address") + bool is_vtable = (type == "vtable-address"); + if(is_vtable || type == "global-address") { const char *cstr_key = pMemEntry->Attribute("name"); if(!cstr_key) @@ -129,7 +130,11 @@ void VersionInfoFactory::ParseVersion (TiXmlElement* entry, VersionInfo* mem) cerr << "Dummy symbol table entry: " << cstr_key << endl; continue; } - mem->setAddress(cstr_key, strtol(cstr_value, 0, 0)); + uint32_t addr = strtol(cstr_value, 0, 0); + if (is_vtable) + mem->setVTable(cstr_key, addr); + else + mem->setAddress(cstr_key, addr); } else if (type == "md5-hash") { |
