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()
655 const dex::MapList* map = reinterpret_cast<const dex::MapList*>(begin_ + header_->map_off_); in CheckMap()
657 if (!CheckListSize(map, 1, sizeof(dex::MapList), "maplist content")) { in CheckMap()
661 const dex::MapItem* item = map->list_; in CheckMap()
671 if (!CheckListSize(item, count, sizeof(dex::MapItem), "map size")) { in CheckMap()
784 bool DexFileVerifier::CheckAndGetHandlerOffsets(const dex::CodeItem* code_item, in CheckAndGetHandlerOffsets()
837 dex::TypeIndex class_type_index) { in CheckClassDataItemField()
842 dex::TypeIndex my_class_index = in CheckClassDataItemField()
843 (reinterpret_cast<const dex::FieldId*>(begin_ + header_->field_ids_off_) + idx)->class_idx_; in CheckClassDataItemField()
864 dex::TypeIndex class_type_index, in CheckClassDataItemMethod()
870 const dex::MethodId& method_id = in CheckClassDataItemMethod()
871 *(reinterpret_cast<const dex::MethodId*>(begin_ + header_->method_ids_off_) + idx); in CheckClassDataItemMethod()
874 dex::TypeIndex my_class_index = method_id.class_idx_; in CheckClassDataItemMethod()
1130 bool DexFileVerifier::CheckStaticFieldTypes(const dex::ClassDef& class_def) { in CheckStaticFieldTypes()
1141 const dex::TypeId& type_id = dex_file_->GetTypeId(dex_file_->GetFieldId(index).type_idx_); in CheckStaticFieldTypes()
1228 if (!CheckListSize(ptr_, 1, sizeof(dex::TypeId), "type_ids")) { in CheckIntraTypeIdItem()
1232 const dex::TypeId* type_id = reinterpret_cast<const dex::TypeId*>(ptr_); in CheckIntraTypeIdItem()
1239 ptr_ += sizeof(dex::TypeId); in CheckIntraTypeIdItem()
1244 if (!CheckListSize(ptr_, 1, sizeof(dex::ProtoId), "proto_ids")) { in CheckIntraProtoIdItem()
1248 const dex::ProtoId* proto_id = reinterpret_cast<const dex::ProtoId*>(ptr_); in CheckIntraProtoIdItem()
1256 ptr_ += sizeof(dex::ProtoId); in CheckIntraProtoIdItem()
1261 if (!CheckListSize(ptr_, 1, sizeof(dex::FieldId), "field_ids")) { in CheckIntraFieldIdItem()
1265 const dex::FieldId* field_id = reinterpret_cast<const dex::FieldId*>(ptr_); in CheckIntraFieldIdItem()
1272 ptr_ += sizeof(dex::FieldId); in CheckIntraFieldIdItem()
1277 if (!CheckListSize(ptr_, 1, sizeof(dex::MethodId), "method_ids")) { in CheckIntraMethodIdItem()
1281 const dex::MethodId* method_id = reinterpret_cast<const dex::MethodId*>(ptr_); in CheckIntraMethodIdItem()
1288 ptr_ += sizeof(dex::MethodId); in CheckIntraMethodIdItem()
1293 if (!CheckListSize(ptr_, 1, sizeof(dex::ClassDef), "class_defs")) { in CheckIntraClassDefItem()
1297 const dex::ClassDef* class_def = reinterpret_cast<const dex::ClassDef*>(ptr_); in CheckIntraClassDefItem()
1326 ptr_ += sizeof(dex::ClassDef); in CheckIntraClassDefItem()
1331 if (!CheckListSize(ptr_, 1, sizeof(dex::MethodHandleItem), "method_handles")) { in CheckIntraMethodHandleItem()
1335 const dex::MethodHandleItem* item = reinterpret_cast<const dex::MethodHandleItem*>(ptr_); in CheckIntraMethodHandleItem()
1366 ptr_ += sizeof(dex::MethodHandleItem); in CheckIntraMethodHandleItem()
1371 const dex::TypeList* type_list = reinterpret_cast<const dex::TypeList*>(ptr_); in CheckIntraTypeList()
1372 if (!CheckList(sizeof(dex::TypeItem), "type_list", &ptr_)) { in CheckIntraTypeList()
1530 const dex::CodeItem* code_item = reinterpret_cast<const dex::CodeItem*>(ptr_); in CheckIntraCodeItem()
1531 if (!CheckListSize(code_item, 1, sizeof(dex::CodeItem), "code")) { in CheckIntraCodeItem()
1573 const dex::TryItem* try_items = accessor.TryItems().begin(); in CheckIntraCodeItem()
1574 if (!CheckListSize(try_items, try_items_size, sizeof(dex::TryItem), "try_items size")) { in CheckIntraCodeItem()
1856 const dex::HiddenapiClassData* item = reinterpret_cast<const dex::HiddenapiClassData*>(ptr_); in CheckIntraHiddenapiClassData()
1883 const dex::ClassDef& class_def = dex_file_->GetClassDef(i); in CheckIntraHiddenapiClassData()
1956 const dex::AnnotationsDirectoryItem* item = in CheckIntraAnnotationsDirectoryItem()
1957 reinterpret_cast<const dex::AnnotationsDirectoryItem*>(ptr_); in CheckIntraAnnotationsDirectoryItem()
1958 if (!CheckListSize(item, 1, sizeof(dex::AnnotationsDirectoryItem), "annotations_directory")) { in CheckIntraAnnotationsDirectoryItem()
1963 const dex::FieldAnnotationsItem* field_item = in CheckIntraAnnotationsDirectoryItem()
1964 reinterpret_cast<const dex::FieldAnnotationsItem*>(item + 1); in CheckIntraAnnotationsDirectoryItem()
1968 sizeof(dex::FieldAnnotationsItem), in CheckIntraAnnotationsDirectoryItem()
1988 const dex::MethodAnnotationsItem* method_item = in CheckIntraAnnotationsDirectoryItem()
1989 reinterpret_cast<const dex::MethodAnnotationsItem*>(field_item); in CheckIntraAnnotationsDirectoryItem()
1993 sizeof(dex::MethodAnnotationsItem), in CheckIntraAnnotationsDirectoryItem()
2013 const dex::ParameterAnnotationsItem* parameter_item = in CheckIntraAnnotationsDirectoryItem()
2014 reinterpret_cast<const dex::ParameterAnnotationsItem*>(method_item); in CheckIntraAnnotationsDirectoryItem()
2016 if (!CheckListSize(parameter_item, parameter_count, sizeof(dex::ParameterAnnotationsItem), in CheckIntraAnnotationsDirectoryItem()
2072 if (!CheckListSize(ptr_, 1, sizeof(dex::StringId), "string_ids")) { in CheckIntraSectionIterate()
2075 ptr_ += sizeof(dex::StringId); in CheckIntraSectionIterate()
2109 if (!CheckListSize(ptr_, 1, sizeof(dex::CallSiteIdItem), "call_site_ids")) { in CheckIntraSectionIterate()
2112 ptr_ += sizeof(dex::CallSiteIdItem); in CheckIntraSectionIterate()
2128 if (!CheckList(sizeof(dex::AnnotationSetRefItem), "annotation_set_ref_list", &ptr_)) { in CheckIntraSectionIterate()
2297 const dex::MapList* map = reinterpret_cast<const dex::MapList*>(begin_ + header_->map_off_); in CheckIntraSection()
2298 const dex::MapItem* item = map->list_; in CheckIntraSection()
2369 ptr_ += sizeof(uint32_t) + (map->size_ * sizeof(dex::MapItem)); in CheckIntraSection()
2370 offset = section_offset + sizeof(uint32_t) + (map->size_ * sizeof(dex::MapItem)); in CheckIntraSection()
2454 const dex::AnnotationsDirectoryItem* item = in FindFirstAnnotationsDirectoryDefiner()
2455 reinterpret_cast<const dex::AnnotationsDirectoryItem*>(ptr); in FindFirstAnnotationsDirectoryDefiner()
2458 dex::FieldAnnotationsItem* field_items = (dex::FieldAnnotationsItem*) (item + 1); in FindFirstAnnotationsDirectoryDefiner()
2464 dex::MethodAnnotationsItem* method_items = (dex::MethodAnnotationsItem*) (item + 1); in FindFirstAnnotationsDirectoryDefiner()
2470 dex::ParameterAnnotationsItem* parameter_items = (dex::ParameterAnnotationsItem*) (item + 1); in FindFirstAnnotationsDirectoryDefiner()
2479 const dex::StringId* item = reinterpret_cast<const dex::StringId*>(ptr_); in CheckInterStringIdItem()
2485 const dex::StringId* prev_item = reinterpret_cast<const dex::StringId*>(previous_item_); in CheckInterStringIdItem()
2494 ptr_ += sizeof(dex::StringId); in CheckInterStringIdItem()
2499 const dex::TypeId* item = reinterpret_cast<const dex::TypeId*>(ptr_); in CheckInterTypeIdItem()
2504 size_t index = item - reinterpret_cast<const dex::TypeId*>(begin_ + header_->type_ids_off_); in CheckInterTypeIdItem()
2507 dex::TypeIndex(static_cast<decltype(dex::TypeIndex::index_)>(index)), in CheckInterTypeIdItem()
2516 const dex::TypeId* prev_item = reinterpret_cast<const dex::TypeId*>(previous_item_); in CheckInterTypeIdItem()
2525 ptr_ += sizeof(dex::TypeId); in CheckInterTypeIdItem()
2530 const dex::ProtoId* item = reinterpret_cast<const dex::ProtoId*>(ptr_); in CheckInterProtoIdItem()
2573 const dex::ProtoId* prev = reinterpret_cast<const dex::ProtoId*>(previous_item_); in CheckInterProtoIdItem()
2582 dex::TypeIndex prev_idx = prev_it.GetTypeIdx(); in CheckInterProtoIdItem()
2583 dex::TypeIndex curr_idx = curr_it.GetTypeIdx(); in CheckInterProtoIdItem()
2584 DCHECK_NE(prev_idx, dex::TypeIndex(DexFile::kDexNoIndex16)); in CheckInterProtoIdItem()
2585 DCHECK_NE(curr_idx, dex::TypeIndex(DexFile::kDexNoIndex16)); in CheckInterProtoIdItem()
2606 ptr_ += sizeof(dex::ProtoId); in CheckInterProtoIdItem()
2611 const dex::FieldId* item = reinterpret_cast<const dex::FieldId*>(ptr_); in CheckInterFieldIdItem()
2636 const dex::FieldId* prev_item = reinterpret_cast<const dex::FieldId*>(previous_item_); in CheckInterFieldIdItem()
2653 ptr_ += sizeof(dex::FieldId); in CheckInterFieldIdItem()
2658 const dex::MethodId* item = reinterpret_cast<const dex::MethodId*>(ptr_); in CheckInterMethodIdItem()
2682 const dex::MethodId* prev_item = reinterpret_cast<const dex::MethodId*>(previous_item_); in CheckInterMethodIdItem()
2699 ptr_ += sizeof(dex::MethodId); in CheckInterMethodIdItem()
2704 const dex::ClassDef* item = reinterpret_cast<const dex::ClassDef*>(ptr_); in CheckInterClassDefItem()
2761 const dex::ClassDef* superclass_def = dex_file_->FindClassDef(item->superclass_idx_); in CheckInterClassDefItem()
2784 const dex::TypeList* interfaces = dex_file_->GetInterfacesList(*item); in CheckInterClassDefItem()
2799 const dex::ClassDef* interface_def = in CheckInterClassDefItem()
2828 dex::TypeIndex idx1 = interfaces->GetTypeItem(i).type_idx_; in CheckInterClassDefItem()
2830 dex::TypeIndex idx2 = interfaces->GetTypeItem(j).type_idx_; in CheckInterClassDefItem()
2866 ptr_ += sizeof(dex::ClassDef); in CheckInterClassDefItem()
2871 const dex::CallSiteIdItem* item = reinterpret_cast<const dex::CallSiteIdItem*>(ptr_); in CheckInterCallSiteIdItem()
2921 ptr_ += sizeof(dex::CallSiteIdItem); in CheckInterCallSiteIdItem()
2926 const dex::AnnotationSetRefList* list = reinterpret_cast<const dex::AnnotationSetRefList*>(ptr_); in CheckInterAnnotationSetRefList()
2927 const dex::AnnotationSetRefItem* item = list->list_; in CheckInterAnnotationSetRefList()
2943 const dex::AnnotationSetItem* set = reinterpret_cast<const dex::AnnotationSetItem*>(ptr_); in CheckInterAnnotationSetItem()
2954 const dex::AnnotationItem* annotation = in CheckInterAnnotationSetItem()
2955 reinterpret_cast<const dex::AnnotationItem*>(begin_ + *offsets); in CheckInterAnnotationSetItem()
2984 const dex::TypeIndex class_type_index(defining_class); in CheckInterClassDataItem()
2985 const dex::ClassDef& class_def = dex_file_->GetClassDef(defined_class_indexes_[defining_class]); in CheckInterClassDataItem()
2990 const dex::FieldId& field = dex_file_->GetFieldId(read_field.GetIndex()); in CheckInterClassDataItem()
3013 const dex::MethodId& method = dex_file_->GetMethodId(it->GetIndex()); in CheckInterClassDataItem()
3039 const dex::AnnotationsDirectoryItem* item = in CheckInterAnnotationsDirectoryItem()
3040 reinterpret_cast<const dex::AnnotationsDirectoryItem*>(ptr_); in CheckInterAnnotationsDirectoryItem()
3050 const dex::FieldAnnotationsItem* field_item = in CheckInterAnnotationsDirectoryItem()
3051 reinterpret_cast<const dex::FieldAnnotationsItem*>(item + 1); in CheckInterAnnotationsDirectoryItem()
3056 const dex::FieldId& field = dex_file_->GetFieldId(field_item->field_idx_); in CheckInterAnnotationsDirectoryItem()
3068 const dex::MethodAnnotationsItem* method_item = in CheckInterAnnotationsDirectoryItem()
3069 reinterpret_cast<const dex::MethodAnnotationsItem*>(field_item); in CheckInterAnnotationsDirectoryItem()
3074 const dex::MethodId& method = dex_file_->GetMethodId(method_item->method_idx_); in CheckInterAnnotationsDirectoryItem()
3086 const dex::ParameterAnnotationsItem* parameter_item = in CheckInterAnnotationsDirectoryItem()
3087 reinterpret_cast<const dex::ParameterAnnotationsItem*>(method_item); in CheckInterAnnotationsDirectoryItem()
3092 const dex::MethodId& parameter_method = dex_file_->GetMethodId(parameter_item->method_idx_); in CheckInterAnnotationsDirectoryItem()
3239 const dex::StringId* string_ids = in CheckInterSection()
3240 reinterpret_cast<const dex::StringId*>(begin_ + header_->string_ids_off_); in CheckInterSection()
3247 const dex::MapList* map = reinterpret_cast<const dex::MapList*>(begin_ + header_->map_off_); in CheckInterSection()
3248 const dex::MapItem* item = map->list_; in CheckInterSection()
3410 const dex::StringId* first = reinterpret_cast<const dex::StringId*>( in FindStringRangesForMethodNames()
3412 const dex::StringId* last = first + header_->string_ids_size_; in FindStringRangesForMethodNames()
3414 auto get_string = [begin = begin_](const dex::StringId& id) { in FindStringRangesForMethodNames()
3419 auto compare = [&get_string](const dex::StringId& lhs, const char* rhs) { in FindStringRangesForMethodNames()
3661 const dex::MethodId& method_id = dex_file_->GetMethodId(method_index); in CheckConstructorProperties()