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
评论列表
文章目录