|
Ghidra Decompiler Analysis Engine
|
A comment attached to a specific function and code address. More...
#include <comment.hh>
Public Types | |
| enum | comment_type { user1 = 1, user2 = 2, user3 = 4, header = 8, warning = 16, warningheader = 32 } |
| Possible properties associated with a comment. More... | |
Public Member Functions | |
| Comment (uint4 tp, const Address &fad, const Address &ad, int4 uq, const string &txt) | |
| Constructor. More... | |
| void | saveXml (ostream &s) const |
| Save the comment to an XML stream. More... | |
| void | restoreXml (const Element *el, const AddrSpaceManager *manage) |
| Restore the comment from XML. More... | |
Static Public Member Functions | |
| static uint4 | encodeCommentType (const string &name) |
| Convert name string to comment property. More... | |
| static string | decodeCommentType (uint4 val) |
| Convert comment property to string. More... | |
Friends | |
| class | CommentDatabaseInternal |
A comment attached to a specific function and code address.
Things contains the actual character data of the comment. It is fundamentally attached to a specific function and to the address of an instruction (within the function's body). Comments can be categorized as a header (or not) depending on whether it should be displayed as part of the general description of the function or not. Other properties can be assigned to a comment, to allow the user to specify the subset of all comments they want to display.
Possible properties associated with a comment.
| tp | is the set of properties to associate with the comment (or 0 for no properties) |
| fad | is the Address of the function containing the comment |
| ad | is the Address of the instruction associated with the comment |
| uq | is used internally to sub-sort comments at the same address |
| txt | is the body of the comment |
|
static |
Convert comment property to string.
| val | is a single comment property |
|
static |
Convert name string to comment property.
| name | is a string representation of a single comment property |
| void Comment::restoreXml | ( | const Element * | el, |
| const AddrSpaceManager * | manage | ||
| ) |
Restore the comment from XML.
The comment is parsed from a <comment> tag.
| el | is the <comment> element |
| manage | is a manager for resolving address space references |
| void Comment::saveXml | ( | ostream & | s | ) | const |
Save the comment to an XML stream.
The single comment is saved as a <comment> tag.
| s | is the output stream |
1.8.17