def list(cls, **type):
"""List all of the names in the database that match ``type``.
Search can be constrained by the named argument ``type``.
like = glob match against name
ea, address = name is at address
name = exact name match
regex = regular-expression against name
index = name at index
pred = function predicate
"""
res = __builtin__.list(cls.__iterate__(**type))
maxindex = max(res or [1])
maxaddr = max(__builtin__.map(idaapi.get_nlist_ea, res) or [idaapi.BADADDR])
cindex = math.ceil(math.log(maxindex)/math.log(10))
caddr = math.floor(math.log(maxaddr)/math.log(16))
for index in res:
print "[{:>{:d}d}] {:0{:d}x} {:s}".format(index, int(cindex), idaapi.get_nlist_ea(index), int(caddr), idaapi.get_nlist_name(index))
return
评论列表
文章目录