diff options
Diffstat (limited to 'function.cpp')
| -rw-r--r-- | function.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/function.cpp b/function.cpp index 550691d0..2d8db04c 100644 --- a/function.cpp +++ b/function.cpp @@ -197,6 +197,15 @@ void Function::MarkRecentUse() } +string Function::GetComment() const +{ + char* comment = BNGetFunctionComment(m_object); + string result = comment; + BNFreeString(comment); + return result; +} + + string Function::GetCommentForAddress(uint64_t addr) const { char* comment = BNGetCommentForAddress(m_object, addr); @@ -217,6 +226,12 @@ vector<uint64_t> Function::GetCommentedAddresses() const } +void Function::SetComment(const string& comment) +{ + BNSetFunctionComment(m_object, comment.c_str()); +} + + void Function::SetCommentForAddress(uint64_t addr, const string& comment) { BNSetCommentForAddress(m_object, addr, comment.c_str()); |
