Open
Description
Read this first: #6742
We currently have is the ability to add comments at places in a view through these functions:
BinaryView::SetCommentForAddress
Function::SetComment
Function::SetCommentForAddress
These three functions not only set the comment at a location, they also add an undo action, which basically means that these apis were never designed to be called by analysis (by which i mean, a workflow activity or binary view init). We have two problems:
- We cannot set comments when we are initializing the view, as doing so is prohibited by the undo buffer.
- Function comments are not ephemeral, meaning if you have a activity add a comment they will be persisted across analysis updates, this is an issue for WARP as we set the comments within an activity, meaning they never go away if you disable the application of a WARP signature.
The resolution to this should not include consolidating view and function comments, as 2
requires that they be tied to the function object to be properly cleared.