コード例 #1
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))
コード例 #2
0
def comment(enum, comment, **repeatable):
    """Set the comment for the enumeration `enum` to `comment`.

    If the bool `repeatable` is specified, then modify the repeatable comment.
    """
    eid, res = by(enum), utils.string.to(comment)
    return idaapi.set_enum_cmt(eid, res, repeatable.get('repeatable', True))
コード例 #3
0
ファイル: enumeration.py プロジェクト: arizvisa/idascripts
def comment(enum, comment, **repeatable):
    """Set the comment for the enumeration `enum` to `comment`.

    If the bool `repeatable` is specified, then modify the repeatable comment.
    """
    eid, res = by(enum), utils.string.to(comment)
    return idaapi.set_enum_cmt(eid, res, repeatable.get('repeatable', True))
コード例 #4
0
ファイル: enum.py プロジェクト: k273811702/idascripts
def comment(enum, comment, **repeatable):
    """Set the comment for the enumeration identified by ``enum`` to ``comment``.
    If the bool ``repeatable`` is specified, then modify the repeatable comment.
    """
    eid = by(enum)
    return idaapi.set_enum_cmt(eid, comment,
                               repeatable.get('repeatable', True))
コード例 #5
0
ファイル: enum.py プロジェクト: boogie1337/Sark
 def repeat(self, comment):
     success = idaapi.set_enum_cmt(self._eid, comment, True)
     if not success:
         raise exceptions.CantSetEnumComment("Cant set enum comment.")
コード例 #6
0
ファイル: events.py プロジェクト: snyiu100/IDAConnect
 def __call__(self):
     idaapi.set_enum_cmt(self.tid, self.cmt.encode('utf-8'),
                         self.repeatable_cmt)
コード例 #7
0
ファイル: enum.py プロジェクト: stevemk14ebr/idascripts-2
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)
コード例 #8
0
 def __call__(self):
     idaapi.set_enum_cmt(self.tid, self.cmt, self.repeatable_cmt)
コード例 #9
0
ファイル: events.py プロジェクト: fcccode/IDAConnect
 def __call__(self):
     idaapi.set_enum_cmt(
         idaapi.get_enum_member_by_name(self.emname.encode('utf-8')),
         self.cmt.encode('utf-8') if self.cmt else '', self.repeatable_cmt)