Lines Matching refs:item

371     DexMapItem* item = pMap->list;  in swapMap()  local
382 CHECK_LIST_SIZE(item, count, sizeof(DexMapItem)); 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
1047 CHECK_LIST_SIZE(item, count, sizeof(DexFieldAnnotationsItem)); in swapFieldAnnotations()
1050 SWAP_INDEX4(item->fieldIdx, state->pHeader->fieldIdsSize); in swapFieldAnnotations()
1051 SWAP_OFFSET4(item->annotationsOff); in swapFieldAnnotations()
1055 } else if (lastIdx >= item->fieldIdx) { in swapFieldAnnotations()
1057 item->fieldIdx); in swapFieldAnnotations()
1061 lastIdx = item->fieldIdx; in swapFieldAnnotations()
1062 item++; in swapFieldAnnotations()
1065 return (u1*) item; in swapFieldAnnotations()
1072 DexMethodAnnotationsItem* item = (DexMethodAnnotationsItem*) addr; in swapMethodAnnotations() local
1076 CHECK_LIST_SIZE(item, count, sizeof(DexMethodAnnotationsItem)); in swapMethodAnnotations()
1079 SWAP_INDEX4(item->methodIdx, state->pHeader->methodIdsSize); in swapMethodAnnotations()
1080 SWAP_OFFSET4(item->annotationsOff); in swapMethodAnnotations()
1084 } else if (lastIdx >= item->methodIdx) { in swapMethodAnnotations()
1086 item->methodIdx); in swapMethodAnnotations()
1090 lastIdx = item->methodIdx; in swapMethodAnnotations()
1091 item++; in swapMethodAnnotations()
1094 return (u1*) item; in swapMethodAnnotations()
1102 DexParameterAnnotationsItem* item = (DexParameterAnnotationsItem*) addr; in swapParameterAnnotations() local
1106 CHECK_LIST_SIZE(item, count, sizeof(DexParameterAnnotationsItem)); in swapParameterAnnotations()
1109 SWAP_INDEX4(item->methodIdx, state->pHeader->methodIdsSize); in swapParameterAnnotations()
1110 SWAP_OFFSET4(item->annotationsOff); in swapParameterAnnotations()
1114 } else if (lastIdx >= item->methodIdx) { in swapParameterAnnotations()
1116 item->methodIdx); in swapParameterAnnotations()
1120 lastIdx = item->methodIdx; in swapParameterAnnotations()
1121 item++; in swapParameterAnnotations()
1124 return (u1*) item; in swapParameterAnnotations()
1130 DexAnnotationsDirectoryItem* item = (DexAnnotationsDirectoryItem*) ptr; in swapAnnotationsDirectoryItem() local
1132 CHECK_PTR_RANGE(item, item + 1); in swapAnnotationsDirectoryItem()
1133 SWAP_OFFSET4(item->classAnnotationsOff); in swapAnnotationsDirectoryItem()
1134 SWAP_FIELD4(item->fieldsSize); in swapAnnotationsDirectoryItem()
1135 SWAP_FIELD4(item->methodsSize); in swapAnnotationsDirectoryItem()
1136 SWAP_FIELD4(item->parametersSize); in swapAnnotationsDirectoryItem()
1138 u1* addr = (u1*) (item + 1); in swapAnnotationsDirectoryItem()
1140 if (item->fieldsSize != 0) { in swapAnnotationsDirectoryItem()
1141 addr = swapFieldAnnotations(state, item->fieldsSize, addr); in swapAnnotationsDirectoryItem()
1147 if (item->methodsSize != 0) { in swapAnnotationsDirectoryItem()
1148 addr = swapMethodAnnotations(state, item->methodsSize, addr); in swapAnnotationsDirectoryItem()
1154 if (item->parametersSize != 0) { in swapAnnotationsDirectoryItem()
1155 addr = swapParameterAnnotations(state, item->parametersSize, addr); in swapAnnotationsDirectoryItem()
1168 const DexFieldAnnotationsItem* item = (DexFieldAnnotationsItem*) addr; in crossVerifyFieldAnnotations() local
1171 if (!verifyFieldDefiner(state, definingClass, item->fieldIdx)) { in crossVerifyFieldAnnotations()
1174 if (!dexDataMapVerify(state->pDataMap, item->annotationsOff, in crossVerifyFieldAnnotations()
1178 item++; in crossVerifyFieldAnnotations()
1181 return (const u1*) item; in crossVerifyFieldAnnotations()
1188 const DexMethodAnnotationsItem* item = (DexMethodAnnotationsItem*) addr; in crossVerifyMethodAnnotations() local
1191 if (!verifyMethodDefiner(state, definingClass, item->methodIdx)) { in crossVerifyMethodAnnotations()
1194 if (!dexDataMapVerify(state->pDataMap, item->annotationsOff, in crossVerifyMethodAnnotations()
1198 item++; in crossVerifyMethodAnnotations()
1201 return (const u1*) item; in crossVerifyMethodAnnotations()
1208 const DexParameterAnnotationsItem* item = in crossVerifyParameterAnnotations() local
1212 if (!verifyMethodDefiner(state, definingClass, item->methodIdx)) { in crossVerifyParameterAnnotations()
1215 if (!dexDataMapVerify(state->pDataMap, item->annotationsOff, in crossVerifyParameterAnnotations()
1219 item++; in crossVerifyParameterAnnotations()
1222 return (const u1*) item; in crossVerifyParameterAnnotations()
1260 const DexAnnotationsDirectoryItem* item = (const DexAnnotationsDirectoryItem*) ptr; in crossVerifyAnnotationsDirectoryItem() local
1261 u4 definingClass = findFirstAnnotationsDirectoryDefiner(state, item); in crossVerifyAnnotationsDirectoryItem()
1264 item->classAnnotationsOff, kDexTypeAnnotationSetItem)) { in crossVerifyAnnotationsDirectoryItem()
1268 const u1* addr = (const u1*) (item + 1); in crossVerifyAnnotationsDirectoryItem()
1270 if (item->fieldsSize != 0) { in crossVerifyAnnotationsDirectoryItem()
1271 addr = crossVerifyFieldAnnotations(state, item->fieldsSize, addr, in crossVerifyAnnotationsDirectoryItem()
1278 if (item->methodsSize != 0) { in crossVerifyAnnotationsDirectoryItem()
1279 addr = crossVerifyMethodAnnotations(state, item->methodsSize, addr, in crossVerifyAnnotationsDirectoryItem()
1286 if (item->parametersSize != 0) { in crossVerifyAnnotationsDirectoryItem()
1287 addr = crossVerifyParameterAnnotations(state, item->parametersSize, in crossVerifyAnnotationsDirectoryItem()
1322 DexAnnotationSetRefItem* item; in swapAnnotationSetRefList() local
1328 item = list->list; in swapAnnotationSetRefList()
1329 CHECK_LIST_SIZE(item, count, sizeof(DexAnnotationSetRefItem)); in swapAnnotationSetRefList()
1332 SWAP_OFFSET4(item->annotationsOff); in swapAnnotationSetRefList()
1333 item++; in swapAnnotationSetRefList()
1336 return item; in swapAnnotationSetRefList()
1343 const DexAnnotationSetRefItem* item = list->list; in crossVerifyAnnotationSetRefList() local
1348 item->annotationsOff, kDexTypeAnnotationSetItem)) { in crossVerifyAnnotationSetRefList()
1351 item++; in crossVerifyAnnotationSetRefList()
1354 return (void*) item; in crossVerifyAnnotationSetRefList()
1361 u4* item; in swapAnnotationSetItem() local
1367 item = set->entries; in swapAnnotationSetItem()
1368 CHECK_LIST_SIZE(item, count, sizeof(u4)); in swapAnnotationSetItem()
1371 SWAP_OFFSET4(*item); in swapAnnotationSetItem()
1372 item++; in swapAnnotationSetItem()
1375 return item; in swapAnnotationSetItem()
1380 static u4 annotationItemTypeIdx(const DexAnnotationItem* item) { in annotationItemTypeIdx() argument
1381 const u1* data = item->annotation; in annotationItemTypeIdx()
1788 DexCode* item = (DexCode*) ptr; in swapCodeItem() local
1792 CHECK_PTR_RANGE(item, item + 1); in swapCodeItem()
1793 SWAP_FIELD2(item->registersSize); in swapCodeItem()
1794 SWAP_FIELD2(item->insSize); in swapCodeItem()
1795 SWAP_FIELD2(item->outsSize); in swapCodeItem()
1796 SWAP_FIELD2(item->triesSize); in swapCodeItem()
1797 SWAP_OFFSET4(item->debugInfoOff); in swapCodeItem()
1798 SWAP_FIELD4(item->insnsSize); in swapCodeItem()
1800 if (item->insSize > item->registersSize) { in swapCodeItem()
1801 ALOGE("insSize (%u) > registersSize (%u)", item->insSize, in swapCodeItem()
1802 item->registersSize); in swapCodeItem()
1806 if ((item->outsSize > 5) && (item->outsSize > item->registersSize)) { in swapCodeItem()
1814 ALOGE("outsSize (%u) > registersSize (%u)", item->outsSize, in swapCodeItem()
1815 item->registersSize); in swapCodeItem()
1819 count = item->insnsSize; in swapCodeItem()
1820 insns = item->insns; in swapCodeItem()
1828 if (item->triesSize == 0) { in swapCodeItem()
1839 ptr = swapTriesAndCatches(state, item); in swapCodeItem()
2501 const DexMapItem* item = pMap->list; in swapEverythingButHeaderAndMap() local
2507 u4 sectionOffset = item->offset; in swapEverythingButHeaderAndMap()
2508 u4 sectionCount = item->size; in swapEverythingButHeaderAndMap()
2509 u2 type = item->type; in swapEverythingButHeaderAndMap()
2662 item++; in swapEverythingButHeaderAndMap()
2675 const DexMapItem* item = pMap->list; in crossVerifyEverything() local
2680 u4 sectionOffset = item->offset; in crossVerifyEverything()
2681 u4 sectionCount = item->size; in crossVerifyEverything()
2683 switch (item->type) { in crossVerifyEverything()
2754 ALOGE("Unknown map item type %04x", item->type); in crossVerifyEverything()
2761 item->type); in crossVerifyEverything()
2764 item++; in crossVerifyEverything()