Lines Matching refs:dex

40 namespace dex {  namespace
130 dex::StringIndex string_idx) { in GetString()
133 const dex::StringId* string_id = in GetString()
134 reinterpret_cast<const dex::StringId*>(begin + header->string_ids_off_) + string_idx.index_; in GetString()
145 dex::TypeIndex class_idx) { in GetClass()
149 const dex::TypeId* type_id = in GetClass()
150 reinterpret_cast<const dex::TypeId*>(begin + header->type_ids_off_) + class_idx.index_; in GetClass()
164 const dex::FieldId* field_id = in GetFieldDescription()
165 reinterpret_cast<const dex::FieldId*>(begin + header->field_ids_off_) + idx; in GetFieldDescription()
179 const dex::MethodId* method_id = in GetMethodDescription()
180 reinterpret_cast<const dex::MethodId*>(begin + header->method_ids_off_) + idx; in GetMethodDescription()
256 bool CheckAndGetHandlerOffsets(const dex::CodeItem* code_item,
261 dex::TypeIndex class_type_index);
265 dex::TypeIndex class_type_index,
279 bool CheckStaticFieldTypes(const dex::ClassDef& class_def);
373 bool VerifyTypeDescriptor(dex::TypeIndex idx, const char* error_msg, ExtraCheckFn extra_check);
445 bool DexFileVerifier::VerifyTypeDescriptor(dex::TypeIndex idx, in VerifyTypeDescriptor()
659 const dex::MapList* map = reinterpret_cast<const dex::MapList*>(begin_ + header_->map_off_); in CheckMap()
661 if (!CheckListSize(map, 1, sizeof(dex::MapList), "maplist content")) { in CheckMap()
665 const dex::MapItem* item = map->list_; in CheckMap()
675 if (!CheckListSize(item, count, sizeof(dex::MapItem), "map size")) { in CheckMap()
788 bool DexFileVerifier::CheckAndGetHandlerOffsets(const dex::CodeItem* code_item, in CheckAndGetHandlerOffsets()
841 dex::TypeIndex class_type_index) { in CheckClassDataItemField()
846 dex::TypeIndex my_class_index = in CheckClassDataItemField()
847 (reinterpret_cast<const dex::FieldId*>(begin_ + header_->field_ids_off_) + idx)->class_idx_; in CheckClassDataItemField()
868 dex::TypeIndex class_type_index, in CheckClassDataItemMethod()
874 const dex::MethodId& method_id = in CheckClassDataItemMethod()
875 *(reinterpret_cast<const dex::MethodId*>(begin_ + header_->method_ids_off_) + idx); in CheckClassDataItemMethod()
878 dex::TypeIndex my_class_index = method_id.class_idx_; in CheckClassDataItemMethod()
1134 bool DexFileVerifier::CheckStaticFieldTypes(const dex::ClassDef& class_def) { in CheckStaticFieldTypes()
1145 const dex::TypeId& type_id = dex_file_->GetTypeId(dex_file_->GetFieldId(index).type_idx_); in CheckStaticFieldTypes()
1232 if (!CheckListSize(ptr_, 1, sizeof(dex::TypeId), "type_ids")) { in CheckIntraTypeIdItem()
1236 const dex::TypeId* type_id = reinterpret_cast<const dex::TypeId*>(ptr_); in CheckIntraTypeIdItem()
1243 ptr_ += sizeof(dex::TypeId); in CheckIntraTypeIdItem()
1248 if (!CheckListSize(ptr_, 1, sizeof(dex::ProtoId), "proto_ids")) { in CheckIntraProtoIdItem()
1252 const dex::ProtoId* proto_id = reinterpret_cast<const dex::ProtoId*>(ptr_); in CheckIntraProtoIdItem()
1260 ptr_ += sizeof(dex::ProtoId); in CheckIntraProtoIdItem()
1265 if (!CheckListSize(ptr_, 1, sizeof(dex::FieldId), "field_ids")) { in CheckIntraFieldIdItem()
1269 const dex::FieldId* field_id = reinterpret_cast<const dex::FieldId*>(ptr_); in CheckIntraFieldIdItem()
1276 ptr_ += sizeof(dex::FieldId); in CheckIntraFieldIdItem()
1281 if (!CheckListSize(ptr_, 1, sizeof(dex::MethodId), "method_ids")) { in CheckIntraMethodIdItem()
1285 const dex::MethodId* method_id = reinterpret_cast<const dex::MethodId*>(ptr_); in CheckIntraMethodIdItem()
1292 ptr_ += sizeof(dex::MethodId); in CheckIntraMethodIdItem()
1297 if (!CheckListSize(ptr_, 1, sizeof(dex::ClassDef), "class_defs")) { in CheckIntraClassDefItem()
1301 const dex::ClassDef* class_def = reinterpret_cast<const dex::ClassDef*>(ptr_); in CheckIntraClassDefItem()
1330 ptr_ += sizeof(dex::ClassDef); in CheckIntraClassDefItem()
1335 if (!CheckListSize(ptr_, 1, sizeof(dex::MethodHandleItem), "method_handles")) { in CheckIntraMethodHandleItem()
1339 const dex::MethodHandleItem* item = reinterpret_cast<const dex::MethodHandleItem*>(ptr_); in CheckIntraMethodHandleItem()
1370 ptr_ += sizeof(dex::MethodHandleItem); in CheckIntraMethodHandleItem()
1375 const dex::TypeList* type_list = reinterpret_cast<const dex::TypeList*>(ptr_); in CheckIntraTypeList()
1376 if (!CheckList(sizeof(dex::TypeItem), "type_list", &ptr_)) { in CheckIntraTypeList()
1534 const dex::CodeItem* code_item = reinterpret_cast<const dex::CodeItem*>(ptr_); in CheckIntraCodeItem()
1535 if (!CheckListSize(code_item, 1, sizeof(dex::CodeItem), "code")) { in CheckIntraCodeItem()
1577 const dex::TryItem* try_items = accessor.TryItems().begin(); in CheckIntraCodeItem()
1578 if (!CheckListSize(try_items, try_items_size, sizeof(dex::TryItem), "try_items size")) { in CheckIntraCodeItem()
1860 const dex::HiddenapiClassData* item = reinterpret_cast<const dex::HiddenapiClassData*>(ptr_); in CheckIntraHiddenapiClassData()
1887 const dex::ClassDef& class_def = dex_file_->GetClassDef(i); in CheckIntraHiddenapiClassData()
1960 const dex::AnnotationsDirectoryItem* item = in CheckIntraAnnotationsDirectoryItem()
1961 reinterpret_cast<const dex::AnnotationsDirectoryItem*>(ptr_); in CheckIntraAnnotationsDirectoryItem()
1962 if (!CheckListSize(item, 1, sizeof(dex::AnnotationsDirectoryItem), "annotations_directory")) { in CheckIntraAnnotationsDirectoryItem()
1967 const dex::FieldAnnotationsItem* field_item = in CheckIntraAnnotationsDirectoryItem()
1968 reinterpret_cast<const dex::FieldAnnotationsItem*>(item + 1); in CheckIntraAnnotationsDirectoryItem()
1972 sizeof(dex::FieldAnnotationsItem), in CheckIntraAnnotationsDirectoryItem()
1992 const dex::MethodAnnotationsItem* method_item = in CheckIntraAnnotationsDirectoryItem()
1993 reinterpret_cast<const dex::MethodAnnotationsItem*>(field_item); in CheckIntraAnnotationsDirectoryItem()
1997 sizeof(dex::MethodAnnotationsItem), in CheckIntraAnnotationsDirectoryItem()
2017 const dex::ParameterAnnotationsItem* parameter_item = in CheckIntraAnnotationsDirectoryItem()
2018 reinterpret_cast<const dex::ParameterAnnotationsItem*>(method_item); in CheckIntraAnnotationsDirectoryItem()
2020 if (!CheckListSize(parameter_item, parameter_count, sizeof(dex::ParameterAnnotationsItem), in CheckIntraAnnotationsDirectoryItem()
2076 if (!CheckListSize(ptr_, 1, sizeof(dex::StringId), "string_ids")) { in CheckIntraSectionIterate()
2079 ptr_ += sizeof(dex::StringId); in CheckIntraSectionIterate()
2113 if (!CheckListSize(ptr_, 1, sizeof(dex::CallSiteIdItem), "call_site_ids")) { in CheckIntraSectionIterate()
2116 ptr_ += sizeof(dex::CallSiteIdItem); in CheckIntraSectionIterate()
2132 if (!CheckList(sizeof(dex::AnnotationSetRefItem), "annotation_set_ref_list", &ptr_)) { in CheckIntraSectionIterate()
2301 const dex::MapList* map = reinterpret_cast<const dex::MapList*>(begin_ + header_->map_off_); in CheckIntraSection()
2302 const dex::MapItem* item = map->list_; in CheckIntraSection()
2373 ptr_ += sizeof(uint32_t) + (map->size_ * sizeof(dex::MapItem)); in CheckIntraSection()
2374 offset = section_offset + sizeof(uint32_t) + (map->size_ * sizeof(dex::MapItem)); in CheckIntraSection()
2458 const dex::AnnotationsDirectoryItem* item = in FindFirstAnnotationsDirectoryDefiner()
2459 reinterpret_cast<const dex::AnnotationsDirectoryItem*>(ptr); in FindFirstAnnotationsDirectoryDefiner()
2462 dex::FieldAnnotationsItem* field_items = (dex::FieldAnnotationsItem*) (item + 1); in FindFirstAnnotationsDirectoryDefiner()
2468 dex::MethodAnnotationsItem* method_items = (dex::MethodAnnotationsItem*) (item + 1); in FindFirstAnnotationsDirectoryDefiner()
2474 dex::ParameterAnnotationsItem* parameter_items = (dex::ParameterAnnotationsItem*) (item + 1); in FindFirstAnnotationsDirectoryDefiner()
2483 const dex::StringId* item = reinterpret_cast<const dex::StringId*>(ptr_); in CheckInterStringIdItem()
2489 const dex::StringId* prev_item = reinterpret_cast<const dex::StringId*>(previous_item_); in CheckInterStringIdItem()
2498 ptr_ += sizeof(dex::StringId); in CheckInterStringIdItem()
2503 const dex::TypeId* item = reinterpret_cast<const dex::TypeId*>(ptr_); in CheckInterTypeIdItem()
2508 size_t index = item - reinterpret_cast<const dex::TypeId*>(begin_ + header_->type_ids_off_); in CheckInterTypeIdItem()
2511 dex::TypeIndex(static_cast<decltype(dex::TypeIndex::index_)>(index)), in CheckInterTypeIdItem()
2520 const dex::TypeId* prev_item = reinterpret_cast<const dex::TypeId*>(previous_item_); in CheckInterTypeIdItem()
2529 ptr_ += sizeof(dex::TypeId); in CheckInterTypeIdItem()
2534 const dex::ProtoId* item = reinterpret_cast<const dex::ProtoId*>(ptr_); in CheckInterProtoIdItem()
2577 const dex::ProtoId* prev = reinterpret_cast<const dex::ProtoId*>(previous_item_); in CheckInterProtoIdItem()
2586 dex::TypeIndex prev_idx = prev_it.GetTypeIdx(); in CheckInterProtoIdItem()
2587 dex::TypeIndex curr_idx = curr_it.GetTypeIdx(); in CheckInterProtoIdItem()
2588 DCHECK_NE(prev_idx, dex::TypeIndex(DexFile::kDexNoIndex16)); in CheckInterProtoIdItem()
2589 DCHECK_NE(curr_idx, dex::TypeIndex(DexFile::kDexNoIndex16)); in CheckInterProtoIdItem()
2610 ptr_ += sizeof(dex::ProtoId); in CheckInterProtoIdItem()
2615 const dex::FieldId* item = reinterpret_cast<const dex::FieldId*>(ptr_); in CheckInterFieldIdItem()
2640 const dex::FieldId* prev_item = reinterpret_cast<const dex::FieldId*>(previous_item_); in CheckInterFieldIdItem()
2657 ptr_ += sizeof(dex::FieldId); in CheckInterFieldIdItem()
2662 const dex::MethodId* item = reinterpret_cast<const dex::MethodId*>(ptr_); in CheckInterMethodIdItem()
2686 const dex::MethodId* prev_item = reinterpret_cast<const dex::MethodId*>(previous_item_); in CheckInterMethodIdItem()
2703 ptr_ += sizeof(dex::MethodId); in CheckInterMethodIdItem()
2708 const dex::ClassDef* item = reinterpret_cast<const dex::ClassDef*>(ptr_); in CheckInterClassDefItem()
2765 const dex::ClassDef* superclass_def = dex_file_->FindClassDef(item->superclass_idx_); in CheckInterClassDefItem()
2788 const dex::TypeList* interfaces = dex_file_->GetInterfacesList(*item); in CheckInterClassDefItem()
2803 const dex::ClassDef* interface_def = in CheckInterClassDefItem()
2832 dex::TypeIndex idx1 = interfaces->GetTypeItem(i).type_idx_; in CheckInterClassDefItem()
2834 dex::TypeIndex idx2 = interfaces->GetTypeItem(j).type_idx_; in CheckInterClassDefItem()
2870 ptr_ += sizeof(dex::ClassDef); in CheckInterClassDefItem()
2875 const dex::CallSiteIdItem* item = reinterpret_cast<const dex::CallSiteIdItem*>(ptr_); in CheckInterCallSiteIdItem()
2925 ptr_ += sizeof(dex::CallSiteIdItem); in CheckInterCallSiteIdItem()
2930 const dex::AnnotationSetRefList* list = reinterpret_cast<const dex::AnnotationSetRefList*>(ptr_); in CheckInterAnnotationSetRefList()
2931 const dex::AnnotationSetRefItem* item = list->list_; in CheckInterAnnotationSetRefList()
2947 const dex::AnnotationSetItem* set = reinterpret_cast<const dex::AnnotationSetItem*>(ptr_); in CheckInterAnnotationSetItem()
2958 const dex::AnnotationItem* annotation = in CheckInterAnnotationSetItem()
2959 reinterpret_cast<const dex::AnnotationItem*>(begin_ + *offsets); in CheckInterAnnotationSetItem()
2988 const dex::TypeIndex class_type_index(defining_class); in CheckInterClassDataItem()
2989 const dex::ClassDef& class_def = dex_file_->GetClassDef(defined_class_indexes_[defining_class]); in CheckInterClassDataItem()
2994 const dex::FieldId& field = dex_file_->GetFieldId(read_field.GetIndex()); in CheckInterClassDataItem()
3017 const dex::MethodId& method = dex_file_->GetMethodId(it->GetIndex()); in CheckInterClassDataItem()
3043 const dex::AnnotationsDirectoryItem* item = in CheckInterAnnotationsDirectoryItem()
3044 reinterpret_cast<const dex::AnnotationsDirectoryItem*>(ptr_); in CheckInterAnnotationsDirectoryItem()
3054 const dex::FieldAnnotationsItem* field_item = in CheckInterAnnotationsDirectoryItem()
3055 reinterpret_cast<const dex::FieldAnnotationsItem*>(item + 1); in CheckInterAnnotationsDirectoryItem()
3060 const dex::FieldId& field = dex_file_->GetFieldId(field_item->field_idx_); in CheckInterAnnotationsDirectoryItem()
3072 const dex::MethodAnnotationsItem* method_item = in CheckInterAnnotationsDirectoryItem()
3073 reinterpret_cast<const dex::MethodAnnotationsItem*>(field_item); in CheckInterAnnotationsDirectoryItem()
3078 const dex::MethodId& method = dex_file_->GetMethodId(method_item->method_idx_); in CheckInterAnnotationsDirectoryItem()
3090 const dex::ParameterAnnotationsItem* parameter_item = in CheckInterAnnotationsDirectoryItem()
3091 reinterpret_cast<const dex::ParameterAnnotationsItem*>(method_item); in CheckInterAnnotationsDirectoryItem()
3096 const dex::MethodId& parameter_method = dex_file_->GetMethodId(parameter_item->method_idx_); in CheckInterAnnotationsDirectoryItem()
3243 const dex::StringId* string_ids = in CheckInterSection()
3244 reinterpret_cast<const dex::StringId*>(begin_ + header_->string_ids_off_); in CheckInterSection()
3251 const dex::MapList* map = reinterpret_cast<const dex::MapList*>(begin_ + header_->map_off_); in CheckInterSection()
3252 const dex::MapItem* item = map->list_; in CheckInterSection()
3414 const dex::StringId* first = reinterpret_cast<const dex::StringId*>( in FindStringRangesForMethodNames()
3416 const dex::StringId* last = first + header_->string_ids_size_; in FindStringRangesForMethodNames()
3418 auto get_string = [begin = begin_](const dex::StringId& id) { in FindStringRangesForMethodNames()
3423 auto compare = [&get_string](const dex::StringId& lhs, const char* rhs) { in FindStringRangesForMethodNames()
3665 const dex::MethodId& method_id = dex_file_->GetMethodId(method_index); in CheckConstructorProperties()