def loadStructs(): idx = idaapi.get_first_struc_idx() existingStructs = [] while idx != idc.BADADDR: tid = idaapi.get_struc_by_idx(idx) existingStructs.append(idaapi.get_struc_name(tid)) idx = idaapi.get_next_struc_idx(idx) existingStructs.sort() return existingStructs
def iterate(): """Iterate through all structures defined in the database""" idx = idaapi.get_first_struc_idx() while idx != idaapi.get_last_struc_idx(): identifier = idaapi.get_struc_by_idx(idx) yield instance(identifier) idx = idaapi.get_next_struc_idx(idx) idx = idaapi.get_last_struc_idx() yield instance(idaapi.get_struc_by_idx(idx))
def getFirstStructIdx(): return idaapi.get_first_struc_idx()