diff --git a/Memory.xml b/Memory.xml
index 114ee081a..ca70e10bf 100644
--- a/Memory.xml
+++ b/Memory.xml
@@ -75,8 +75,11 @@
+
+
+
@@ -94,6 +97,7 @@
+
diff --git a/library/CMakeLists.txt b/library/CMakeLists.txt
index c8fe57a92..4e1c8fcaf 100644
--- a/library/CMakeLists.txt
+++ b/library/CMakeLists.txt
@@ -72,7 +72,6 @@ DataStaticsCtor.cpp
MiscUtils.cpp
PluginManager.cpp
TileTypes.cpp
-VersionInfo.cpp
VersionInfoFactory.cpp
Virtual.cpp
diff --git a/library/Core.cpp b/library/Core.cpp
index e06dd3f3c..96c60ab84 100644
--- a/library/Core.cpp
+++ b/library/Core.cpp
@@ -640,15 +640,15 @@ bool Core::Init()
cerr << "Console is running.\n";
else
fatal ("Console has failed to initialize!\n", false);
-
+/*
// dump offsets to a file
std::ofstream dump("offsets.log");
if(!dump.fail())
{
- dump << vinfo->PrintOffsets();
+ //dump << vinfo->PrintOffsets();
dump.close();
}
-
+ */
// initialize data defs
virtual_identity::Init(this);
InitDataDefGlobals(this);
diff --git a/library/DataDefs.cpp b/library/DataDefs.cpp
index cd8a8ed7c..86c3ea024 100644
--- a/library/DataDefs.cpp
+++ b/library/DataDefs.cpp
@@ -152,7 +152,8 @@ void virtual_identity::Init(Core *core)
p->parent->has_children = true;
}
}
-
+ //FIXME: ... nuked. the group was empty...
+/*
// Read pre-filled vtable ptrs
OffsetGroup *ptr_table = core->vinfo->getGroup("vtable");
for (virtual_identity *p = list; p; p = p->next) {
@@ -160,6 +161,7 @@ void virtual_identity::Init(Core *core)
if (ptr_table->getSafeAddress(p->getName(),tmp))
p->vtable_ptr = tmp;
}
+ */
}
std::string DFHack::bitfieldToString(const void *p, int size, const bitfield_item_info *items)
@@ -215,11 +217,11 @@ DF_KNOWN_GLOBALS
#undef SIMPLE_GLOBAL
void DFHack::InitDataDefGlobals(Core *core) {
- OffsetGroup *global_table = core->vinfo->getGroup("global");
+ VersionInfo *vinfo = core->vinfo;
void * tmp;
#define SIMPLE_GLOBAL(name,tname) \
- if (global_table->getSafeAddress(#name,tmp)) df::global::name = (tname*)tmp;
+ if (vinfo->getAddress(#name,tmp)) df::global::name = (tname*)tmp;
#define GLOBAL(name,tname) SIMPLE_GLOBAL(name,df::tname)
DF_KNOWN_GLOBALS
#undef GLOBAL
diff --git a/library/Process-linux.cpp b/library/Process-linux.cpp
index 1a2669286..f5503fb4f 100644
--- a/library/Process-linux.cpp
+++ b/library/Process-linux.cpp
@@ -65,7 +65,6 @@ Process::Process(VersionInfoFactory * known_versions)
if(vinfo)
{
my_descriptor = new VersionInfo(*vinfo);
- my_descriptor->setParentProcess(this);
identified = true;
}
else
diff --git a/library/VersionInfoFactory.cpp b/library/VersionInfoFactory.cpp
index c5ed7f14f..c6914583b 100644
--- a/library/VersionInfoFactory.cpp
+++ b/library/VersionInfoFactory.cpp
@@ -120,7 +120,7 @@ void VersionInfoFactory::ParseVersion (TiXmlElement* entry, VersionInfo* mem)
type = cstr_type;
if(type == "Address")
{
- const char *cstr_key = currentElem->Attribute("name");
+ const char *cstr_key = pMemEntry->Attribute("key");
if(!cstr_key)
throw Error::MemoryXmlUnderspecifiedEntry(cstr_key);
const char *cstr_value = pMemEntry->Attribute("value");
@@ -188,7 +188,7 @@ bool VersionInfoFactory::loadFile(string path_to_xml)
{
clear();
// For each version
- pMemInfo=hRoot.FirstChild( "Version" ).Element();
+ TiXmlElement * pMemInfo=hRoot.FirstChild( "Version" ).Element();
for( ; pMemInfo; pMemInfo=pMemInfo->NextSiblingElement("Version"))
{
const char *name = pMemInfo->Attribute("name");
diff --git a/library/include/VersionInfo.h b/library/include/VersionInfo.h
index 3bbcd9c06..d996722c0 100644
--- a/library/include/VersionInfo.h
+++ b/library/include/VersionInfo.h
@@ -31,6 +31,7 @@ distribution.
#include