Lines Matching refs:item
371 DexMapItem* item = pMap->list; in swapMap() local
382 CHECK_LIST_SIZE(item, count, sizeOfItem); in swapMap()
385 SWAP_FIELD2(item->type); in swapMap()
386 SWAP_FIELD2(item->unused); in swapMap()
387 SWAP_FIELD4(item->size); in swapMap()
388 SWAP_OFFSET4(item->offset); in swapMap()
392 } else if (lastOffset >= item->offset) { in swapMap()
394 lastOffset, item->offset); in swapMap()
398 if (item->offset >= state->pHeader->fileSize) { in swapMap()
400 item->offset, state->pHeader->fileSize); in swapMap()
404 if (isDataSectionType(item->type)) { in swapMap()
405 u4 icount = item->size; in swapMap()
422 u4 bit = mapTypeToBitMask(item->type); in swapMap()
429 ALOGE("Duplicate map section of type %#x", item->type); in swapMap()
434 lastOffset = item->offset; in swapMap()
435 item++; in swapMap()
522 DexStringId* item = (DexStringId*) ptr; in swapStringIdItem() local
524 CHECK_PTR_RANGE(item, item + 1); in swapStringIdItem()
525 SWAP_OFFSET4(item->stringDataOff); in swapStringIdItem()
527 return item + 1; in swapStringIdItem()
532 const DexStringId* item = (const DexStringId*) ptr; in crossVerifyStringIdItem() local
535 item->stringDataOff, kDexTypeStringDataItem)) { in crossVerifyStringIdItem()
543 const char* s1 = dexGetStringData(state->pDexFile, item); in crossVerifyStringIdItem()
550 return (void*) (item + 1); in crossVerifyStringIdItem()
555 DexTypeId* item = (DexTypeId*) ptr; in swapTypeIdItem() local
557 CHECK_PTR_RANGE(item, item + 1); in swapTypeIdItem()
558 SWAP_INDEX4(item->descriptorIdx, state->pHeader->stringIdsSize); in swapTypeIdItem()
560 return item + 1; in swapTypeIdItem()
565 const DexTypeId* item = (const DexTypeId*) ptr; in crossVerifyTypeIdItem() local
567 dexStringById(state->pDexFile, item->descriptorIdx); in crossVerifyTypeIdItem()
577 if (item0->descriptorIdx >= item->descriptorIdx) { in crossVerifyTypeIdItem()
579 item0->descriptorIdx, item->descriptorIdx); in crossVerifyTypeIdItem()
584 return (void*) (item + 1); in crossVerifyTypeIdItem()
589 DexProtoId* item = (DexProtoId*) ptr; in swapProtoIdItem() local
591 CHECK_PTR_RANGE(item, item + 1); in swapProtoIdItem()
592 SWAP_INDEX4(item->shortyIdx, state->pHeader->stringIdsSize); in swapProtoIdItem()
593 SWAP_INDEX4(item->returnTypeIdx, state->pHeader->typeIdsSize); in swapProtoIdItem()
594 SWAP_OFFSET4(item->parametersOff); in swapProtoIdItem()
596 return item + 1; in swapProtoIdItem()
646 const DexProtoId* item = (const DexProtoId*) ptr; in crossVerifyProtoIdItem() local
648 dexStringById(state->pDexFile, item->shortyIdx); in crossVerifyProtoIdItem()
651 item->parametersOff, kDexTypeTypeList)) { in crossVerifyProtoIdItem()
656 dexStringByTypeIdx(state->pDexFile, item->returnTypeIdx), in crossVerifyProtoIdItem()
661 u4 protoIdx = item - state->pDexFile->pProtoIds; in crossVerifyProtoIdItem()
695 if (item0->returnTypeIdx > item->returnTypeIdx) { in crossVerifyProtoIdItem()
698 } else if (item0->returnTypeIdx == item->returnTypeIdx) { in crossVerifyProtoIdItem()
734 return (void*) (item + 1); in crossVerifyProtoIdItem()
739 DexFieldId* item = (DexFieldId*) ptr; in swapFieldIdItem() local
741 CHECK_PTR_RANGE(item, item + 1); in swapFieldIdItem()
742 SWAP_INDEX2(item->classIdx, state->pHeader->typeIdsSize); in swapFieldIdItem()
743 SWAP_INDEX2(item->typeIdx, state->pHeader->typeIdsSize); in swapFieldIdItem()
744 SWAP_INDEX4(item->nameIdx, state->pHeader->stringIdsSize); in swapFieldIdItem()
746 return item + 1; in swapFieldIdItem()
751 const DexFieldId* item = (const DexFieldId*) ptr; in crossVerifyFieldIdItem() local
754 s = dexStringByTypeIdx(state->pDexFile, item->classIdx); in crossVerifyFieldIdItem()
760 s = dexStringByTypeIdx(state->pDexFile, item->typeIdx); in crossVerifyFieldIdItem()
766 s = dexStringById(state->pDexFile, item->nameIdx); in crossVerifyFieldIdItem()
778 if (item0->classIdx > item->classIdx) { in crossVerifyFieldIdItem()
781 } else if (item0->classIdx < item->classIdx) { in crossVerifyFieldIdItem()
786 if (item0->nameIdx > item->nameIdx) { in crossVerifyFieldIdItem()
789 } else if (item0->nameIdx < item->nameIdx) { in crossVerifyFieldIdItem()
795 if (item0->typeIdx >= item->typeIdx) { in crossVerifyFieldIdItem()
806 return (void*) (item + 1); in crossVerifyFieldIdItem()
811 DexMethodId* item = (DexMethodId*) ptr; in swapMethodIdItem() local
813 CHECK_PTR_RANGE(item, item + 1); in swapMethodIdItem()
814 SWAP_INDEX2(item->classIdx, state->pHeader->typeIdsSize); in swapMethodIdItem()
815 SWAP_INDEX2(item->protoIdx, state->pHeader->protoIdsSize); in swapMethodIdItem()
816 SWAP_INDEX4(item->nameIdx, state->pHeader->stringIdsSize); in swapMethodIdItem()
818 return item + 1; in swapMethodIdItem()
823 const DexMethodId* item = (const DexMethodId*) ptr; in crossVerifyMethodIdItem() local
826 s = dexStringByTypeIdx(state->pDexFile, item->classIdx); in crossVerifyMethodIdItem()
832 s = dexStringById(state->pDexFile, item->nameIdx); in crossVerifyMethodIdItem()
844 if (item0->classIdx > item->classIdx) { in crossVerifyMethodIdItem()
847 } else if (item0->classIdx < item->classIdx) { in crossVerifyMethodIdItem()
852 if (item0->nameIdx > item->nameIdx) { in crossVerifyMethodIdItem()
855 } else if (item0->nameIdx < item->nameIdx) { in crossVerifyMethodIdItem()
861 if (item0->protoIdx >= item->protoIdx) { in crossVerifyMethodIdItem()
872 return (void*) (item + 1); in crossVerifyMethodIdItem()
877 DexClassDef* item = (DexClassDef*) ptr; in swapClassDefItem() local
879 CHECK_PTR_RANGE(item, item + 1); in swapClassDefItem()
880 SWAP_INDEX4(item->classIdx, state->pHeader->typeIdsSize); in swapClassDefItem()
881 SWAP_FIELD4(item->accessFlags); in swapClassDefItem()
882 SWAP_INDEX4_OR_NOINDEX(item->superclassIdx, state->pHeader->typeIdsSize); in swapClassDefItem()
883 SWAP_OFFSET4(item->interfacesOff); in swapClassDefItem()
884 SWAP_INDEX4_OR_NOINDEX(item->sourceFileIdx, state->pHeader->stringIdsSize); in swapClassDefItem()
885 SWAP_OFFSET4(item->annotationsOff); in swapClassDefItem()
886 SWAP_OFFSET4(item->classDataOff); in swapClassDefItem()
888 if ((item->accessFlags & ~ACC_CLASS_MASK) != 0) { in swapClassDefItem()
890 ALOGV("Bogus class access flags %x", item->accessFlags); in swapClassDefItem()
891 item->accessFlags &= ACC_CLASS_MASK; in swapClassDefItem()
894 return item + 1; in swapClassDefItem()
949 const DexClassDef* item = (const DexClassDef*) ptr; in crossVerifyClassDefItem() local
950 u4 classIdx = item->classIdx; in crossVerifyClassDefItem()
965 item->interfacesOff, kDexTypeTypeList) in crossVerifyClassDefItem()
967 item->annotationsOff, kDexTypeAnnotationsDirectoryItem) in crossVerifyClassDefItem()
969 item->classDataOff, kDexTypeClassDataItem) in crossVerifyClassDefItem()
971 item->staticValuesOff, kDexTypeEncodedArrayItem); in crossVerifyClassDefItem()
977 if (item->superclassIdx != kDexNoIndex) { in crossVerifyClassDefItem()
978 descriptor = dexStringByTypeIdx(state->pDexFile, item->superclassIdx); in crossVerifyClassDefItem()
986 dexGetInterfacesList(state->pDexFile, item); in crossVerifyClassDefItem()
1025 if (!verifyClassDataIsForDef(state, item->classDataOff, item->classIdx)) { in crossVerifyClassDefItem()
1030 if (!verifyAnnotationsDirectoryIsForDef(state, item->annotationsOff, in crossVerifyClassDefItem()
1031 item->classIdx)) { in crossVerifyClassDefItem()
1036 return (void*) (item + 1); in crossVerifyClassDefItem()
1043 DexFieldAnnotationsItem* item = (DexFieldAnnotationsItem*) addr; in swapFieldAnnotations() local
1048 CHECK_LIST_SIZE(item, count, sizeOfItem); in swapFieldAnnotations()
1051 SWAP_INDEX4(item->fieldIdx, state->pHeader->fieldIdsSize); in swapFieldAnnotations()
1052 SWAP_OFFSET4(item->annotationsOff); in swapFieldAnnotations()
1056 } else if (lastIdx >= item->fieldIdx) { in swapFieldAnnotations()
1058 item->fieldIdx); in swapFieldAnnotations()
1062 lastIdx = item->fieldIdx; in swapFieldAnnotations()
1063 item++; in swapFieldAnnotations()
1066 return (u1*) item; in swapFieldAnnotations()
1073 DexMethodAnnotationsItem* item = (DexMethodAnnotationsItem*) addr; in swapMethodAnnotations() local
1078 CHECK_LIST_SIZE(item, count, sizeOfItem); in swapMethodAnnotations()
1081 SWAP_INDEX4(item->methodIdx, state->pHeader->methodIdsSize); in swapMethodAnnotations()
1082 SWAP_OFFSET4(item->annotationsOff); in swapMethodAnnotations()
1086 } else if (lastIdx >= item->methodIdx) { in swapMethodAnnotations()
1088 item->methodIdx); in swapMethodAnnotations()
1092 lastIdx = item->methodIdx; in swapMethodAnnotations()
1093 item++; in swapMethodAnnotations()
1096 return (u1*) item; in swapMethodAnnotations()
1104 DexParameterAnnotationsItem* item = (DexParameterAnnotationsItem*) addr; in swapParameterAnnotations() local
1109 CHECK_LIST_SIZE(item, count, sizeOfItem); in swapParameterAnnotations()
1112 SWAP_INDEX4(item->methodIdx, state->pHeader->methodIdsSize); in swapParameterAnnotations()
1113 SWAP_OFFSET4(item->annotationsOff); in swapParameterAnnotations()
1117 } else if (lastIdx >= item->methodIdx) { in swapParameterAnnotations()
1119 item->methodIdx); in swapParameterAnnotations()
1123 lastIdx = item->methodIdx; in swapParameterAnnotations()
1124 item++; in swapParameterAnnotations()
1127 return (u1*) item; in swapParameterAnnotations()
1133 DexAnnotationsDirectoryItem* item = (DexAnnotationsDirectoryItem*) ptr; in swapAnnotationsDirectoryItem() local
1135 CHECK_PTR_RANGE(item, item + 1); in swapAnnotationsDirectoryItem()
1136 SWAP_OFFSET4(item->classAnnotationsOff); in swapAnnotationsDirectoryItem()
1137 SWAP_FIELD4(item->fieldsSize); in swapAnnotationsDirectoryItem()
1138 SWAP_FIELD4(item->methodsSize); in swapAnnotationsDirectoryItem()
1139 SWAP_FIELD4(item->parametersSize); in swapAnnotationsDirectoryItem()
1141 u1* addr = (u1*) (item + 1); in swapAnnotationsDirectoryItem()
1143 if (item->fieldsSize != 0) { in swapAnnotationsDirectoryItem()
1144 addr = swapFieldAnnotations(state, item->fieldsSize, addr); in swapAnnotationsDirectoryItem()
1150 if (item->methodsSize != 0) { in swapAnnotationsDirectoryItem()
1151 addr = swapMethodAnnotations(state, item->methodsSize, addr); in swapAnnotationsDirectoryItem()
1157 if (item->parametersSize != 0) { in swapAnnotationsDirectoryItem()
1158 addr = swapParameterAnnotations(state, item->parametersSize, addr); in swapAnnotationsDirectoryItem()
1171 const DexFieldAnnotationsItem* item = (DexFieldAnnotationsItem*) addr; in crossVerifyFieldAnnotations() local
1174 if (!verifyFieldDefiner(state, definingClass, item->fieldIdx)) { in crossVerifyFieldAnnotations()
1177 if (!dexDataMapVerify(state->pDataMap, item->annotationsOff, in crossVerifyFieldAnnotations()
1181 item++; in crossVerifyFieldAnnotations()
1184 return (const u1*) item; in crossVerifyFieldAnnotations()
1191 const DexMethodAnnotationsItem* item = (DexMethodAnnotationsItem*) addr; in crossVerifyMethodAnnotations() local
1194 if (!verifyMethodDefiner(state, definingClass, item->methodIdx)) { in crossVerifyMethodAnnotations()
1197 if (!dexDataMapVerify(state->pDataMap, item->annotationsOff, in crossVerifyMethodAnnotations()
1201 item++; in crossVerifyMethodAnnotations()
1204 return (const u1*) item; in crossVerifyMethodAnnotations()
1211 const DexParameterAnnotationsItem* item = in crossVerifyParameterAnnotations() local
1215 if (!verifyMethodDefiner(state, definingClass, item->methodIdx)) { in crossVerifyParameterAnnotations()
1218 if (!dexDataMapVerify(state->pDataMap, item->annotationsOff, in crossVerifyParameterAnnotations()
1222 item++; in crossVerifyParameterAnnotations()
1225 return (const u1*) item; in crossVerifyParameterAnnotations()
1263 const DexAnnotationsDirectoryItem* item = (const DexAnnotationsDirectoryItem*) ptr; in crossVerifyAnnotationsDirectoryItem() local
1264 u4 definingClass = findFirstAnnotationsDirectoryDefiner(state, item); in crossVerifyAnnotationsDirectoryItem()
1267 item->classAnnotationsOff, kDexTypeAnnotationSetItem)) { in crossVerifyAnnotationsDirectoryItem()
1271 const u1* addr = (const u1*) (item + 1); in crossVerifyAnnotationsDirectoryItem()
1273 if (item->fieldsSize != 0) { in crossVerifyAnnotationsDirectoryItem()
1274 addr = crossVerifyFieldAnnotations(state, item->fieldsSize, addr, in crossVerifyAnnotationsDirectoryItem()
1281 if (item->methodsSize != 0) { in crossVerifyAnnotationsDirectoryItem()
1282 addr = crossVerifyMethodAnnotations(state, item->methodsSize, addr, in crossVerifyAnnotationsDirectoryItem()
1289 if (item->parametersSize != 0) { in crossVerifyAnnotationsDirectoryItem()
1290 addr = crossVerifyParameterAnnotations(state, item->parametersSize, in crossVerifyAnnotationsDirectoryItem()
1327 DexAnnotationSetRefItem* item; in swapAnnotationSetRefList() local
1333 item = list->list; in swapAnnotationSetRefList()
1336 CHECK_LIST_SIZE(item, count, sizeOfItem); in swapAnnotationSetRefList()
1339 SWAP_OFFSET4(item->annotationsOff); in swapAnnotationSetRefList()
1340 item++; in swapAnnotationSetRefList()
1343 return item; in swapAnnotationSetRefList()
1350 const DexAnnotationSetRefItem* item = list->list; in crossVerifyAnnotationSetRefList() local
1355 item->annotationsOff, kDexTypeAnnotationSetItem)) { in crossVerifyAnnotationSetRefList()
1358 item++; in crossVerifyAnnotationSetRefList()
1361 return (void*) item; in crossVerifyAnnotationSetRefList()
1368 u4* item; in swapAnnotationSetItem() local
1374 item = set->entries; in swapAnnotationSetItem()
1377 CHECK_LIST_SIZE(item, count, sizeOfItem); in swapAnnotationSetItem()
1380 SWAP_OFFSET4(*item); in swapAnnotationSetItem()
1381 item++; in swapAnnotationSetItem()
1384 return item; in swapAnnotationSetItem()
1389 static u4 annotationItemTypeIdx(const DexAnnotationItem* item) { in annotationItemTypeIdx() argument
1390 const u1* data = item->annotation; in annotationItemTypeIdx()
1798 DexCode* item = (DexCode*) ptr; in swapCodeItem() local
1802 CHECK_PTR_RANGE(item, item + 1); in swapCodeItem()
1803 SWAP_FIELD2(item->registersSize); in swapCodeItem()
1804 SWAP_FIELD2(item->insSize); in swapCodeItem()
1805 SWAP_FIELD2(item->outsSize); in swapCodeItem()
1806 SWAP_FIELD2(item->triesSize); in swapCodeItem()
1807 SWAP_OFFSET4(item->debugInfoOff); in swapCodeItem()
1808 SWAP_FIELD4(item->insnsSize); in swapCodeItem()
1810 if (item->insSize > item->registersSize) { in swapCodeItem()
1811 ALOGE("insSize (%u) > registersSize (%u)", item->insSize, in swapCodeItem()
1812 item->registersSize); in swapCodeItem()
1816 if ((item->outsSize > 5) && (item->outsSize > item->registersSize)) { in swapCodeItem()
1824 ALOGE("outsSize (%u) > registersSize (%u)", item->outsSize, in swapCodeItem()
1825 item->registersSize); in swapCodeItem()
1829 count = item->insnsSize; in swapCodeItem()
1830 insns = item->insns; in swapCodeItem()
1840 if (item->triesSize == 0) { in swapCodeItem()
1851 ptr = swapTriesAndCatches(state, item); in swapCodeItem()
2513 const DexMapItem* item = pMap->list; in swapEverythingButHeaderAndMap() local
2519 u4 sectionOffset = item->offset; in swapEverythingButHeaderAndMap()
2520 u4 sectionCount = item->size; in swapEverythingButHeaderAndMap()
2521 u2 type = item->type; in swapEverythingButHeaderAndMap()
2674 item++; in swapEverythingButHeaderAndMap()
2687 const DexMapItem* item = pMap->list; in crossVerifyEverything() local
2692 u4 sectionOffset = item->offset; in crossVerifyEverything()
2693 u4 sectionCount = item->size; in crossVerifyEverything()
2695 switch (item->type) { in crossVerifyEverything()
2766 ALOGE("Unknown map item type %04x", item->type); in crossVerifyEverything()
2773 item->type); in crossVerifyEverything()
2776 item++; in crossVerifyEverything()