idc.py 文件源码

python
阅读 34 收藏 0 点赞 0 评论 0

项目:DecLLVM 作者: F8LEFT 项目源码 文件源码
def AddStrucEx(index, name, is_union):
    """
    Define a new structure type

    @param index: index of new structure type
                  If another structure has the specified index,
                  then index of that structure and all other
                  structures will be incremented, freeing the specifed
                  index. If index is == -1, then the biggest index
                  number will be used.
                  See GetFirstStrucIdx() for the explanation of
                  structure indices and IDs.
    @param name: name of the new structure type.
    @param is_union: 0: structure
                     1: union

    @return: -1 if can't define structure type because of
             bad structure name: the name is ill-formed or is
             already used in the program.
             otherwise returns ID of the new structure type
    """
    if index == -1:
        index = BADADDR

    return idaapi.add_struc(index, name, is_union)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号