X-Git-Url: https://git.siccegge.de//index.cgi?p=frida%2Ffrida.git;a=blobdiff_plain;f=src%2Fcore%2FFunction.cxx;fp=src%2Fcore%2FFunction.cxx;h=1df4d1dba3b6a154c337c6d06f63bedcb3a2e6cd;hp=539192c5fd6f2fb2cb90e914c39acf17749d1042;hb=3493bceb6690f53900d2a4524401990c601b1464;hpb=db08681ab30cdc2a322663b836d215cacedea71a diff --git a/src/core/Function.cxx b/src/core/Function.cxx index 539192c..1df4d1d 100644 --- a/src/core/Function.cxx +++ b/src/core/Function.cxx @@ -1,8 +1,7 @@ #include "Function.hxx" #include "core/events/RenameFunctionEvent.hxx" #include "InformationManager.hxx" - -#include +#include "gui/qt.hxx" Function::Function(uint64_t start_address, InformationManager* manager) : start_address(start_address) @@ -15,3 +14,14 @@ void Function::setName(const std::string& new_name) { manager->dispatch(&event); } +void Function::serialize(QXmlStreamWriter& stream) { + stream.writeStartElement("function"); + stream.writeAttribute("name", getName().c_str()); + stream.writeAttribute("entry", QString::number(getStartAddress(), 16)); + + for (auto& blockentry : blocks()) { + blockentry.second->serialize(stream); + } + + stream.writeEndElement(); // "function" +}