コード例 #1
0
 def visit_enum_member(self, cid, val):
     for cmt_type in (True, False):
         cmt = idaapi.get_enum_member_cmt(cid, cmt_type)
         if cmt:
             new_cmt = rebase_comment(self.segs, self.delta, cmt)
             if new_cmt:
                 idaapi.set_enum_member_cmt(cid, new_cmt, cmt_type)
     return 0
コード例 #2
0
    def comment(cls, mid, comment, **repeatable):
        """Set the comment for the enumeration member id `mid` to `comment`.

        If the bool `repeatable` is specified, then set the repeatable comment.
        """
        return idaapi.set_enum_member_cmt(mid, comment,
                                          kwds.get('repeatable', True))
コード例 #3
0
ファイル: enumeration.py プロジェクト: arizvisa/idascripts
    def comment(cls, mid, comment, **repeatable):
        """Set the comment for the enumeration member id `mid` to `comment`.

        If the bool `repeatable` is specified, then set the repeatable comment.
        """
        res = utils.string.to(comment)
        return idaapi.set_enum_member_cmt(mid, res, repeatable.get('repeatable', True))
コード例 #4
0
    def comment(cls, mid, comment, **repeatable):
        """Set the comment for the enumeration member id `mid` to `comment`.

        If the bool `repeatable` is specified, then set the repeatable comment.
        """
        if not interface.node.is_identifier(mid):
            raise E.MemberNotFoundError(u"{:s}.comment({:#x}, {!r}) : Unable to locate member by the specified identifier.".format('.'.join((__name__, cls.__name__)), mid, comment))
        res = utils.string.to(comment)
        return idaapi.set_enum_member_cmt(mid, res, repeatable.get('repeatable', True))
コード例 #5
0
ファイル: enum.py プロジェクト: boogie1337/Sark
 def repeat(self, comment):
     success = idaapi.set_enum_member_cmt(self._cid, comment, True)
     if not success:
         raise exceptions.CantSetEnumMemberComment("Cant set enum member comment.")
コード例 #6
0
ファイル: enum.py プロジェクト: stevemk14ebr/idascripts-2
 def comment(identifier, comment=None, repeatable=True):
     '''Given a member id, fetch/set it's /comment/'''
     if comment is None:
         return idaapi.get_enum_member_cmt(identifier, repeatable)
     return idaapi.set_enum_member_cmt(identifier, comment, repeatable)