def get_function_sid_without_del(self, in_stack, local_size=1, count_from_first_var=False): if not in_stack: return 'create_struct_complex', idc.AddStrucEx(0, 'create_struct_complex', 0) ea = yaunit.get_next_function(lambda ea : yaunit.has_locals(ea, local_size, count_from_first_var)) frame = idaapi.get_frame(ea) self.assertNotEqual(frame, None) offset = idc.GetFirstMember(frame.id) return ea, frame.id
def get_function_sid(self, in_stack, local_size=1): if not in_stack: return 'create_struct_complex', idc.AddStrucEx(0, 'create_struct_complex', 0) ea = yaunit.get_next_function(lambda ea : yaunit.has_locals(ea, local_size)) frame = idaapi.get_frame(ea) self.assertNotEqual(frame, None) offset = idc.GetFirstMember(frame.id) while offset != idaapi.BADADDR: idc.DelStrucMember(frame.id, offset) offset = idc.GetFirstMember(frame.id) return ea, frame.id