def execute_comment(comment):
"""
Thread safe comment wrapper
"""
def make_rpt():
idc.MakeRptCmt(
comment["address"],
comment["data"].encode(
'ascii',
'replace'))
cmt = idc.Comment(comment["address"])
if cmt != comment["data"] and idc.RptCmt(
comment["address"]) != comment["data"]:
g_logger.debug(
"[x] Adding comment %s @ 0x%x ",
comment["data"],
comment["address"])
return idaapi.execute_sync(make_rpt, idaapi.MFF_WRITE)
else:
pass
评论列表
文章目录