Save dynamic attribute of functions
authorChristoph Egger <Christoph.Egger@fau.de>
Fri, 20 Mar 2015 15:25:08 +0000 (16:25 +0100)
committerChristoph Egger <Christoph.Egger@fau.de>
Fri, 20 Mar 2015 15:25:08 +0000 (16:25 +0100)
src/core/Function.cxx

index 1560e2af98ec9aa04860afbf4a7938763ca31e52..4f8efe1622ea35b2ab23a133791eb349b728b0aa 100644 (file)
@@ -20,6 +20,7 @@ void Function::serialize(QXmlStreamWriter& stream) {
        stream.writeStartElement("function");
        stream.writeAttribute("name", getName().c_str());
        stream.writeAttribute("entry", QString::number(getStartAddress(), 16));
+       stream.writeAttribute("dynamic", dynamic? "yes" : "no");
 
        for (auto& blockentry : blocks()) {
                blockentry.second->serialize(stream);
@@ -32,6 +33,7 @@ Function* Function::deserialize(QXmlStreamReader& stream, InformationManager* ma
        Q_ASSERT(stream.name() == "function");
 
        QString name = stream.attributes().value("name").toString();
+       bool dynamic = stream.attributes().value("dynamic").toString() == "yes";
        uint64_t entry = stream.attributes().value("entry").toULongLong(NULL, 16);
        Function* fun = manager->newFunction(entry);
 
@@ -51,6 +53,7 @@ Function* Function::deserialize(QXmlStreamReader& stream, InformationManager* ma
        }
 
        fun->name = name.toStdString();
+       fun->dynamic = dynamic;
        manager->finishFunction(fun);
 
        return fun;