diff options
| author | Peter LaFosse <peter@vector35.com> | 2017-08-26 22:23:12 -0400 |
|---|---|---|
| committer | Peter LaFosse <peter@vector35.com> | 2017-08-26 22:23:12 -0400 |
| commit | da388dd42cdee70facb084b3012214ca33014fa7 (patch) | |
| tree | cad30eea655e91c03fc6f3ad94103707fd91c430 /function.cpp | |
| parent | 71a1a997e9be461a841a0f801bd19a23ad62f106 (diff) | |
Adding Function level comment APIs
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()); |
