• Home
  • Raw
  • Download

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()
456 void dumpOptDirectory(const DexFile* pDexFile) in dumpOptDirectory() argument
458 const DexOptHeader* pOptHeader = pDexFile->pOptHeader; in dumpOptDirectory()
505 void dumpClassDef(DexFile* pDexFile, int idx) in dumpClassDef() argument
511 pClassDef = dexGetClassDef(pDexFile, idx); in dumpClassDef()
512 pEncodedData = dexGetClassData(pDexFile, pClassDef); in dumpClassDef()
546 void dumpInterface(const DexFile* pDexFile, const DexTypeItem* pTypeItem, in dumpInterface() argument
550 dexStringByTypeIdx(pDexFile, pTypeItem->typeIdx); in dumpInterface()
564 void dumpCatches(DexFile* pDexFile, const DexCode* pCode) in dumpCatches() argument
597 dexStringByTypeIdx(pDexFile, handler->typeIdx); in dumpCatches()
614 void dumpPositions(DexFile* pDexFile, const DexCode* pCode, in dumpPositions() argument
619 = dexGetMethodId(pDexFile, pDexMethod->methodIdx); in dumpPositions()
621 = dexStringByTypeIdx(pDexFile, pMethodId->classIdx); in dumpPositions()
623 dexDecodeDebugInfo(pDexFile, pCode, classDescriptor, pMethodId->protoIdx, in dumpPositions()
639 void dumpLocals(DexFile* pDexFile, const DexCode* pCode, in dumpLocals() argument
645 = dexGetMethodId(pDexFile, pDexMethod->methodIdx); in dumpLocals()
647 = dexStringByTypeIdx(pDexFile, pMethodId->classIdx); in dumpLocals()
649 dexDecodeDebugInfo(pDexFile, pCode, classDescriptor, pMethodId->protoIdx, in dumpLocals()
656 bool getMethodInfo(DexFile* pDexFile, u4 methodIdx, FieldMethodInfo* pMethInfo) in getMethodInfo() argument
660 if (methodIdx >= pDexFile->pHeader->methodIdsSize) in getMethodInfo()
663 pMethodId = dexGetMethodId(pDexFile, methodIdx); in getMethodInfo()
664 pMethInfo->name = dexStringById(pDexFile, pMethodId->nameIdx); in getMethodInfo()
665 pMethInfo->signature = dexCopyDescriptorFromMethodId(pDexFile, pMethodId); in getMethodInfo()
668 dexStringByTypeIdx(pDexFile, pMethodId->classIdx); in getMethodInfo()
675 bool getFieldInfo(DexFile* pDexFile, u4 fieldIdx, FieldMethodInfo* pFieldInfo) in getFieldInfo() argument
679 if (fieldIdx >= pDexFile->pHeader->fieldIdsSize) in getFieldInfo()
682 pFieldId = dexGetFieldId(pDexFile, fieldIdx); in getFieldInfo()
683 pFieldInfo->name = dexStringById(pDexFile, pFieldId->nameIdx); in getFieldInfo()
684 pFieldInfo->signature = dexStringByTypeIdx(pDexFile, pFieldId->typeIdx); in getFieldInfo()
686 dexStringByTypeIdx(pDexFile, pFieldId->classIdx); in getFieldInfo()
694 const char* getClassDescriptor(DexFile* pDexFile, u4 classIdx) in getClassDescriptor() argument
696 return dexStringByTypeIdx(pDexFile, classIdx); in getClassDescriptor()
708 static char* indexString(DexFile* pDexFile, in indexString() argument
768 getClassDescriptor(pDexFile, index), width, index); in indexString()
772 dexStringById(pDexFile, index), width, index); in indexString()
777 if (getMethodInfo(pDexFile, index, &methInfo)) { in indexString()
790 if (getFieldInfo(pDexFile, index, &fieldInfo)) { in indexString()
827 return indexString(pDexFile, pDecInsn, buf, outSize); in indexString()
836 void dumpInstruction(DexFile* pDexFile, const DexCode* pCode, int insnIdx, in dumpInstruction() argument
844 printf("%06x:", ((u1*)insns - pDexFile->baseAddr) + insnIdx*2); in dumpInstruction()
878 indexBuf = indexString(pDexFile, pDecInsn, in dumpInstruction()
1044 void dumpBytecodes(DexFile* pDexFile, const DexMethod* pDexMethod) in dumpBytecodes() argument
1046 const DexCode* pCode = dexGetCode(pDexFile, pDexMethod); in dumpBytecodes()
1056 getMethodInfo(pDexFile, pDexMethod->methodIdx, &methInfo); in dumpBytecodes()
1057 startAddr = ((u1*)pCode - pDexFile->baseAddr); in dumpBytecodes()
1100 dumpInstruction(pDexFile, pCode, insnIdx, insnWidth, &decInsn); in dumpBytecodes()
1112 void dumpCode(DexFile* pDexFile, const DexMethod* pDexMethod) in dumpCode() argument
1114 const DexCode* pCode = dexGetCode(pDexFile, pDexMethod); in dumpCode()
1122 dumpBytecodes(pDexFile, pDexMethod); in dumpCode()
1124 dumpCatches(pDexFile, pCode); in dumpCode()
1126 dumpPositions(pDexFile, pCode, pDexMethod); in dumpCode()
1127 dumpLocals(pDexFile, pCode, pDexMethod); in dumpCode()
1133 void dumpMethod(DexFile* pDexFile, const DexMethod* pDexMethod, int i) in dumpMethod() argument
1147 pMethodId = dexGetMethodId(pDexFile, pDexMethod->methodIdx); in dumpMethod()
1148 name = dexStringById(pDexFile, pMethodId->nameIdx); in dumpMethod()
1149 typeDescriptor = dexCopyDescriptorFromMethodId(pDexFile, pMethodId); in dumpMethod()
1151 backDescriptor = dexStringByTypeIdx(pDexFile, pMethodId->classIdx); in dumpMethod()
1167 dumpCode(pDexFile, pDexMethod); in dumpMethod()
1276 void dumpSField(const DexFile* pDexFile, const DexField* pSField, int i) in dumpSField() argument
1290 pFieldId = dexGetFieldId(pDexFile, pSField->fieldIdx); in dumpSField()
1291 name = dexStringById(pDexFile, pFieldId->nameIdx); in dumpSField()
1292 typeDescriptor = dexStringByTypeIdx(pDexFile, pFieldId->typeIdx); in dumpSField()
1293 backDescriptor = dexStringByTypeIdx(pDexFile, pFieldId->classIdx); in dumpSField()
1333 void dumpIField(const DexFile* pDexFile, const DexField* pIField, int i) in dumpIField() argument
1335 dumpSField(pDexFile, pIField, i); in dumpIField()
1346 void dumpClass(DexFile* pDexFile, int idx, char** pLastPackage) in dumpClass() argument
1358 pClassDef = dexGetClassDef(pDexFile, idx); in dumpClass()
1366 pEncodedData = dexGetClassData(pDexFile, pClassDef); in dumpClass()
1374 classDescriptor = dexStringByTypeIdx(pDexFile, pClassDef->classIdx); in dumpClass()
1427 dexStringByTypeIdx(pDexFile, pClassDef->superclassIdx); in dumpClass()
1463 pInterfaces = dexGetInterfacesList(pDexFile, pClassDef); in dumpClass()
1466 dumpInterface(pDexFile, dexGetTypeItem(pInterfaces, i), i); in dumpClass()
1472 dumpSField(pDexFile, &pClassData->staticFields[i], i); in dumpClass()
1478 dumpIField(pDexFile, &pClassData->instanceFields[i], i); in dumpClass()
1484 dumpMethod(pDexFile, &pClassData->directMethods[i], i); in dumpClass()
1490 dumpMethod(pDexFile, &pClassData->virtualMethods[i], i); in dumpClass()
1496 fileName = dexStringById(pDexFile, pClassDef->sourceFileIdx); in dumpClass()
1569 void dumpMethodMap(DexFile* pDexFile, const DexMethod* pDexMethod, int idx, in dumpMethodMap() argument
1575 int offset = data - (u1*) pDexFile->pOptHeader; in dumpMethodMap()
1577 pMethodId = dexGetMethodId(pDexFile, pDexMethod->methodIdx); in dumpMethodMap()
1578 name = dexStringById(pDexFile, pMethodId->nameIdx); in dumpMethodMap()
1638 void dumpRegisterMaps(DexFile* pDexFile) in dumpRegisterMaps() argument
1640 const u1* pClassPool = (const u1*)pDexFile->pRegisterMapPool; in dumpRegisterMaps()
1644 int baseFileOffset = (u1*) pClassPool - (u1*) pDexFile->pOptHeader; in dumpRegisterMaps()
1663 pClassDef = dexGetClassDef(pDexFile, idx); in dumpRegisterMaps()
1664 classDescriptor = dexStringByTypeIdx(pDexFile, pClassDef->classIdx); in dumpRegisterMaps()
1682 pEncodedData = dexGetClassData(pDexFile, pClassDef); in dumpRegisterMaps()
1704 dumpMethodMap(pDexFile, &pClassData->directMethods[i], i, &data); in dumpRegisterMaps()
1710 dumpMethodMap(pDexFile, &pClassData->virtualMethods[i], i, &data); in dumpRegisterMaps()
1720 void processDexFile(const char* fileName, DexFile* pDexFile) in processDexFile() argument
1727 pDexFile->pHeader->magic +4); in processDexFile()
1731 dumpRegisterMaps(pDexFile); in processDexFile()
1736 dumpFileHeader(pDexFile); in processDexFile()
1737 dumpOptDirectory(pDexFile); in processDexFile()
1743 for (i = 0; i < (int) pDexFile->pHeader->classDefsSize; i++) { in processDexFile()
1745 dumpClassDef(pDexFile, i); in processDexFile()
1747 dumpClass(pDexFile, i, &package); in processDexFile()
1766 DexFile* pDexFile = NULL; in process() local
1783 pDexFile = dexFileParse((u1*)map.addr, map.length, flags); in process()
1784 if (pDexFile == NULL) { in process()
1792 processDexFile(fileName, pDexFile); in process()
1800 if (pDexFile != NULL) in process()
1801 dexFileFree(pDexFile); in process()