def implement(self): if self._comment_type == "regular": idaapi.set_cmt(self._linear_address, self._value, 0) elif self._comment_type == "repetable": idaapi.set_cmt(self._linear_address, self._value, 1) elif self._comment_type == "function": idc.set_func_cmt(self._linear_address, self._value, 0) elif self._comment_type == "anterior": ida_lines.add_extra_cmt(self._linear_address, 1, self._value) elif self._comment_type == "posterior": ida_lines.add_extra_cmt(self._linear_address, 0, self._value)
def implement(self): if self._comment_type == "regular": idaapi.set_cmt(self._linear_address, self._value, 0) elif self._comment_type == "repetable": idaapi.set_cmt(self._linear_address, self._value, 1) elif self._comment_type == "function": idc.set_func_cmt(self._linear_address, self._value, 0) elif self._comment_type == "anterior" or self._comment_type == "posterior": ida_lines.del_extra_cmt(self._linear_address, self._idx) is_anterior = 1 if self._idx - 1000 < 1000 else 0 if not self._value: return 0 ida_lines.add_extra_cmt(self._linear_address, is_anterior, self._value)
def __call__(self): ida_lines.del_extra_cmt(self.ea, self.line_idx) isprev = 1 if self.line_idx - 1000 < 1000 else 0 if not self.cmt: return 0 ida_lines.add_extra_cmt(self.ea, isprev, Event.encode(self.cmt))
def _on_extracommentchanged(self, ea, line_idx, comment): ida_lines.del_extra_cmt(ea, line_idx) is_previous = 1 if line_idx - 1000 < 1000 else 0 if not comment: return 0 ida_lines.add_extra_cmt(ea, is_previous, Unicoder.encode(comment))