Home
last modified time | relevance | path

Searched refs:dex_file (Results 1 – 25 of 304) sorted by relevance

12345678910>>...13

/art/libdexfile/dex/
Ddex_file_verifier_test.cc43 static void MakeDexVersion37(DexFile* dex_file) { in MakeDexVersion37() argument
45 CHECK_EQ(*(dex_file->Begin() + offset), '5'); in MakeDexVersion37()
46 *(const_cast<uint8_t*>(dex_file->Begin()) + offset) = '7'; in MakeDexVersion37()
49 static void FixUpChecksum(uint8_t* dex_file) { in FixUpChecksum() argument
50 DexFile::Header* header = reinterpret_cast<DexFile::Header*>(dex_file); in FixUpChecksum()
54 const uint8_t* non_sum_ptr = dex_file + non_sum; in FixUpChecksum()
73 std::unique_ptr<DexFile> dex_file(GetDexFile(dex_bytes.get(), length)); in VerifyModification() local
74 f(dex_file.get()); in VerifyModification()
75 FixUpChecksum(const_cast<uint8_t*>(dex_file->Begin())); in VerifyModification()
79 bool success = dex::Verify(dex_file.get(), in VerifyModification()
[all …]
Dtest_dex_file_builder_test.cc32 std::unique_ptr<const DexFile> dex_file(builder.Build(dex_location)); in TEST() local
33 ASSERT_TRUE(dex_file != nullptr); in TEST()
34 EXPECT_STREQ(dex_location, dex_file->GetLocation().c_str()); in TEST()
49 ASSERT_EQ(arraysize(expected_strings), dex_file->NumStringIds()); in TEST()
52 dex_file->GetStringData(dex_file->GetStringId(dex::StringIndex(i)))) << i; in TEST()
63 ASSERT_EQ(arraysize(expected_types), dex_file->NumTypeIds()); in TEST()
66 dex_file->GetTypeDescriptor(dex_file->GetTypeId(dex::TypeIndex(i)))) << i; in TEST()
69 ASSERT_EQ(1u, dex_file->NumFieldIds()); in TEST()
70 EXPECT_STREQ("[I TestClass.intField", dex_file->PrettyField(0u).c_str()); in TEST()
72 ASSERT_EQ(2u, dex_file->NumProtoIds()); in TEST()
[all …]
Dmethod_reference.h32 return dex_file->PrettyMethod(index, with_signature);
35 return dex_file->GetMethodId(index); in GetMethodId()
42 if (mr1.dex_file == mr2.dex_file) { in operator()
55 int descriptor_diff = strcmp(mr1.dex_file->StringByTypeIdx(mid1.class_idx_), in SlowCompare()
56 mr2.dex_file->StringByTypeIdx(mid2.class_idx_)); in SlowCompare()
61 int name_diff = strcmp(mr1.dex_file->GetMethodName(mid1), mr2.dex_file->GetMethodName(mid2)); in SlowCompare()
66 const dex::ProtoId& prid1 = mr1.dex_file->GetProtoId(mid1.proto_idx_); in SlowCompare()
67 const dex::ProtoId& prid2 = mr2.dex_file->GetProtoId(mid2.proto_idx_); in SlowCompare()
68 int return_type_diff = strcmp(mr1.dex_file->StringByTypeIdx(prid1.return_type_idx_), in SlowCompare()
69 mr2.dex_file->StringByTypeIdx(prid2.return_type_idx_)); in SlowCompare()
[all …]
Ddex_file_reference.h28 DexFileReference(const DexFile* file, uint32_t idx) : dex_file(file), index(idx) {} in DexFileReference()
29 const DexFile* dex_file; variable
34 if (a.dex_file != b.dex_file) { in operator()
35 return a.dex_file < b.dex_file; in operator()
47 return a.dex_file == b.dex_file && a.index == b.index;
Ddex_file_layout.cc50 void DexLayoutSection::Subsection::Madvise(const DexFile* dex_file, int advice) const { in Madvise() argument
51 DCHECK(dex_file != nullptr); in Madvise()
52 DCHECK_LT(start_offset_, dex_file->Size()); in Madvise()
53 DCHECK_LE(end_offset_, dex_file->Size()); in Madvise()
54 MadviseLargestPageAlignedRegion(dex_file->Begin() + start_offset_, in Madvise()
55 dex_file->Begin() + end_offset_, in Madvise()
59 void DexLayoutSections::Madvise(const DexFile* dex_file, MadviseState state) const { in Madvise() argument
61 UNUSED(dex_file); in Madvise()
70 dex_file, in Madvise()
73 dex_file, in Madvise()
[all …]
Dtype_reference.h34 TypeReference(const DexFile* dex_file, dex::TypeIndex index) in TypeReference() argument
35 : DexFileReference(dex_file, index.index_) {} in TypeReference()
47 StringReference sr1(tr1.dex_file, tr1.dex_file->GetTypeId(tr1.TypeIndex()).descriptor_idx_); in operator()
48 StringReference sr2(tr2.dex_file, tr2.dex_file->GetTypeId(tr2.TypeIndex()).descriptor_idx_); in operator()
Dcode_item_accessors-inl.h56 inline void CodeItemInstructionAccessor::Init(const DexFile& dex_file, in Init() argument
59 DCHECK(dex_file.IsInDataSection(code_item)); in Init()
60 if (dex_file.IsCompactDexFile()) { in Init()
63 DCHECK(dex_file.IsStandardDexFile()); in Init()
70 const DexFile& dex_file, in CodeItemInstructionAccessor() argument
72 Init(dex_file, code_item); in CodeItemInstructionAccessor()
113 inline void CodeItemDataAccessor::Init(const DexFile& dex_file, in Init() argument
116 if (dex_file.IsCompactDexFile()) { in Init()
119 DCHECK(dex_file.IsStandardDexFile()); in Init()
125 inline CodeItemDataAccessor::CodeItemDataAccessor(const DexFile& dex_file, in CodeItemDataAccessor() argument
[all …]
Dstring_reference.h42 return dex_file->GetStringData(dex_file->GetStringId(StringIndex())); in GetStringData()
54 if (sr1.dex_file == sr2.dex_file) { in operator()
Dtype_lookup_table.cc33 TypeLookupTable TypeLookupTable::Create(const DexFile& dex_file) { in Create() argument
34 uint32_t num_class_defs = dex_file.NumClassDefs(); in Create()
49 for (size_t class_def_idx = 0; class_def_idx < dex_file.NumClassDefs(); ++class_def_idx) { in Create()
50 const dex::ClassDef& class_def = dex_file.GetClassDef(class_def_idx); in Create()
51 const dex::TypeId& type_id = dex_file.GetTypeId(class_def.class_idx_); in Create()
52 const dex::StringId& str_id = dex_file.GetStringId(type_id.descriptor_idx_); in Create()
53 const uint32_t hash = ComputeModifiedUtf8Hash(dex_file.GetStringData(str_id)); in Create()
65 const dex::ClassDef& class_def = dex_file.GetClassDef(class_def_idx); in Create()
66 const dex::TypeId& type_id = dex_file.GetTypeId(class_def.class_idx_); in Create()
67 const dex::StringId& str_id = dex_file.GetStringId(type_id.descriptor_idx_); in Create()
[all …]
/art/tools/hiddenapi/
Dhiddenapi_test.cc118 std::unique_ptr<const DexFile> dex_file(dex_loader.OpenDex( in OpenDex() local
121 if (dex_file.get() == nullptr) { in OpenDex()
124 } else if (!dex_file->IsStandardDexFile()) { in OpenDex()
129 return dex_file; in OpenDex()
166 const dex::ClassDef& FindClass(const char* desc, const DexFile& dex_file) { in FindClass() argument
167 const dex::TypeId* type_id = dex_file.FindTypeId(desc); in FindClass()
169 const dex::ClassDef* found = dex_file.FindClassDef(dex_file.GetIndexForTypeId(*type_id)); in FindClass()
177 const DexFile& dex_file) { in GetFieldHiddenFlags() argument
178 ClassAccessor accessor(dex_file, class_def, /* parse hiddenapi flags */ true); in GetFieldHiddenFlags()
186 const dex::FieldId& fid = dex_file.GetFieldId(field.GetIndex()); in GetFieldHiddenFlags()
[all …]
/art/runtime/verifier/
Dverifier_deps.cc41 for (const DexFile* dex_file : dex_files) { in VerifierDeps() local
42 DCHECK(GetDexFileDeps(*dex_file) == nullptr); in VerifierDeps()
43 std::unique_ptr<DexFileDeps> deps(new DexFileDeps(dex_file->NumClassDefs())); in VerifierDeps()
44 dex_deps_.emplace(dex_file, std::move(deps)); in VerifierDeps()
64 for (const DexFile* dex_file : dex_files) { in MergeWith() local
65 DexFileDeps* my_deps = GetDexFileDeps(*dex_file); in MergeWith()
66 DexFileDeps& other_deps = *other->GetDexFileDeps(*dex_file); in MergeWith()
80 VerifierDeps::DexFileDeps* VerifierDeps::GetDexFileDeps(const DexFile& dex_file) { in GetDexFileDeps() argument
81 auto it = dex_deps_.find(&dex_file); in GetDexFileDeps()
85 const VerifierDeps::DexFileDeps* VerifierDeps::GetDexFileDeps(const DexFile& dex_file) const { in GetDexFileDeps()
[all …]
Dverifier_deps.h73 void RecordClassVerified(const DexFile& dex_file, const dex::ClassDef& class_def)
77 static void MaybeRecordVerificationStatus(const DexFile& dex_file,
84 static void MaybeRecordClassRedefinition(const DexFile& dex_file, const dex::ClassDef& class_def)
89 static void MaybeRecordClassResolution(const DexFile& dex_file,
97 static void MaybeRecordFieldResolution(const DexFile& dex_file,
105 static void MaybeRecordMethodResolution(const DexFile& dex_file,
114 static void MaybeRecordAssignability(const DexFile& dex_file,
136 const std::vector<bool>& GetVerifiedClasses(const DexFile& dex_file) const { in GetVerifiedClasses() argument
137 return GetDexFileDeps(dex_file)->verified_classes_; in GetVerifiedClasses()
140 const std::vector<bool>& GetRedefinedClasses(const DexFile& dex_file) const { in GetRedefinedClasses() argument
[all …]
/art/libdexfile/external/
Ddex_file_supp_test.cc128 std::unique_ptr<DexFile> dex_file = DexFile::OpenFromMemory(kDexData, &size, "", &error_msg); in GetTestDexData() local
130 return dex_file; in GetTestDexData()
185 std::unique_ptr<DexFile> dex_file = GetTestDexData(); in TEST() local
186 ASSERT_NE(dex_file, nullptr); in TEST()
188 MethodInfo info = dex_file->GetMethodInfoForOffset(0x102, false); in TEST()
193 info = dex_file->GetMethodInfoForOffset(0x118, false); in TEST()
199 info = dex_file->GetMethodInfoForOffset(0x104, false); in TEST()
206 std::unique_ptr<DexFile> dex_file = GetTestDexData(); in TEST() local
207 ASSERT_NE(dex_file, nullptr); in TEST()
209 MethodInfo info = dex_file->GetMethodInfoForOffset(0x102, true); in TEST()
[all …]
/art/dexlayout/
Ddex_ir_builder.cc145 void CreateStringId(const DexFile& dex_file, uint32_t i);
146 void CreateTypeId(const DexFile& dex_file, uint32_t i);
147 void CreateProtoId(const DexFile& dex_file, uint32_t i);
148 void CreateFieldId(const DexFile& dex_file, uint32_t i);
149 void CreateMethodId(const DexFile& dex_file, uint32_t i);
150 void CreateClassDef(const DexFile& dex_file, uint32_t i);
151 void CreateCallSiteId(const DexFile& dex_file, uint32_t i);
152 void CreateMethodHandleItem(const DexFile& dex_file, uint32_t i);
154 void CreateCallSitesAndMethodHandles(const DexFile& dex_file);
157 EncodedArrayItem* CreateEncodedArrayItem(const DexFile& dex_file,
[all …]
Ddexlayout_test.cc269 for (const std::string& dex_file : GetLibCoreDexFileNames()) { in FullPlainOutputExec() local
271 { dexdump, "-d", "-f", "-h", "-l", "plain", "-o", dexdump_filename, dex_file }; in FullPlainOutputExec()
273 { "-d", "-f", "-h", "-l", "plain", "-o", dexlayout_filename, dex_file }; in FullPlainOutputExec()
297 for (const std::string& dex_file : GetLibCoreDexFileNames()) { in DexFileOutputExec() local
299 { "-w", tmp_dir, "-o", tmp_name, dex_file }; in DexFileOutputExec()
305 { "/usr/bin/unzip", dex_file, "classes.dex", "-d", unzip_dir}; in DexFileOutputExec()
345 for (const std::unique_ptr<const DexFile>& dex_file : dex_files) { in CreateProfile() local
346 for (uint32_t i = 0; i < dex_file->NumMethodIds(); i += 2) { in CreateProfile()
356 pfi.AddMethod(ProfileMethodInfo(MethodReference(dex_file.get(), /*index=*/ i)), in CreateProfile()
361 for (uint32_t i = 0; i < dex_file->NumClassDefs(); i += 1) { in CreateProfile()
[all …]
/art/compiler/utils/
Datomic_dex_ref_map-inl.h33 const DexFile* dex_file) { in NumberOfDexIndices() argument
40 return dex_file->NumMethodIds(); in NumberOfDexIndices()
43 return dex_file->NumClassDefs(); in NumberOfDexIndices()
46 return dex_file->NumTypeIds(); in NumberOfDexIndices()
56 ElementArray* const array = GetArray(ref.dex_file); in Insert()
69 const ElementArray* const array = GetArray(ref.dex_file); in Get()
80 ElementArray* const array = GetArray(ref.dex_file); in Remove()
89 inline void AtomicDexRefMap<DexFileReferenceType, Value>::AddDexFile(const DexFile* dex_file) { in AddDexFile() argument
90 arrays_.Put(dex_file, std::move(ElementArray(NumberOfDexIndices(dex_file)))); in AddDexFile()
96 for (const DexFile* dex_file : dex_files) { in AddDexFiles() local
[all …]
Datomic_dex_ref_map.h54 void AddDexFile(const DexFile* dex_file);
60 bool HaveDexFile(const DexFile* dex_file) const { in HaveDexFile() argument
61 return arrays_.find(dex_file) != arrays_.end(); in HaveDexFile()
75 const ElementArray* GetArray(const DexFile* dex_file) const;
76 ElementArray* GetArray(const DexFile* dex_file);
78 static size_t NumberOfDexIndices(const DexFile* dex_file);
/art/runtime/
Dimtable-inl.h48 const DexFile* dex_file = method->GetDexFile(); in GetImtHashComponents() local
49 const dex::MethodId& method_id = dex_file->GetMethodId(method->GetDexMethodIndex()); in GetImtHashComponents()
52 *class_hash = ComputeModifiedUtf8Hash(dex_file->GetMethodDeclaringClassDescriptor(method_id)); in GetImtHashComponents()
55 *name_hash = ComputeModifiedUtf8Hash(dex_file->GetMethodName(method_id)); in GetImtHashComponents()
57 const dex::ProtoId& proto_id = dex_file->GetMethodPrototype(method_id); in GetImtHashComponents()
61 dex_file->GetTypeDescriptor(dex_file->GetTypeId(proto_id.return_type_idx_))); in GetImtHashComponents()
66 const dex::TypeList* param_types = dex_file->GetProtoParameters(proto_id); in GetImtHashComponents()
71 dex_file->GetTypeDescriptor(dex_file->GetTypeId(type.type_idx_))); in GetImtHashComponents()
Dart_method-inl.h172 const DexFile* dex_file = GetDexFile(); in GetDeclaringClassDescriptor() local
173 return dex_file->GetMethodDeclaringClassDescriptor(dex_file->GetMethodId(dex_method_idx)); in GetDeclaringClassDescriptor()
183 const DexFile* dex_file = GetDexFile(); in GetShorty() local
184 return dex_file->GetMethodShorty(dex_file->GetMethodId(GetDexMethodIndex()), out_length); in GetShorty()
191 const DexFile* dex_file = GetDexFile(); in GetSignature() local
192 return dex_file->GetMethodSignature(dex_file->GetMethodId(dex_method_idx)); in GetSignature()
201 const DexFile* dex_file = GetDexFile(); in GetName() local
202 return dex_file->GetMethodName(dex_file->GetMethodId(dex_method_idx)); in GetName()
211 const DexFile* dex_file = GetDexFile(); in GetNameView() local
213 const char* name = dex_file->GetMethodName(dex_file->GetMethodId(dex_method_idx), &length); in GetNameView()
[all …]
/art/runtime/mirror/
Ddex_cache.cc42 const DexFile* dex_file, in InitializeDexCache() argument
45 DCHECK(dex_file != nullptr); in InitializeDexCache()
47 DexCacheArraysLayout layout(image_pointer_size, dex_file); in InitializeDexCache()
50 if (dex_file->NumStringIds() != 0u || in InitializeDexCache()
51 dex_file->NumTypeIds() != 0u || in InitializeDexCache()
52 dex_file->NumMethodIds() != 0u || in InitializeDexCache()
53 dex_file->NumFieldIds() != 0u) { in InitializeDexCache()
62 StringDexCacheType* strings = (dex_file->NumStringIds() == 0u) ? nullptr : in InitializeDexCache()
64 TypeDexCacheType* types = (dex_file->NumTypeIds() == 0u) ? nullptr : in InitializeDexCache()
66 MethodDexCacheType* methods = (dex_file->NumMethodIds() == 0u) ? nullptr : in InitializeDexCache()
[all …]
/art/test/692-vdex-inmem-loader/
Dvdex_inmem_loader.cc49 [&](const DexFile* dex_file) { in Java_Main_areClassesVerified() argument
50 dex_files.push_back(dex_file); in Java_Main_areClassesVerified()
59 for (const DexFile* dex_file : dex_files) { in Java_Main_areClassesVerified() local
60 for (uint16_t cdef_idx = 0; cdef_idx < dex_file->NumClassDefs(); ++cdef_idx) { in Java_Main_areClassesVerified()
61 const char* desc = dex_file->GetClassDescriptor(dex_file->GetClassDef(cdef_idx)); in Java_Main_areClassesVerified()
88 [&](const DexFile* dex_file) { in Java_Main_hasVdexFile() argument
89 dex_headers.push_back(&dex_file->GetHeader()); in Java_Main_hasVdexFile()
118 [&](const DexFile* dex_file) { in Java_Main_isBackedByOatFile() argument
119 bool is_backed_by_oat = (dex_file->GetOatDexFile() != nullptr); in Java_Main_isBackedByOatFile()
143 [&](const DexFile* dex_file) { in Java_Main_areClassesPreverified() argument
[all …]
/art/tools/veridex/
Dhidden_api.cc73 std::string HiddenApi::GetApiMethodName(const DexFile& dex_file, uint32_t method_index) { in GetApiMethodName() argument
75 const dex::MethodId& method_id = dex_file.GetMethodId(method_index); in GetApiMethodName()
76 ss << dex_file.StringByTypeIdx(method_id.class_idx_) in GetApiMethodName()
78 << dex_file.GetMethodName(method_id) in GetApiMethodName()
79 << dex_file.GetMethodSignature(method_id).ToString(); in GetApiMethodName()
83 std::string HiddenApi::GetApiFieldName(const DexFile& dex_file, uint32_t field_index) { in GetApiFieldName() argument
85 const dex::FieldId& field_id = dex_file.GetFieldId(field_index); in GetApiFieldName()
86 ss << dex_file.StringByTypeIdx(field_id.class_idx_) in GetApiFieldName()
88 << dex_file.GetFieldName(field_id) in GetApiFieldName()
90 << dex_file.GetFieldTypeDescriptor(field_id); in GetApiFieldName()
/art/tools/dexanalyze/
Ddexanalyze_experiments.cc81 for (const std::unique_ptr<const DexFile>& dex_file : dex_files) { in ProcessDexFiles() local
82 ProcessDexFile(*dex_file); in ProcessDexFiles()
92 for (const std::unique_ptr<const DexFile>& dex_file : dex_files) { in ProcessDexFiles() local
93 for (ClassAccessor accessor : dex_file->GetClasses()) { in ProcessDexFiles()
95 CodeItemDebugInfoAccessor code_item(*dex_file, method.GetCodeItem(), method.GetIndex()); in ProcessDexFiles()
96 const uint8_t* debug_info = dex_file->GetDebugInfoStream(code_item.DebugInfoOffset()); in ProcessDexFiles()
217 for (const std::unique_ptr<const DexFile>& dex_file : dex_files) { in ProcessDexFiles() local
218 for (size_t i = 0; i < dex_file->NumTypeIds(); ++i) { in ProcessDexFiles()
220 dex_file->StringDataByIdx(dex_file->GetTypeId(dex::TypeIndex(i)).descriptor_idx_)); in ProcessDexFiles()
222 for (size_t i = 0; i < dex_file->NumFieldIds(); ++i) { in ProcessDexFiles()
[all …]
/art/compiler/
Dcompiler.cc50 const DexFile& dex_file) { in IsPathologicalCase() argument
56 CodeItemDataAccessor accessor(dex_file, &code_item); in IsPathologicalCase()
60 << " in " << dex_file.PrettyMethod(method_idx); in IsPathologicalCase()
65 << accessor.RegistersSize() << " in " << dex_file.PrettyMethod(method_idx); in IsPathologicalCase()
/art/runtime/dex/
Ddex_file_annotations.cc120 const DexFile& dex_file, in ClassData() argument
124 dex_file_(dex_file), in ClassData()
151 static const AnnotationSetItem* FindAnnotationSetForField(const DexFile& dex_file, in FindAnnotationSetForField() argument
155 const AnnotationsDirectoryItem* annotations_dir = dex_file.GetAnnotationsDirectory(class_def); in FindAnnotationSetForField()
159 const FieldAnnotationsItem* field_annotations = dex_file.GetFieldAnnotations(annotations_dir); in FindAnnotationSetForField()
166 return dex_file.GetFieldAnnotationSetItem(field_annotations[i]); in FindAnnotationSetForField()
183 const AnnotationItem* SearchAnnotationSet(const DexFile& dex_file, in SearchAnnotationSet() argument
190 const AnnotationItem* annotation_item = dex_file.GetAnnotationItem(annotation_set, i); in SearchAnnotationSet()
197 if (strcmp(descriptor, dex_file.StringByTypeIdx(dex::TypeIndex(type_index))) == 0) { in SearchAnnotationSet()
205 bool SkipAnnotationValue(const DexFile& dex_file, const uint8_t** annotation_ptr) in SkipAnnotationValue() argument
[all …]

12345678910>>...13