예제 #1
0
def comment(enum, **repeatable):
    """Return the comment for the enumeration `enum`.

    If the bool `repeatable` is specified, then return the repeatable comment.
    """
    eid = by(enum)
    return idaapi.get_enum_cmt(eid, repeatable.get('repeatable', True))
예제 #2
0
def comment(enum, **repeatable):
    """Return the comment for the enumeration `enum`.

    If the bool `repeatable` is specified, then return the repeatable comment.
    """
    eid = by(enum)
    res = idaapi.get_enum_cmt(eid, repeatable.get('repeatable', True))
    return utils.string.of(res)
예제 #3
0
def handle_enums(delta, segs):
    for idx in range(idaapi.get_enum_qty()):
        e = idaapi.getn_enum(idx)
        for cmt_type in (True, False):
            cmt = idaapi.get_enum_cmt(e, cmt_type)
            if cmt:
                new_cmt = rebase_comment(segs, delta, cmt)
                if new_cmt:
                    idaapi.set_enum_cmt(e, new_cmt, cmt_type)
        idaapi.for_all_enum_members(e, enum_memb_visitor(segs, delta))
예제 #4
0
파일: enum.py 프로젝트: boogie1337/Sark
 def repeat(self):
     return idaapi.get_enum_cmt(self._eid, True)
예제 #5
0
파일: enum.py 프로젝트: boogie1337/Sark
 def regular(self):
     return idaapi.get_enum_cmt(self._eid, False)
예제 #6
0
def comment(identifier, comment=None):
    '''Given an enum id, get/set it's /comment/'''
    if commment is None:
        return idaapi.get_enum_cmt(identifier)
    return idaapi.set_enum_cmt(identifier, comment)
예제 #7
0
 def enum_cmt_changed(self, tid, repeatable_cmt):
     cmt = idaapi.get_enum_cmt(tid, repeatable_cmt)
     self._send_event(EnumCmtChangedEvent(tid, cmt, repeatable_cmt))
     return 0