def list(**type):
"""List all the structures within the database.
Search type can be identified by providing a named argument.
like = glob match
regex = regular expression
index = particular index
identifier = particular id number
pred = function predicate
"""
res = __builtin__.list(iterate(**type))
maxindex = max(__builtin__.map(utils.compose(operator.attrgetter('index'),"{:d}".format,len), res) or [1])
maxname = max(__builtin__.map(utils.compose(operator.attrgetter('name'),len), res) or [1])
maxsize = max(__builtin__.map(utils.compose(operator.attrgetter('size'),"{:x}".format,len), res) or [1])
for st in res:
print("[{:{:d}d}] {:>{:d}s} {:<+{:d}x} ({:d} members){:s}".format(idaapi.get_struc_idx(st.id), maxindex, st.name, maxname, st.size, maxsize, len(st.members), " // {:s}".format(st.comment) if st.comment else ''))
return
评论列表
文章目录