zoukankan      html  css  js  c++  java
  • 源文件相关函数

    #----------------------------------------------------------------------------
    #                 S O U R C E   F I L E / L I N E   N U M B E R S
    #----------------------------------------------------------------------------
    def AddSourceFile(ea1, ea2, filename):
        """
        Mark a range of address as belonging to a source file
        An address range may belong only to one source file.
        A source file may be represented by several address ranges.
    
        @param ea1: linear address of start of the address range
        @param ea2: linear address of end of the address range
        @param filename: name of source file.
    
        @return: 1-ok, 0-failed.
    
        @note: IDA can keep information about source files used to create the program.
               Each source file is represented by a range of addresses.
               A source file may contains several address ranges.
        """
        return idaapi.add_sourcefile(ea1, ea2, filename)
    
    
    def GetSourceFile(ea):
        """
        Get name of source file occupying the given address
    
        @param ea: linear address
    
        @return: NULL - source file information is not found
                 otherwise returns pointer to file name
        """
        return idaapi.get_sourcefile(ea)
    
    
    def DelSourceFile(ea):
        """
        Delete information about the source file
    
        @param ea: linear address belonging to the source file
    
        @return: NULL - source file information is not found
                 otherwise returns pointer to file name
        """
        return idaapi.del_sourcefile(ea)
    
    
    def SetLineNumber(ea, lnnum):
        """
        Set source line number
    
        @param ea: linear address
        @param lnnum: number of line in the source file
    
        @return: None
        """
        idaapi.set_source_linnum(ea, lnnum)
    
    
    def GetLineNumber(ea):
        """
        Get source line number
    
        @param ea: linear address
    
        @return: number of line in the source file or -1
        """
        return idaapi.get_source_linnum(ea)
    
    
    def DelLineNumber(ea):
        """
        Delete information about source line number
    
        @param ea: linear address
    
        @return: None
        """
        idaapi.del_source_linnum(ea)
  • 相关阅读:
    HDU1294 Rooted Trees Problem(整数划分 组合数学 DP)
    HDU2546 饭卡(背包)
    经典动态规划总结
    POJ1285 Combinations, Once Again(背包 排列组合)
    计数 组合数学总结
    莫队算法 2038: [2009国家集训队]小Z的袜子(hose)
    循环-24. 求给定序列前N项和之二
    循环-23. 找完数
    循环-22. 输出闰年
    循环-21. 求交错序列前N项和
  • 原文地址:https://www.cnblogs.com/fply/p/8506452.html
Copyright © 2011-2022 走看看