IDA Domain Python API
ida_domain.Comments Class Reference

Inherits object.

Public Member Functions

def __init__ (self, database)
 
def get (self, ea)
 
def set (self, ea, comment)
 
def get_all (self, include_repeatable)
 

Properties

 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
 

Detailed Description

Provides access to user-defined comments in the IDA database.

Constructor & Destructor Documentation

◆ __init__()

def ida_domain.Comments.__init__ (   self,
  database 
)
__init__(self, database) -> Comments
Constructs a comment manager for the given database.

:param database: Reference to the active IDA database.

Member Function Documentation

◆ get()

def ida_domain.Comments.get (   self,
  ea 
)
get(self, ea) -> BoolStringPair
Retrieves the comment at the specified address.

:param ea: The effective address.
:return: A pair (success, comment string). If no comment exists, success is false.

◆ get_all()

def ida_domain.Comments.get_all (   self,
  include_repeatable 
)
get_all(self, include_repeatable) -> CommentsIterator
Creates an iterator for all comments in the database.

:param include_repeatable: Whether to include repeatable comments during iteration.
:return: A CommentsIterator instance.

◆ set()

def ida_domain.Comments.set (   self,
  ea,
  comment 
)
set(self, ea, comment) -> bool
Sets a comment at the specified address.

:param ea: The effective address.
:param comment: The comment text to assign.
:return: True if the comment was successfully set, false otherwise.

Property Documentation

◆ thisown

ida_domain.Comments.thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
static