Lines Matching refs:item
375 DexMapItem* item = pMap->list; in swapMap() local
386 CHECK_LIST_SIZE(item, count, sizeOfItem); in swapMap()
389 SWAP_FIELD2(item->type); in swapMap()
390 SWAP_FIELD2(item->unused); in swapMap()
391 SWAP_FIELD4(item->size); in swapMap()
392 SWAP_OFFSET4(item->offset); in swapMap()
396 } else if (lastOffset >= item->offset) { in swapMap()
398 lastOffset, item->offset); in swapMap()
402 if (item->offset >= state->pHeader->fileSize) { in swapMap()
404 item->offset, state->pHeader->fileSize); in swapMap()
408 if (isDataSectionType(item->type)) { in swapMap()
409 u4 icount = item->size; in swapMap()
426 u4 bit = mapTypeToBitMask(item->type); in swapMap()
433 ALOGE("Duplicate map section of type %#x", item->type); in swapMap()
437 if (item->type == kDexTypeCallSiteIdItem) { in swapMap()
438 state->pCallSiteIds = item; in swapMap()
439 } else if (item->type == kDexTypeMethodHandleItem) { in swapMap()
440 state->pMethodHandleItems = item; in swapMap()
444 lastOffset = item->offset; in swapMap()
445 item++; in swapMap()
532 DexStringId* item = (DexStringId*) ptr; in swapStringIdItem() local
534 CHECK_PTR_RANGE(item, item + 1); in swapStringIdItem()
535 SWAP_OFFSET4(item->stringDataOff); in swapStringIdItem()
537 return item + 1; in swapStringIdItem()
542 const DexStringId* item = (const DexStringId*) ptr; in crossVerifyStringIdItem() local
545 item->stringDataOff, kDexTypeStringDataItem)) { in crossVerifyStringIdItem()
553 const char* s1 = dexGetStringData(state->pDexFile, item); in crossVerifyStringIdItem()
560 return (void*) (item + 1); in crossVerifyStringIdItem()
565 DexTypeId* item = (DexTypeId*) ptr; in swapTypeIdItem() local
567 CHECK_PTR_RANGE(item, item + 1); in swapTypeIdItem()
568 SWAP_INDEX4(item->descriptorIdx, state->pHeader->stringIdsSize); in swapTypeIdItem()
570 return item + 1; in swapTypeIdItem()
575 const DexTypeId* item = (const DexTypeId*) ptr; in crossVerifyTypeIdItem() local
577 dexStringById(state->pDexFile, item->descriptorIdx); in crossVerifyTypeIdItem()
587 if (item0->descriptorIdx >= item->descriptorIdx) { in crossVerifyTypeIdItem()
589 item0->descriptorIdx, item->descriptorIdx); in crossVerifyTypeIdItem()
594 return (void*) (item + 1); in crossVerifyTypeIdItem()
599 DexProtoId* item = (DexProtoId*) ptr; in swapProtoIdItem() local
601 CHECK_PTR_RANGE(item, item + 1); in swapProtoIdItem()
602 SWAP_INDEX4(item->shortyIdx, state->pHeader->stringIdsSize); in swapProtoIdItem()
603 SWAP_INDEX4(item->returnTypeIdx, state->pHeader->typeIdsSize); in swapProtoIdItem()
604 SWAP_OFFSET4(item->parametersOff); in swapProtoIdItem()
606 return item + 1; in swapProtoIdItem()
656 const DexProtoId* item = (const DexProtoId*) ptr; in crossVerifyProtoIdItem() local
658 dexStringById(state->pDexFile, item->shortyIdx); in crossVerifyProtoIdItem()
661 item->parametersOff, kDexTypeTypeList)) { in crossVerifyProtoIdItem()
666 dexStringByTypeIdx(state->pDexFile, item->returnTypeIdx), in crossVerifyProtoIdItem()
671 u4 protoIdx = item - state->pDexFile->pProtoIds; in crossVerifyProtoIdItem()
705 if (item0->returnTypeIdx > item->returnTypeIdx) { in crossVerifyProtoIdItem()
708 } else if (item0->returnTypeIdx == item->returnTypeIdx) { in crossVerifyProtoIdItem()
744 return (void*) (item + 1); in crossVerifyProtoIdItem()
749 DexFieldId* item = (DexFieldId*) ptr; in swapFieldIdItem() local
751 CHECK_PTR_RANGE(item, item + 1); in swapFieldIdItem()
752 SWAP_INDEX2(item->classIdx, state->pHeader->typeIdsSize); in swapFieldIdItem()
753 SWAP_INDEX2(item->typeIdx, state->pHeader->typeIdsSize); in swapFieldIdItem()
754 SWAP_INDEX4(item->nameIdx, state->pHeader->stringIdsSize); in swapFieldIdItem()
756 return item + 1; in swapFieldIdItem()
761 const DexFieldId* item = (const DexFieldId*) ptr; in crossVerifyFieldIdItem() local
764 s = dexStringByTypeIdx(state->pDexFile, item->classIdx); in crossVerifyFieldIdItem()
770 s = dexStringByTypeIdx(state->pDexFile, item->typeIdx); in crossVerifyFieldIdItem()
776 s = dexStringById(state->pDexFile, item->nameIdx); in crossVerifyFieldIdItem()
788 if (item0->classIdx > item->classIdx) { in crossVerifyFieldIdItem()
791 } else if (item0->classIdx < item->classIdx) { in crossVerifyFieldIdItem()
796 if (item0->nameIdx > item->nameIdx) { in crossVerifyFieldIdItem()
799 } else if (item0->nameIdx < item->nameIdx) { in crossVerifyFieldIdItem()
805 if (item0->typeIdx >= item->typeIdx) { in crossVerifyFieldIdItem()
816 return (void*) (item + 1); in crossVerifyFieldIdItem()
821 DexMethodId* item = (DexMethodId*) ptr; in swapMethodIdItem() local
823 CHECK_PTR_RANGE(item, item + 1); in swapMethodIdItem()
824 SWAP_INDEX2(item->classIdx, state->pHeader->typeIdsSize); in swapMethodIdItem()
825 SWAP_INDEX2(item->protoIdx, state->pHeader->protoIdsSize); in swapMethodIdItem()
826 SWAP_INDEX4(item->nameIdx, state->pHeader->stringIdsSize); in swapMethodIdItem()
828 return item + 1; in swapMethodIdItem()
833 const DexMethodId* item = (const DexMethodId*) ptr; in crossVerifyMethodIdItem() local
836 s = dexStringByTypeIdx(state->pDexFile, item->classIdx); in crossVerifyMethodIdItem()
842 s = dexStringById(state->pDexFile, item->nameIdx); in crossVerifyMethodIdItem()
854 if (item0->classIdx > item->classIdx) { in crossVerifyMethodIdItem()
857 } else if (item0->classIdx < item->classIdx) { in crossVerifyMethodIdItem()
862 if (item0->nameIdx > item->nameIdx) { in crossVerifyMethodIdItem()
865 } else if (item0->nameIdx < item->nameIdx) { in crossVerifyMethodIdItem()
871 if (item0->protoIdx >= item->protoIdx) { in crossVerifyMethodIdItem()
882 return (void*) (item + 1); in crossVerifyMethodIdItem()
887 DexClassDef* item = (DexClassDef*) ptr; in swapClassDefItem() local
889 CHECK_PTR_RANGE(item, item + 1); in swapClassDefItem()
890 SWAP_INDEX4(item->classIdx, state->pHeader->typeIdsSize); in swapClassDefItem()
891 SWAP_FIELD4(item->accessFlags); in swapClassDefItem()
892 SWAP_INDEX4_OR_NOINDEX(item->superclassIdx, state->pHeader->typeIdsSize); in swapClassDefItem()
893 SWAP_OFFSET4(item->interfacesOff); in swapClassDefItem()
894 SWAP_INDEX4_OR_NOINDEX(item->sourceFileIdx, state->pHeader->stringIdsSize); in swapClassDefItem()
895 SWAP_OFFSET4(item->annotationsOff); in swapClassDefItem()
896 SWAP_OFFSET4(item->classDataOff); in swapClassDefItem()
898 if ((item->accessFlags & ~ACC_CLASS_MASK) != 0) { in swapClassDefItem()
900 ALOGV("Bogus class access flags %x", item->accessFlags); in swapClassDefItem()
901 item->accessFlags &= ACC_CLASS_MASK; in swapClassDefItem()
904 return item + 1; in swapClassDefItem()
959 const DexClassDef* item = (const DexClassDef*) ptr; in crossVerifyClassDefItem() local
960 u4 classIdx = item->classIdx; in crossVerifyClassDefItem()
975 item->interfacesOff, kDexTypeTypeList) in crossVerifyClassDefItem()
977 item->annotationsOff, kDexTypeAnnotationsDirectoryItem) in crossVerifyClassDefItem()
979 item->classDataOff, kDexTypeClassDataItem) in crossVerifyClassDefItem()
981 item->staticValuesOff, kDexTypeEncodedArrayItem); in crossVerifyClassDefItem()
987 if (item->superclassIdx != kDexNoIndex) { in crossVerifyClassDefItem()
988 descriptor = dexStringByTypeIdx(state->pDexFile, item->superclassIdx); in crossVerifyClassDefItem()
996 dexGetInterfacesList(state->pDexFile, item); in crossVerifyClassDefItem()
1035 if (!verifyClassDataIsForDef(state, item->classDataOff, item->classIdx)) { in crossVerifyClassDefItem()
1040 if (!verifyAnnotationsDirectoryIsForDef(state, item->annotationsOff, in crossVerifyClassDefItem()
1041 item->classIdx)) { in crossVerifyClassDefItem()
1046 return (void*) (item + 1); in crossVerifyClassDefItem()
1051 const DexCallSiteId* item = (const DexCallSiteId*) ptr; in crossVerifyCallSiteId() local
1056 if (item->callSiteOff < state->pHeader->dataOff || in crossVerifyCallSiteId()
1057 item->callSiteOff >= state->pHeader->dataOff + state->pHeader->dataSize) { in crossVerifyCallSiteId()
1058 ALOGE("Bad call site offset: %u", item->callSiteOff); in crossVerifyCallSiteId()
1061 return (void*) (item + 1); in crossVerifyCallSiteId()
1066 const DexMethodHandleItem* item = (const DexMethodHandleItem*) ptr; in crossVerifyMethodHandleItem() local
1071 if (item->methodHandleType > (u2) MethodHandleType::INVOKE_INTERFACE) { in crossVerifyMethodHandleItem()
1072 ALOGE("Unknown method handle type: %u", item->methodHandleType); in crossVerifyMethodHandleItem()
1075 switch ((MethodHandleType) item->methodHandleType) { in crossVerifyMethodHandleItem()
1080 if (item->fieldOrMethodIdx >= state->pHeader->fieldIdsSize) { in crossVerifyMethodHandleItem()
1081 ALOGE("Method handle has invalid field id: %u\n", item->fieldOrMethodIdx); in crossVerifyMethodHandleItem()
1090 if (item->fieldOrMethodIdx >= state->pHeader->methodIdsSize) { in crossVerifyMethodHandleItem()
1091 ALOGE("Method handle has invalid method id: %u\n", item->fieldOrMethodIdx); in crossVerifyMethodHandleItem()
1096 return (void*) (item + 1); in crossVerifyMethodHandleItem()
1103 DexFieldAnnotationsItem* item = (DexFieldAnnotationsItem*) addr; in swapFieldAnnotations() local
1108 CHECK_LIST_SIZE(item, count, sizeOfItem); in swapFieldAnnotations()
1111 SWAP_INDEX4(item->fieldIdx, state->pHeader->fieldIdsSize); in swapFieldAnnotations()
1112 SWAP_OFFSET4(item->annotationsOff); in swapFieldAnnotations()
1116 } else if (lastIdx >= item->fieldIdx) { in swapFieldAnnotations()
1118 item->fieldIdx); in swapFieldAnnotations()
1122 lastIdx = item->fieldIdx; in swapFieldAnnotations()
1123 item++; in swapFieldAnnotations()
1126 return (u1*) item; in swapFieldAnnotations()
1133 DexMethodAnnotationsItem* item = (DexMethodAnnotationsItem*) addr; in swapMethodAnnotations() local
1138 CHECK_LIST_SIZE(item, count, sizeOfItem); in swapMethodAnnotations()
1141 SWAP_INDEX4(item->methodIdx, state->pHeader->methodIdsSize); in swapMethodAnnotations()
1142 SWAP_OFFSET4(item->annotationsOff); in swapMethodAnnotations()
1146 } else if (lastIdx >= item->methodIdx) { in swapMethodAnnotations()
1148 item->methodIdx); in swapMethodAnnotations()
1152 lastIdx = item->methodIdx; in swapMethodAnnotations()
1153 item++; in swapMethodAnnotations()
1156 return (u1*) item; in swapMethodAnnotations()
1164 DexParameterAnnotationsItem* item = (DexParameterAnnotationsItem*) addr; in swapParameterAnnotations() local
1169 CHECK_LIST_SIZE(item, count, sizeOfItem); in swapParameterAnnotations()
1172 SWAP_INDEX4(item->methodIdx, state->pHeader->methodIdsSize); in swapParameterAnnotations()
1173 SWAP_OFFSET4(item->annotationsOff); in swapParameterAnnotations()
1177 } else if (lastIdx >= item->methodIdx) { in swapParameterAnnotations()
1179 item->methodIdx); in swapParameterAnnotations()
1183 lastIdx = item->methodIdx; in swapParameterAnnotations()
1184 item++; in swapParameterAnnotations()
1187 return (u1*) item; in swapParameterAnnotations()
1193 DexAnnotationsDirectoryItem* item = (DexAnnotationsDirectoryItem*) ptr; in swapAnnotationsDirectoryItem() local
1195 CHECK_PTR_RANGE(item, item + 1); in swapAnnotationsDirectoryItem()
1196 SWAP_OFFSET4(item->classAnnotationsOff); in swapAnnotationsDirectoryItem()
1197 SWAP_FIELD4(item->fieldsSize); in swapAnnotationsDirectoryItem()
1198 SWAP_FIELD4(item->methodsSize); in swapAnnotationsDirectoryItem()
1199 SWAP_FIELD4(item->parametersSize); in swapAnnotationsDirectoryItem()
1201 u1* addr = (u1*) (item + 1); in swapAnnotationsDirectoryItem()
1203 if (item->fieldsSize != 0) { in swapAnnotationsDirectoryItem()
1204 addr = swapFieldAnnotations(state, item->fieldsSize, addr); in swapAnnotationsDirectoryItem()
1210 if (item->methodsSize != 0) { in swapAnnotationsDirectoryItem()
1211 addr = swapMethodAnnotations(state, item->methodsSize, addr); in swapAnnotationsDirectoryItem()
1217 if (item->parametersSize != 0) { in swapAnnotationsDirectoryItem()
1218 addr = swapParameterAnnotations(state, item->parametersSize, addr); in swapAnnotationsDirectoryItem()
1228 DexCallSiteId* item = (DexCallSiteId*) ptr; in swapCallSiteId() local
1230 CHECK_PTR_RANGE(item, item + 1); in swapCallSiteId()
1231 SWAP_OFFSET4(item->callSiteOff); in swapCallSiteId()
1233 return (item + 1); in swapCallSiteId()
1237 DexMethodHandleItem* item = (DexMethodHandleItem*) ptr; in swapMethodHandleItem() local
1239 CHECK_PTR_RANGE(item, item + 1); in swapMethodHandleItem()
1240 SWAP_FIELD2(item->methodHandleType); in swapMethodHandleItem()
1241 SWAP_FIELD2(item->fieldOrMethodIdx); in swapMethodHandleItem()
1243 return (item + 1); in swapMethodHandleItem()
1251 const DexFieldAnnotationsItem* item = (DexFieldAnnotationsItem*) addr; in crossVerifyFieldAnnotations() local
1254 if (!verifyFieldDefiner(state, definingClass, item->fieldIdx)) { in crossVerifyFieldAnnotations()
1257 if (!dexDataMapVerify(state->pDataMap, item->annotationsOff, in crossVerifyFieldAnnotations()
1261 item++; in crossVerifyFieldAnnotations()
1264 return (const u1*) item; in crossVerifyFieldAnnotations()
1271 const DexMethodAnnotationsItem* item = (DexMethodAnnotationsItem*) addr; in crossVerifyMethodAnnotations() local
1274 if (!verifyMethodDefiner(state, definingClass, item->methodIdx)) { in crossVerifyMethodAnnotations()
1277 if (!dexDataMapVerify(state->pDataMap, item->annotationsOff, in crossVerifyMethodAnnotations()
1281 item++; in crossVerifyMethodAnnotations()
1284 return (const u1*) item; in crossVerifyMethodAnnotations()
1291 const DexParameterAnnotationsItem* item = in crossVerifyParameterAnnotations() local
1295 if (!verifyMethodDefiner(state, definingClass, item->methodIdx)) { in crossVerifyParameterAnnotations()
1298 if (!dexDataMapVerify(state->pDataMap, item->annotationsOff, in crossVerifyParameterAnnotations()
1302 item++; in crossVerifyParameterAnnotations()
1305 return (const u1*) item; in crossVerifyParameterAnnotations()
1343 const DexAnnotationsDirectoryItem* item = (const DexAnnotationsDirectoryItem*) ptr; in crossVerifyAnnotationsDirectoryItem() local
1344 u4 definingClass = findFirstAnnotationsDirectoryDefiner(state, item); in crossVerifyAnnotationsDirectoryItem()
1347 item->classAnnotationsOff, kDexTypeAnnotationSetItem)) { in crossVerifyAnnotationsDirectoryItem()
1351 const u1* addr = (const u1*) (item + 1); in crossVerifyAnnotationsDirectoryItem()
1353 if (item->fieldsSize != 0) { in crossVerifyAnnotationsDirectoryItem()
1354 addr = crossVerifyFieldAnnotations(state, item->fieldsSize, addr, in crossVerifyAnnotationsDirectoryItem()
1361 if (item->methodsSize != 0) { in crossVerifyAnnotationsDirectoryItem()
1362 addr = crossVerifyMethodAnnotations(state, item->methodsSize, addr, in crossVerifyAnnotationsDirectoryItem()
1369 if (item->parametersSize != 0) { in crossVerifyAnnotationsDirectoryItem()
1370 addr = crossVerifyParameterAnnotations(state, item->parametersSize, in crossVerifyAnnotationsDirectoryItem()
1407 DexAnnotationSetRefItem* item; in swapAnnotationSetRefList() local
1413 item = list->list; in swapAnnotationSetRefList()
1416 CHECK_LIST_SIZE(item, count, sizeOfItem); in swapAnnotationSetRefList()
1419 SWAP_OFFSET4(item->annotationsOff); in swapAnnotationSetRefList()
1420 item++; in swapAnnotationSetRefList()
1423 return item; in swapAnnotationSetRefList()
1430 const DexAnnotationSetRefItem* item = list->list; in crossVerifyAnnotationSetRefList() local
1435 item->annotationsOff, kDexTypeAnnotationSetItem)) { in crossVerifyAnnotationSetRefList()
1438 item++; in crossVerifyAnnotationSetRefList()
1441 return (void*) item; in crossVerifyAnnotationSetRefList()
1448 u4* item; in swapAnnotationSetItem() local
1454 item = set->entries; in swapAnnotationSetItem()
1457 CHECK_LIST_SIZE(item, count, sizeOfItem); in swapAnnotationSetItem()
1460 SWAP_OFFSET4(*item); in swapAnnotationSetItem()
1461 item++; in swapAnnotationSetItem()
1464 return item; in swapAnnotationSetItem()
1469 static u4 annotationItemTypeIdx(const DexAnnotationItem* item) { in annotationItemTypeIdx() argument
1470 const u1* data = item->annotation; in annotationItemTypeIdx()
1878 DexCode* item = (DexCode*) ptr; in swapCodeItem() local
1882 CHECK_PTR_RANGE(item, item + 1); in swapCodeItem()
1883 SWAP_FIELD2(item->registersSize); in swapCodeItem()
1884 SWAP_FIELD2(item->insSize); in swapCodeItem()
1885 SWAP_FIELD2(item->outsSize); in swapCodeItem()
1886 SWAP_FIELD2(item->triesSize); in swapCodeItem()
1887 SWAP_OFFSET4(item->debugInfoOff); in swapCodeItem()
1888 SWAP_FIELD4(item->insnsSize); in swapCodeItem()
1890 if (item->insSize > item->registersSize) { in swapCodeItem()
1891 ALOGE("insSize (%u) > registersSize (%u)", item->insSize, in swapCodeItem()
1892 item->registersSize); in swapCodeItem()
1896 if ((item->outsSize > 5) && (item->outsSize > item->registersSize)) { in swapCodeItem()
1904 ALOGE("outsSize (%u) > registersSize (%u)", item->outsSize, in swapCodeItem()
1905 item->registersSize); in swapCodeItem()
1909 count = item->insnsSize; in swapCodeItem()
1910 insns = item->insns; in swapCodeItem()
1920 if (item->triesSize == 0) { in swapCodeItem()
1931 ptr = swapTriesAndCatches(state, item); in swapCodeItem()
2605 const DexMapItem* item = pMap->list; in swapEverythingButHeaderAndMap() local
2611 u4 sectionOffset = item->offset; in swapEverythingButHeaderAndMap()
2612 u4 sectionCount = item->size; in swapEverythingButHeaderAndMap()
2613 u2 type = item->type; in swapEverythingButHeaderAndMap()
2778 item++; in swapEverythingButHeaderAndMap()
2791 const DexMapItem* item = pMap->list; in crossVerifyEverything() local
2796 u4 sectionOffset = item->offset; in crossVerifyEverything()
2797 u4 sectionCount = item->size; in crossVerifyEverything()
2799 switch (item->type) { in crossVerifyEverything()
2880 ALOGE("Unknown map item type %04x", item->type); in crossVerifyEverything()
2887 item->type); in crossVerifyEverything()
2890 item++; in crossVerifyEverything()