Lines Matching refs:pDexFile

392 void dumpFileHeader(const DexFile* pDexFile)  in dumpFileHeader()  argument
394 const DexOptHeader* pOptHeader = pDexFile->pOptHeader; in dumpFileHeader()
395 const DexHeader* pHeader = pDexFile->pHeader; in dumpFileHeader()
459 void dumpOptDirectory(const DexFile* pDexFile) in dumpOptDirectory() argument
461 const DexOptHeader* pOptHeader = pDexFile->pOptHeader; in dumpOptDirectory()
508 void dumpClassDef(DexFile* pDexFile, int idx) in dumpClassDef() argument
514 pClassDef = dexGetClassDef(pDexFile, idx); in dumpClassDef()
515 pEncodedData = dexGetClassData(pDexFile, pClassDef); in dumpClassDef()
549 void dumpInterface(const DexFile* pDexFile, const DexTypeItem* pTypeItem, in dumpInterface() argument
553 dexStringByTypeIdx(pDexFile, pTypeItem->typeIdx); in dumpInterface()
567 void dumpCatches(DexFile* pDexFile, const DexCode* pCode) in dumpCatches() argument
600 dexStringByTypeIdx(pDexFile, handler->typeIdx); in dumpCatches()
617 void dumpPositions(DexFile* pDexFile, const DexCode* pCode, in dumpPositions() argument
622 = dexGetMethodId(pDexFile, pDexMethod->methodIdx); in dumpPositions()
624 = dexStringByTypeIdx(pDexFile, pMethodId->classIdx); in dumpPositions()
626 dexDecodeDebugInfo(pDexFile, pCode, classDescriptor, pMethodId->protoIdx, in dumpPositions()
642 void dumpLocals(DexFile* pDexFile, const DexCode* pCode, in dumpLocals() argument
648 = dexGetMethodId(pDexFile, pDexMethod->methodIdx); in dumpLocals()
650 = dexStringByTypeIdx(pDexFile, pMethodId->classIdx); in dumpLocals()
652 dexDecodeDebugInfo(pDexFile, pCode, classDescriptor, pMethodId->protoIdx, in dumpLocals()
659 bool getMethodInfo(DexFile* pDexFile, u4 methodIdx, FieldMethodInfo* pMethInfo) in getMethodInfo() argument
663 if (methodIdx >= pDexFile->pHeader->methodIdsSize) in getMethodInfo()
666 pMethodId = dexGetMethodId(pDexFile, methodIdx); in getMethodInfo()
667 pMethInfo->name = dexStringById(pDexFile, pMethodId->nameIdx); in getMethodInfo()
668 pMethInfo->signature = dexCopyDescriptorFromMethodId(pDexFile, pMethodId); in getMethodInfo()
671 dexStringByTypeIdx(pDexFile, pMethodId->classIdx); in getMethodInfo()
678 bool getFieldInfo(DexFile* pDexFile, u4 fieldIdx, FieldMethodInfo* pFieldInfo) in getFieldInfo() argument
682 if (fieldIdx >= pDexFile->pHeader->fieldIdsSize) in getFieldInfo()
685 pFieldId = dexGetFieldId(pDexFile, fieldIdx); in getFieldInfo()
686 pFieldInfo->name = dexStringById(pDexFile, pFieldId->nameIdx); in getFieldInfo()
687 pFieldInfo->signature = dexStringByTypeIdx(pDexFile, pFieldId->typeIdx); in getFieldInfo()
689 dexStringByTypeIdx(pDexFile, pFieldId->classIdx); in getFieldInfo()
697 const char* getClassDescriptor(DexFile* pDexFile, u4 classIdx) in getClassDescriptor() argument
699 return dexStringByTypeIdx(pDexFile, classIdx); in getClassDescriptor()
711 static char* indexString(DexFile* pDexFile, in indexString() argument
770 if (index < pDexFile->pHeader->typeIdsSize) { in indexString()
772 getClassDescriptor(pDexFile, index), width, index); in indexString()
778 if (index < pDexFile->pHeader->stringIdsSize) { in indexString()
780 dexStringById(pDexFile, index), width, index); in indexString()
789 if (getMethodInfo(pDexFile, index, &methInfo)) { in indexString()
803 if (getFieldInfo(pDexFile, index, &fieldInfo)) { in indexString()
840 return indexString(pDexFile, pDecInsn, buf, outSize); in indexString()
849 void dumpInstruction(DexFile* pDexFile, const DexCode* pCode, int insnIdx, in dumpInstruction() argument
857 printf("%06x:", ((u1*)insns - pDexFile->baseAddr) + insnIdx*2); in dumpInstruction()
891 indexBuf = indexString(pDexFile, pDecInsn, in dumpInstruction()
1057 void dumpBytecodes(DexFile* pDexFile, const DexMethod* pDexMethod) in dumpBytecodes() argument
1059 const DexCode* pCode = dexGetCode(pDexFile, pDexMethod); in dumpBytecodes()
1069 getMethodInfo(pDexFile, pDexMethod->methodIdx, &methInfo); in dumpBytecodes()
1070 startAddr = ((u1*)pCode - pDexFile->baseAddr); in dumpBytecodes()
1114 dumpInstruction(pDexFile, pCode, insnIdx, insnWidth, &decInsn); in dumpBytecodes()
1126 void dumpCode(DexFile* pDexFile, const DexMethod* pDexMethod) in dumpCode() argument
1128 const DexCode* pCode = dexGetCode(pDexFile, pDexMethod); in dumpCode()
1136 dumpBytecodes(pDexFile, pDexMethod); in dumpCode()
1138 dumpCatches(pDexFile, pCode); in dumpCode()
1140 dumpPositions(pDexFile, pCode, pDexMethod); in dumpCode()
1141 dumpLocals(pDexFile, pCode, pDexMethod); in dumpCode()
1147 void dumpMethod(DexFile* pDexFile, const DexMethod* pDexMethod, int i) in dumpMethod() argument
1161 pMethodId = dexGetMethodId(pDexFile, pDexMethod->methodIdx); in dumpMethod()
1162 name = dexStringById(pDexFile, pMethodId->nameIdx); in dumpMethod()
1163 typeDescriptor = dexCopyDescriptorFromMethodId(pDexFile, pMethodId); in dumpMethod()
1165 backDescriptor = dexStringByTypeIdx(pDexFile, pMethodId->classIdx); in dumpMethod()
1181 dumpCode(pDexFile, pDexMethod); in dumpMethod()
1290 void dumpSField(const DexFile* pDexFile, const DexField* pSField, int i) in dumpSField() argument
1304 pFieldId = dexGetFieldId(pDexFile, pSField->fieldIdx); in dumpSField()
1305 name = dexStringById(pDexFile, pFieldId->nameIdx); in dumpSField()
1306 typeDescriptor = dexStringByTypeIdx(pDexFile, pFieldId->typeIdx); in dumpSField()
1307 backDescriptor = dexStringByTypeIdx(pDexFile, pFieldId->classIdx); in dumpSField()
1347 void dumpIField(const DexFile* pDexFile, const DexField* pIField, int i) in dumpIField() argument
1349 dumpSField(pDexFile, pIField, i); in dumpIField()
1360 void dumpClass(DexFile* pDexFile, int idx, char** pLastPackage) in dumpClass() argument
1372 pClassDef = dexGetClassDef(pDexFile, idx); in dumpClass()
1380 pEncodedData = dexGetClassData(pDexFile, pClassDef); in dumpClass()
1388 classDescriptor = dexStringByTypeIdx(pDexFile, pClassDef->classIdx); in dumpClass()
1441 dexStringByTypeIdx(pDexFile, pClassDef->superclassIdx); in dumpClass()
1477 pInterfaces = dexGetInterfacesList(pDexFile, pClassDef); in dumpClass()
1480 dumpInterface(pDexFile, dexGetTypeItem(pInterfaces, i), i); in dumpClass()
1486 dumpSField(pDexFile, &pClassData->staticFields[i], i); in dumpClass()
1492 dumpIField(pDexFile, &pClassData->instanceFields[i], i); in dumpClass()
1498 dumpMethod(pDexFile, &pClassData->directMethods[i], i); in dumpClass()
1504 dumpMethod(pDexFile, &pClassData->virtualMethods[i], i); in dumpClass()
1510 fileName = dexStringById(pDexFile, pClassDef->sourceFileIdx); in dumpClass()
1583 void dumpMethodMap(DexFile* pDexFile, const DexMethod* pDexMethod, int idx, in dumpMethodMap() argument
1589 int offset = data - (u1*) pDexFile->pOptHeader; in dumpMethodMap()
1591 pMethodId = dexGetMethodId(pDexFile, pDexMethod->methodIdx); in dumpMethodMap()
1592 name = dexStringById(pDexFile, pMethodId->nameIdx); in dumpMethodMap()
1652 void dumpRegisterMaps(DexFile* pDexFile) in dumpRegisterMaps() argument
1654 const u1* pClassPool = (const u1*)pDexFile->pRegisterMapPool; in dumpRegisterMaps()
1658 int baseFileOffset = (u1*) pClassPool - (u1*) pDexFile->pOptHeader; in dumpRegisterMaps()
1677 pClassDef = dexGetClassDef(pDexFile, idx); in dumpRegisterMaps()
1678 classDescriptor = dexStringByTypeIdx(pDexFile, pClassDef->classIdx); in dumpRegisterMaps()
1696 pEncodedData = dexGetClassData(pDexFile, pClassDef); in dumpRegisterMaps()
1718 dumpMethodMap(pDexFile, &pClassData->directMethods[i], i, &data); in dumpRegisterMaps()
1724 dumpMethodMap(pDexFile, &pClassData->virtualMethods[i], i, &data); in dumpRegisterMaps()
1734 void processDexFile(const char* fileName, DexFile* pDexFile) in processDexFile() argument
1741 pDexFile->pHeader->magic +4); in processDexFile()
1745 dumpRegisterMaps(pDexFile); in processDexFile()
1750 dumpFileHeader(pDexFile); in processDexFile()
1751 dumpOptDirectory(pDexFile); in processDexFile()
1757 for (i = 0; i < (int) pDexFile->pHeader->classDefsSize; i++) { in processDexFile()
1759 dumpClassDef(pDexFile, i); in processDexFile()
1761 dumpClass(pDexFile, i, &package); in processDexFile()
1780 DexFile* pDexFile = NULL; in process() local
1797 pDexFile = dexFileParse((u1*)map.addr, map.length, flags); in process()
1798 if (pDexFile == NULL) { in process()
1806 processDexFile(fileName, pDexFile); in process()
1814 if (pDexFile != NULL) in process()
1815 dexFileFree(pDexFile); in process()