def GlobalorLocal(self):
origlobal= self._global
views = ['1','2','3']
if self._global == 1:
tmpglobal = 0
else:
tmpglobal = 1
c_ea = idc.ScreenEA()
(c_startEA,c_endEA) = self._GetFuncRange(c_ea)
indexs = [i for i,item in enumerate(self._tablelist) if item[2] in views]
for index in indexs:
ea = int(self._tablelist[index][0],16)
DEBUG_PRINT( ea)
(startEA,endEA) = self._GetFuncRange(ea)
if startEA == c_startEA:
c_index = index
continue
self._delComms(startEA,endEA)
self._tablelist[index][2] = '0'
for ea in range(c_startEA,c_endEA+1):
if ea in self._dbDict.keys():
if self._dbDict[ea]._shown == True:
idx = self.GetIDX(ea)
id = self.GetID(ea, idx)
oldComm = str(idc.GetCommentEx(ea, 0))
startIdx = oldComm.find(self._commMarker)
if(startIdx != -1):
comm = oldComm[0:startIdx]
idc.MakeComm(ea, str(comm).strip())
self._global = tmpglobal
self._ApdComm(ea,id)
self._global = origlobal
self._global = tmpglobal
return
评论列表
文章目录