RunTrace.py 文件源码

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

项目:IDAPython-Scripts 作者: razygon 项目源码 文件源码
def _ApdComm(self, ea, id):
#        DEBUG_PRINT('_ApdComm')
        g_mark = ' '
        if self._global == 1:
            idx = self._dbDict[ea]._idx_list[id][0]
            g_mark = '_g'
        else:
            idx = self._dbDict[ea]._idx_list[id][0] - self._dbDict[idaapi.get_func(ea).startEA]._idx_list[0][0]
            g_mark = '_L'

        idxcomm = self._dbDict[ea]._idx_list[id][1]
        comm = self._commMarker + str(idx) + g_mark +' ' +str(idxcomm).strip('{}') 
        oldComm = str(idc.GetCommentEx(ea, 0))
        tag = ''
        for xref in idautils.CodeRefsTo(ea, 0):
            if xref !=[]:
                if ea != idaapi.get_func(ea).startEA and oldComm == 'None':
                    comm = '\n' + comm                    
                break              

        if(oldComm != 'None'):
            comm = oldComm + '\n' + comm
        idc.MakeComm(ea, str(comm))
        self._dbDict[ea]._shown = True
        return
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号