Lines Matching refs:DexFile
48 static uint32_t MapTypeToBitMask(DexFile::MapItemType map_item_type) { in MapTypeToBitMask()
50 case DexFile::kDexTypeHeaderItem: return 1 << 0; in MapTypeToBitMask()
51 case DexFile::kDexTypeStringIdItem: return 1 << 1; in MapTypeToBitMask()
52 case DexFile::kDexTypeTypeIdItem: return 1 << 2; in MapTypeToBitMask()
53 case DexFile::kDexTypeProtoIdItem: return 1 << 3; in MapTypeToBitMask()
54 case DexFile::kDexTypeFieldIdItem: return 1 << 4; in MapTypeToBitMask()
55 case DexFile::kDexTypeMethodIdItem: return 1 << 5; in MapTypeToBitMask()
56 case DexFile::kDexTypeClassDefItem: return 1 << 6; in MapTypeToBitMask()
57 case DexFile::kDexTypeCallSiteIdItem: return 1 << 7; in MapTypeToBitMask()
58 case DexFile::kDexTypeMethodHandleItem: return 1 << 8; in MapTypeToBitMask()
59 case DexFile::kDexTypeMapList: return 1 << 9; in MapTypeToBitMask()
60 case DexFile::kDexTypeTypeList: return 1 << 10; in MapTypeToBitMask()
61 case DexFile::kDexTypeAnnotationSetRefList: return 1 << 11; in MapTypeToBitMask()
62 case DexFile::kDexTypeAnnotationSetItem: return 1 << 12; in MapTypeToBitMask()
63 case DexFile::kDexTypeClassDataItem: return 1 << 13; in MapTypeToBitMask()
64 case DexFile::kDexTypeCodeItem: return 1 << 14; in MapTypeToBitMask()
65 case DexFile::kDexTypeStringDataItem: return 1 << 15; in MapTypeToBitMask()
66 case DexFile::kDexTypeDebugInfoItem: return 1 << 16; in MapTypeToBitMask()
67 case DexFile::kDexTypeAnnotationItem: return 1 << 17; in MapTypeToBitMask()
68 case DexFile::kDexTypeEncodedArrayItem: return 1 << 18; in MapTypeToBitMask()
69 case DexFile::kDexTypeAnnotationsDirectoryItem: return 1 << 19; in MapTypeToBitMask()
70 case DexFile::kDexTypeHiddenapiClassData: return 1 << 20; in MapTypeToBitMask()
75 static bool IsDataSectionType(DexFile::MapItemType map_item_type) { in IsDataSectionType()
77 case DexFile::kDexTypeHeaderItem: in IsDataSectionType()
78 case DexFile::kDexTypeStringIdItem: in IsDataSectionType()
79 case DexFile::kDexTypeTypeIdItem: in IsDataSectionType()
80 case DexFile::kDexTypeProtoIdItem: in IsDataSectionType()
81 case DexFile::kDexTypeFieldIdItem: in IsDataSectionType()
82 case DexFile::kDexTypeMethodIdItem: in IsDataSectionType()
83 case DexFile::kDexTypeClassDefItem: in IsDataSectionType()
85 case DexFile::kDexTypeCallSiteIdItem: in IsDataSectionType()
86 case DexFile::kDexTypeMethodHandleItem: in IsDataSectionType()
87 case DexFile::kDexTypeMapList: in IsDataSectionType()
88 case DexFile::kDexTypeTypeList: in IsDataSectionType()
89 case DexFile::kDexTypeAnnotationSetRefList: in IsDataSectionType()
90 case DexFile::kDexTypeAnnotationSetItem: in IsDataSectionType()
91 case DexFile::kDexTypeClassDataItem: in IsDataSectionType()
92 case DexFile::kDexTypeCodeItem: in IsDataSectionType()
93 case DexFile::kDexTypeStringDataItem: in IsDataSectionType()
94 case DexFile::kDexTypeDebugInfoItem: in IsDataSectionType()
95 case DexFile::kDexTypeAnnotationItem: in IsDataSectionType()
96 case DexFile::kDexTypeEncodedArrayItem: in IsDataSectionType()
97 case DexFile::kDexTypeAnnotationsDirectoryItem: in IsDataSectionType()
98 case DexFile::kDexTypeHiddenapiClassData: in IsDataSectionType()
169 bool DexFileVerifier::Verify(const DexFile* dex_file, in Verify()
326 if (header_->endian_tag_ != DexFile::kDexEndianConstant) { in CheckHeader()
360 CheckSizeLimit(header_->type_ids_size_, DexFile::kDexNoIndex16, "type-ids") && in CheckHeader()
365 CheckSizeLimit(header_->proto_ids_size_, DexFile::kDexNoIndex16, "proto-ids") && in CheckHeader()
424 DexFile::MapItemType item_type = static_cast<DexFile::MapItemType>(item->type_); in CheckMap()
456 if (UNLIKELY((used_bits & MapTypeToBitMask(DexFile::kDexTypeHeaderItem)) == 0)) { in CheckMap()
460 if (UNLIKELY((used_bits & MapTypeToBitMask(DexFile::kDexTypeMapList)) == 0)) { in CheckMap()
464 if (UNLIKELY((used_bits & MapTypeToBitMask(DexFile::kDexTypeStringIdItem)) == 0 && in CheckMap()
469 if (UNLIKELY((used_bits & MapTypeToBitMask(DexFile::kDexTypeTypeIdItem)) == 0 && in CheckMap()
474 if (UNLIKELY((used_bits & MapTypeToBitMask(DexFile::kDexTypeProtoIdItem)) == 0 && in CheckMap()
479 if (UNLIKELY((used_bits & MapTypeToBitMask(DexFile::kDexTypeFieldIdItem)) == 0 && in CheckMap()
484 if (UNLIKELY((used_bits & MapTypeToBitMask(DexFile::kDexTypeMethodIdItem)) == 0 && in CheckMap()
489 if (UNLIKELY((used_bits & MapTypeToBitMask(DexFile::kDexTypeClassDefItem)) == 0 && in CheckMap()
706 DexFile::MapItemType type) { in CheckPadding()
732 uint32_t value_type = header_byte & DexFile::kDexAnnotationValueTypeMask; in CheckEncodedValue()
733 uint32_t value_arg = header_byte >> DexFile::kDexAnnotationValueArgShift; in CheckEncodedValue()
736 case DexFile::kDexAnnotationByte: in CheckEncodedValue()
743 case DexFile::kDexAnnotationShort: in CheckEncodedValue()
744 case DexFile::kDexAnnotationChar: in CheckEncodedValue()
751 case DexFile::kDexAnnotationInt: in CheckEncodedValue()
752 case DexFile::kDexAnnotationFloat: in CheckEncodedValue()
759 case DexFile::kDexAnnotationLong: in CheckEncodedValue()
760 case DexFile::kDexAnnotationDouble: in CheckEncodedValue()
763 case DexFile::kDexAnnotationString: { in CheckEncodedValue()
774 case DexFile::kDexAnnotationType: { in CheckEncodedValue()
785 case DexFile::kDexAnnotationField: in CheckEncodedValue()
786 case DexFile::kDexAnnotationEnum: { in CheckEncodedValue()
797 case DexFile::kDexAnnotationMethod: { in CheckEncodedValue()
808 case DexFile::kDexAnnotationArray: in CheckEncodedValue()
817 case DexFile::kDexAnnotationAnnotation: in CheckEncodedValue()
826 case DexFile::kDexAnnotationNull: in CheckEncodedValue()
832 case DexFile::kDexAnnotationBoolean: in CheckEncodedValue()
838 case DexFile::kDexAnnotationMethodType: { in CheckEncodedValue()
849 case DexFile::kDexAnnotationMethodHandle: { in CheckEncodedValue()
1451 case DexFile::DBG_END_SEQUENCE: { in CheckIntraDebugInfoItem()
1454 case DexFile::DBG_ADVANCE_PC: { in CheckIntraDebugInfoItem()
1458 case DexFile::DBG_ADVANCE_LINE: { in CheckIntraDebugInfoItem()
1462 case DexFile::DBG_START_LOCAL: { in CheckIntraDebugInfoItem()
1484 case DexFile::DBG_END_LOCAL: in CheckIntraDebugInfoItem()
1485 case DexFile::DBG_RESTART_LOCAL: { in CheckIntraDebugInfoItem()
1493 case DexFile::DBG_START_LOCAL_EXTENDED: { in CheckIntraDebugInfoItem()
1522 case DexFile::DBG_SET_FILE: { in CheckIntraDebugInfoItem()
1543 case DexFile::kDexVisibilityBuild: in CheckIntraAnnotationItem()
1544 case DexFile::kDexVisibilityRuntime: in CheckIntraAnnotationItem()
1545 case DexFile::kDexVisibilitySystem: in CheckIntraAnnotationItem()
1735 template <DexFile::MapItemType kType>
1740 case DexFile::kDexTypeClassDataItem: in CheckIntraSectionIterate()
1741 case DexFile::kDexTypeStringDataItem: in CheckIntraSectionIterate()
1742 case DexFile::kDexTypeDebugInfoItem: in CheckIntraSectionIterate()
1743 case DexFile::kDexTypeAnnotationItem: in CheckIntraSectionIterate()
1744 case DexFile::kDexTypeEncodedArrayItem: in CheckIntraSectionIterate()
1764 case DexFile::kDexTypeStringIdItem: { in CheckIntraSectionIterate()
1771 case DexFile::kDexTypeTypeIdItem: { in CheckIntraSectionIterate()
1778 case DexFile::kDexTypeProtoIdItem: { in CheckIntraSectionIterate()
1785 case DexFile::kDexTypeFieldIdItem: { in CheckIntraSectionIterate()
1792 case DexFile::kDexTypeMethodIdItem: { in CheckIntraSectionIterate()
1799 case DexFile::kDexTypeClassDefItem: { in CheckIntraSectionIterate()
1806 case DexFile::kDexTypeCallSiteIdItem: { in CheckIntraSectionIterate()
1813 case DexFile::kDexTypeMethodHandleItem: { in CheckIntraSectionIterate()
1820 case DexFile::kDexTypeTypeList: { in CheckIntraSectionIterate()
1826 case DexFile::kDexTypeAnnotationSetRefList: { in CheckIntraSectionIterate()
1832 case DexFile::kDexTypeAnnotationSetItem: { in CheckIntraSectionIterate()
1838 case DexFile::kDexTypeClassDataItem: { in CheckIntraSectionIterate()
1844 case DexFile::kDexTypeCodeItem: { in CheckIntraSectionIterate()
1850 case DexFile::kDexTypeStringDataItem: { in CheckIntraSectionIterate()
1856 case DexFile::kDexTypeDebugInfoItem: { in CheckIntraSectionIterate()
1862 case DexFile::kDexTypeAnnotationItem: { in CheckIntraSectionIterate()
1868 case DexFile::kDexTypeEncodedArrayItem: { in CheckIntraSectionIterate()
1874 case DexFile::kDexTypeAnnotationsDirectoryItem: { in CheckIntraSectionIterate()
1880 case DexFile::kDexTypeHiddenapiClassData: { in CheckIntraSectionIterate()
1886 case DexFile::kDexTypeHeaderItem: in CheckIntraSectionIterate()
1887 case DexFile::kDexTypeMapList: in CheckIntraSectionIterate()
1917 template <DexFile::MapItemType kType>
1924 case DexFile::kDexTypeStringIdItem: in CheckIntraIdSection()
1928 case DexFile::kDexTypeTypeIdItem: in CheckIntraIdSection()
1932 case DexFile::kDexTypeProtoIdItem: in CheckIntraIdSection()
1936 case DexFile::kDexTypeFieldIdItem: in CheckIntraIdSection()
1940 case DexFile::kDexTypeMethodIdItem: in CheckIntraIdSection()
1944 case DexFile::kDexTypeClassDefItem: in CheckIntraIdSection()
1966 template <DexFile::MapItemType kType>
2005 DexFile::MapItemType type = static_cast<DexFile::MapItemType>(item->type_); in CheckIntraSection()
2015 if (type == DexFile::kDexTypeClassDataItem) { in CheckIntraSection()
2021 case DexFile::kDexTypeHeaderItem: in CheckIntraSection()
2041 CHECK_INTRA_ID_SECTION_CASE(DexFile::kDexTypeStringIdItem) in CheckIntraSection()
2042 CHECK_INTRA_ID_SECTION_CASE(DexFile::kDexTypeTypeIdItem) in CheckIntraSection()
2043 CHECK_INTRA_ID_SECTION_CASE(DexFile::kDexTypeProtoIdItem) in CheckIntraSection()
2044 CHECK_INTRA_ID_SECTION_CASE(DexFile::kDexTypeFieldIdItem) in CheckIntraSection()
2045 CHECK_INTRA_ID_SECTION_CASE(DexFile::kDexTypeMethodIdItem) in CheckIntraSection()
2046 CHECK_INTRA_ID_SECTION_CASE(DexFile::kDexTypeClassDefItem) in CheckIntraSection()
2049 case DexFile::kDexTypeMapList: in CheckIntraSection()
2068 CHECK_INTRA_SECTION_ITERATE_CASE(DexFile::kDexTypeMethodHandleItem) in CheckIntraSection()
2069 CHECK_INTRA_SECTION_ITERATE_CASE(DexFile::kDexTypeCallSiteIdItem) in CheckIntraSection()
2079 CHECK_INTRA_DATA_SECTION_CASE(DexFile::kDexTypeTypeList) in CheckIntraSection()
2080 CHECK_INTRA_DATA_SECTION_CASE(DexFile::kDexTypeAnnotationSetRefList) in CheckIntraSection()
2081 CHECK_INTRA_DATA_SECTION_CASE(DexFile::kDexTypeAnnotationSetItem) in CheckIntraSection()
2082 CHECK_INTRA_DATA_SECTION_CASE(DexFile::kDexTypeClassDataItem) in CheckIntraSection()
2083 CHECK_INTRA_DATA_SECTION_CASE(DexFile::kDexTypeCodeItem) in CheckIntraSection()
2084 CHECK_INTRA_DATA_SECTION_CASE(DexFile::kDexTypeStringDataItem) in CheckIntraSection()
2085 CHECK_INTRA_DATA_SECTION_CASE(DexFile::kDexTypeDebugInfoItem) in CheckIntraSection()
2086 CHECK_INTRA_DATA_SECTION_CASE(DexFile::kDexTypeAnnotationItem) in CheckIntraSection()
2087 CHECK_INTRA_DATA_SECTION_CASE(DexFile::kDexTypeEncodedArrayItem) in CheckIntraSection()
2088 CHECK_INTRA_DATA_SECTION_CASE(DexFile::kDexTypeAnnotationsDirectoryItem) in CheckIntraSection()
2089 CHECK_INTRA_DATA_SECTION_CASE(DexFile::kDexTypeHiddenapiClassData) in CheckIntraSection()
2127 *success = false; return dex::TypeIndex(DexFile::kDexNoIndex16)) in FindFirstClassDataDefiner()
2135 *success = false; return dex::TypeIndex(DexFile::kDexNoIndex16)) in FindFirstClassDataDefiner()
2139 return dex::TypeIndex(DexFile::kDexNoIndex16); in FindFirstClassDataDefiner()
2151 *success = false; return dex::TypeIndex(DexFile::kDexNoIndex16)) in FindFirstAnnotationsDirectoryDefiner()
2158 *success = false; return dex::TypeIndex(DexFile::kDexNoIndex16)) in FindFirstAnnotationsDirectoryDefiner()
2165 *success = false; return dex::TypeIndex(DexFile::kDexNoIndex16)) in FindFirstAnnotationsDirectoryDefiner()
2169 return dex::TypeIndex(DexFile::kDexNoIndex16); in FindFirstAnnotationsDirectoryDefiner()
2176 if (!CheckOffsetToTypeMap(item->string_data_off_, DexFile::kDexTypeStringDataItem)) { in CheckInterStringIdItem()
2227 !CheckOffsetToTypeMap(item->parameters_off_, DexFile::kDexTypeTypeList)) { in CheckInterProtoIdItem()
2276 DCHECK_NE(prev_idx, dex::TypeIndex(DexFile::kDexNoIndex16)); in CheckInterProtoIdItem()
2277 DCHECK_NE(curr_idx, dex::TypeIndex(DexFile::kDexNoIndex16)); in CheckInterProtoIdItem()
2431 !CheckOffsetToTypeMap(item->interfaces_off_, DexFile::kDexTypeTypeList)) { in CheckInterClassDefItem()
2435 !CheckOffsetToTypeMap(item->annotations_off_, DexFile::kDexTypeAnnotationsDirectoryItem)) { in CheckInterClassDefItem()
2439 !CheckOffsetToTypeMap(item->class_data_off_, DexFile::kDexTypeClassDataItem)) { in CheckInterClassDefItem()
2443 !CheckOffsetToTypeMap(item->static_values_off_, DexFile::kDexTypeEncodedArrayItem)) { in CheckInterClassDefItem()
2448 if (header_->GetVersion() >= DexFile::kClassDefinitionOrderEnforcedVersion) { in CheckInterClassDefItem()
2487 if (header_->GetVersion() >= DexFile::kClassDefinitionOrderEnforcedVersion) { in CheckInterClassDefItem()
2548 (data_definer != dex::TypeIndex(DexFile::kDexNoIndex16)))) { in CheckInterClassDefItem()
2568 (annotations_definer != dex::TypeIndex(DexFile::kDexNoIndex16)))) { in CheckInterClassDefItem()
2582 if (!CheckOffsetToTypeMap(item->data_off_, DexFile::kDexTypeEncodedArrayItem)) { in CheckInterCallSiteIdItem()
2636 DexFile::MethodHandleType method_handle_type = in CheckInterMethodHandleItem()
2637 static_cast<DexFile::MethodHandleType>(item->method_handle_type_); in CheckInterMethodHandleItem()
2638 if (method_handle_type > DexFile::MethodHandleType::kLast) { in CheckInterMethodHandleItem()
2645 case DexFile::MethodHandleType::kStaticPut: in CheckInterMethodHandleItem()
2646 case DexFile::MethodHandleType::kStaticGet: in CheckInterMethodHandleItem()
2647 case DexFile::MethodHandleType::kInstancePut: in CheckInterMethodHandleItem()
2648 case DexFile::MethodHandleType::kInstanceGet: { in CheckInterMethodHandleItem()
2652 case DexFile::MethodHandleType::kInvokeStatic: in CheckInterMethodHandleItem()
2653 case DexFile::MethodHandleType::kInvokeInstance: in CheckInterMethodHandleItem()
2654 case DexFile::MethodHandleType::kInvokeConstructor: in CheckInterMethodHandleItem()
2655 case DexFile::MethodHandleType::kInvokeDirect: in CheckInterMethodHandleItem()
2656 case DexFile::MethodHandleType::kInvokeInterface: { in CheckInterMethodHandleItem()
2673 !CheckOffsetToTypeMap(item->annotations_off_, DexFile::kDexTypeAnnotationSetItem)) { in CheckInterAnnotationSetRefList()
2690 if (*offsets != 0 && !CheckOffsetToTypeMap(*offsets, DexFile::kDexTypeAnnotationItem)) { in CheckInterAnnotationSetItem()
2732 if (code_off != 0 && !CheckOffsetToTypeMap(code_off, DexFile::kDexTypeCodeItem)) { in CheckInterClassDataItem()
2756 !CheckOffsetToTypeMap(item->class_annotations_off_, DexFile::kDexTypeAnnotationSetItem)) { in CheckInterAnnotationsDirectoryItem()
2771 if (!CheckOffsetToTypeMap(field_item->annotations_off_, DexFile::kDexTypeAnnotationSetItem)) { in CheckInterAnnotationsDirectoryItem()
2788 if (!CheckOffsetToTypeMap(method_item->annotations_off_, DexFile::kDexTypeAnnotationSetItem)) { in CheckInterAnnotationsDirectoryItem()
2806 DexFile::kDexTypeAnnotationSetRefList)) { in CheckInterAnnotationsDirectoryItem()
2818 DexFile::MapItemType type) { in CheckInterSectionIterate()
2822 case DexFile::kDexTypeClassDataItem: in CheckInterSectionIterate()
2844 case DexFile::kDexTypeHeaderItem: in CheckInterSectionIterate()
2845 case DexFile::kDexTypeMapList: in CheckInterSectionIterate()
2846 case DexFile::kDexTypeTypeList: in CheckInterSectionIterate()
2847 case DexFile::kDexTypeCodeItem: in CheckInterSectionIterate()
2848 case DexFile::kDexTypeStringDataItem: in CheckInterSectionIterate()
2849 case DexFile::kDexTypeDebugInfoItem: in CheckInterSectionIterate()
2850 case DexFile::kDexTypeAnnotationItem: in CheckInterSectionIterate()
2851 case DexFile::kDexTypeEncodedArrayItem: in CheckInterSectionIterate()
2852 case DexFile::kDexTypeHiddenapiClassData: in CheckInterSectionIterate()
2854 case DexFile::kDexTypeStringIdItem: { in CheckInterSectionIterate()
2860 case DexFile::kDexTypeTypeIdItem: { in CheckInterSectionIterate()
2866 case DexFile::kDexTypeProtoIdItem: { in CheckInterSectionIterate()
2872 case DexFile::kDexTypeFieldIdItem: { in CheckInterSectionIterate()
2878 case DexFile::kDexTypeMethodIdItem: { in CheckInterSectionIterate()
2884 case DexFile::kDexTypeClassDefItem: { in CheckInterSectionIterate()
2898 case DexFile::kDexTypeCallSiteIdItem: { in CheckInterSectionIterate()
2904 case DexFile::kDexTypeMethodHandleItem: { in CheckInterSectionIterate()
2910 case DexFile::kDexTypeAnnotationSetRefList: { in CheckInterSectionIterate()
2916 case DexFile::kDexTypeAnnotationSetItem: { in CheckInterSectionIterate()
2922 case DexFile::kDexTypeClassDataItem: { in CheckInterSectionIterate()
2936 case DexFile::kDexTypeAnnotationsDirectoryItem: { in CheckInterSectionIterate()
2960 DexFile::MapItemType type = static_cast<DexFile::MapItemType>(item->type_); in CheckInterSection()
2964 case DexFile::kDexTypeHeaderItem: in CheckInterSection()
2965 case DexFile::kDexTypeMapList: in CheckInterSection()
2966 case DexFile::kDexTypeTypeList: in CheckInterSection()
2967 case DexFile::kDexTypeCodeItem: in CheckInterSection()
2968 case DexFile::kDexTypeStringDataItem: in CheckInterSection()
2969 case DexFile::kDexTypeDebugInfoItem: in CheckInterSection()
2970 case DexFile::kDexTypeAnnotationItem: in CheckInterSection()
2971 case DexFile::kDexTypeEncodedArrayItem: in CheckInterSection()
2974 case DexFile::kDexTypeStringIdItem: in CheckInterSection()
2975 case DexFile::kDexTypeTypeIdItem: in CheckInterSection()
2976 case DexFile::kDexTypeProtoIdItem: in CheckInterSection()
2977 case DexFile::kDexTypeFieldIdItem: in CheckInterSection()
2978 case DexFile::kDexTypeMethodIdItem: in CheckInterSection()
2979 case DexFile::kDexTypeClassDefItem: in CheckInterSection()
2980 case DexFile::kDexTypeCallSiteIdItem: in CheckInterSection()
2981 case DexFile::kDexTypeMethodHandleItem: in CheckInterSection()
2982 case DexFile::kDexTypeAnnotationSetRefList: in CheckInterSection()
2983 case DexFile::kDexTypeAnnotationSetItem: in CheckInterSection()
2984 case DexFile::kDexTypeClassDataItem: in CheckInterSection()
2985 case DexFile::kDexTypeAnnotationsDirectoryItem: in CheckInterSection()
2986 case DexFile::kDexTypeHiddenapiClassData: { in CheckInterSection()
3055 const DexFile::Header* const header, in GetStringOrError()
3076 const DexFile::Header* const header, in GetClassOrError()
3093 const DexFile::Header* const header, in GetFieldDescriptionOrError()
3110 const DexFile::Header* const header, in GetMethodDescriptionOrError()