]> git.siccegge.de Git - frida/frida.git/blobdiff - src/core/Comment.cxx
Implement InformationManager / Comment and ChangeCommentEvent
[frida/frida.git] / src / core / Comment.cxx
index 0cb804c84ab35dc3397ddbc836014fe2a3f90574..d6fedfbf00331b7c026342e693d9219fe6e21b4f 100644 (file)
@@ -1,5 +1,7 @@
 #include "Comment.hxx"
 #include "Function.hxx"
+#include "InformationManager.hxx"
+#include "events/ChangeCommentEvent.hxx"
 
 Comment::Comment(uint64_t address, InformationManager* manager)
        : address(address)
@@ -12,9 +14,15 @@ Comment::Comment(uint64_t address, Function* location, InformationManager* manag
        , manager(manager) {}
 
 void Comment::setText(const std::string& text) {
+       ChangeCommentEvent event(address, location, this);
        this->text = text;
+       manager->dispatch(&event);
 }
 
 uint64_t Comment::getAddress() {
        return address;
 }
+
+Function* Comment::getLocation() {
+       return location;
+}