Home
last modified time | relevance | path

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

12345678910>>...13

/aosp12/art/libdexfile/dex/
H A Ddex_file_verifier_test.cc74 f(dex_file.get()); in VerifyModification()
120 return dex_file; in OpenDexFileBase64()
157 [](DexFile* dex_file) { in TEST_F() argument
167 [](DexFile* dex_file) { in TEST_F() argument
177 [](DexFile* dex_file) { in TEST_F() argument
244 ClassAccessor accessor(*dex_file, dex_file->GetClassDef(0)); in FindMethodData()
326 [](DexFile* dex_file) { in TEST_F() argument
338 [](DexFile* dex_file) { in TEST_F() argument
630 [](DexFile* dex_file) { in TEST_F() argument
682 [](DexFile* dex_file) { in TEST_F() argument
[all …]
H A Dtest_dex_file_builder_test.cc33 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()
72 ASSERT_EQ(2u, dex_file->NumProtoIds()); in TEST()
73 ASSERT_EQ(2u, dex_file->NumMethodIds()); in TEST()
75 dex_file->PrettyMethod(0u).c_str()); in TEST()
[all …]
H A 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()
74 const dex::TypeList* params1 = mr1.dex_file->GetProtoParameters(prid1); in SlowCompare()
[all …]
H A Ddex_file_layout.cc51 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()
61 UNUSED(dex_file); in Madvise()
70 dex_file, in Madvise()
73 dex_file, in Madvise()
79 dex_file, in Madvise()
85 dex_file, in Madvise()
[all …]
H A Ddex_file_reference.h30 DexFileReference(const DexFile* file, uint32_t idx) : dex_file(file), index(idx) {} in DexFileReference()
31 const DexFile* dex_file; variable
36 if (a.dex_file != b.dex_file) { in operator()
37 return a.dex_file < b.dex_file; in operator()
49 return a.dex_file == b.dex_file && a.index == b.index;
62 return hash<decltype(ref.dex_file)>()(ref.dex_file) ^
H A Dcode_item_accessors-inl.h59 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()
116 if (dex_file.IsCompactDexFile()) { in Init()
119 DCHECK(dex_file.IsStandardDexFile()); in Init()
127 Init(dex_file, code_item); in CodeItemDataAccessor()
193 dex_file_ = &dex_file; in Init()
194 if (dex_file.IsCompactDexFile()) { in Init()
[all …]
/aosp12/art/tools/hiddenapi/
H A Dhiddenapi_test.cc121 if (dex_file.get() == nullptr) { in OpenDex()
129 return dex_file; in OpenDex()
169 const dex::ClassDef* found = dex_file.FindClassDef(dex_file.GetIndexForTypeId(*type_id)); in FindClass()
230 return GetFieldHiddenFlags("ifield", kAccPublic, FindClass("LMain;", dex_file), dex_file); in GetIFieldHiddenFlags()
234 return GetFieldHiddenFlags("sfield", kAccPrivate, FindClass("LMain;", dex_file), dex_file); in GetSFieldHiddenFlags()
239 "imethod", 0, /* expected_native= */ false, FindClass("LMain;", dex_file), dex_file); in GetIMethodHiddenFlags()
274 ASSERT_NE(dex_file.get(), nullptr); in TEST_F()
285 ASSERT_NE(dex_file.get(), nullptr); in TEST_F()
296 ASSERT_NE(dex_file.get(), nullptr); in TEST_F()
307 ASSERT_NE(dex_file.get(), nullptr); in TEST_F()
[all …]
/aosp12/art/dex2oat/
H A Ddex2oat_vdex_test.cc170 ASSERT_TRUE(RunDex2oat(dex_file->GetLocation(), GetOdex(dex_file), &api_dex_location)); in TEST_F()
172 std::unique_ptr<VerifierDeps> deps = GetVerifierDeps(GetVdex(dex_file), dex_file.get()); in TEST_F()
200 std::unique_ptr<VerifierDeps> deps2 = GetVerifierDeps(GetVdex(dex_file), dex_file.get()); in TEST_F()
224 dex_file->GetLocation(), in TEST_F()
225 GetOdex(dex_file), in TEST_F()
238 dex_file->GetLocation(), in TEST_F()
239 GetOdex(dex_file, "v2"), in TEST_F()
262 dex_file->GetLocation(), in TEST_F()
263 GetOdex(dex_file), in TEST_F()
277 dex_file->GetLocation(), in TEST_F()
[all …]
H A Dverifier_deps_test.cc125 for (const DexFile* dex_file : dex_files_) { in LoadDexFile() local
128 for (const DexFile* dex_file : dex_files_) { in LoadDexFile() local
129 verification_results_->AddDexFile(dex_file); in LoadDexFile()
225 for (const DexFile* dex_file : dex_files_) { in VerifyClassStatus() local
264 return !HasVerifiedClass(cls, dex_file); in HasUnverifiedClass()
277 const DexFile& dex_file = *dex_dep.first; in HasAssignable() local
514 for (auto& dex_file : first_dex_files) { in TEST_F() local
515 dex_files.push_back(dex_file.get()); in TEST_F()
517 for (auto& dex_file : second_dex_files) { in TEST_F() local
518 dex_files.push_back(dex_file.get()); in TEST_F()
[all …]
/aosp12/art/libdexfile/external/
H A Ddex_file_supp_test.cc35 std::unique_ptr<DexFile> dex_file; in TEST() local
38 EXPECT_NE(dex_file, nullptr); in TEST()
43 std::unique_ptr<DexFile> dex_file; in TEST() local
49 EXPECT_EQ(dex_file, nullptr); in TEST()
54 std::unique_ptr<DexFile> dex_file; in TEST() local
60 EXPECT_EQ(dex_file, nullptr); in TEST()
68 EXPECT_NE(dex_file, nullptr); in GetTestDexData()
69 return dex_file; in GetTestDexData()
74 ASSERT_NE(dex_file, nullptr); in TEST()
109 ASSERT_NE(dex_file, nullptr); in TEST()
[all …]
/aosp12/art/dexlayout/
H A Ddex_ir_builder.cc209 const DexFile& dex_file,
250 Header* DexIrBuilder(const DexFile& dex_file, in DexIrBuilder() argument
276 builder_maps.CreateStringId(dex_file, i); in DexIrBuilder()
281 builder_maps.CreateTypeId(dex_file, i); in DexIrBuilder()
286 builder_maps.CreateProtoId(dex_file, i); in DexIrBuilder()
291 builder_maps.CreateFieldId(dex_file, i); in DexIrBuilder()
323 dex_file.DataBegin() + dex_file.GetHeader().link_off_, in DexIrBuilder()
324 dex_file.DataBegin() + dex_file.GetHeader().link_off_ + dex_file.GetHeader().link_size_)); in DexIrBuilder()
571 CreateMethodHandleItem(dex_file, i); in CreateCallSitesAndMethodHandles()
575 CreateCallSiteId(dex_file, i); in CreateCallSitesAndMethodHandles()
[all …]
H A Ddexlayout_test.cc390 std::string dex_file = tmp_dir + "classes.dex"; in DexFileLayoutExec() local
393 CreateProfile(dex_file, profile_file); in DexFileLayoutExec()
420 std::string dex_file = tmp_dir + "classes.dex"; in DexFileLayoutFixedPointExec() local
435 CreateProfile(dex_file, profile_file); in DexFileLayoutFixedPointExec()
499 if (!UnlinkFile(dex_file)) { in UnreferencedCatchHandlerExec()
506 bool DexLayoutExec(ScratchFile* dex_file, in DexLayoutExec() argument
512 EXPECT_EQ(dex_file->GetFile()->Flush(), 0); in DexLayoutExec()
785 EXPECT_GT(dex_file->NumClassDefs(), 1u); in TEST_F()
799 dex_file->GetLocation().c_str(), in TEST_F()
800 dex_file.get(), in TEST_F()
[all …]
/aosp12/art/runtime/verifier/
H A Dverifier_deps.cc43 for (const DexFile* dex_file : dex_files) { in VerifierDeps() local
44 DCHECK(GetDexFileDeps(*dex_file) == nullptr); in VerifierDeps()
66 for (const DexFile* dex_file : dex_files) { in MergeWith() local
83 auto it = dex_deps_.find(&dex_file); in GetDexFileDeps()
88 auto it = dex_deps_.find(&dex_file); in GetDexFileDeps()
227 AddAssignability(dex_file, in AddAssignability()
663 const DexFile& dex_file = *dep.first; in Dump() local
666 << dex_file.GetLocation() in Dump()
678 << dex_file.GetClassDescriptor(dex_file.GetClassDef(idx)) in Dump()
692 << dex_file.GetClassDescriptor(dex_file.GetClassDef(idx)) in Dump()
[all …]
H A Dverifier_deps.h84 const DexFile& dex_file,
93 const DexFile& dex_file,
103 const DexFile& dex_file,
124 return GetDexFileDeps(dex_file)->verified_classes_; in GetVerifiedClasses()
135 bool ContainsDexFile(const DexFile& dex_file) const { in ContainsDexFile() argument
136 return GetDexFileDeps(dex_file) != nullptr; in ContainsDexFile()
192 DexFileDeps* GetDexFileDeps(const DexFile& dex_file);
211 void AddAssignability(const DexFile& dex_file,
217 void AddAssignability(const DexFile& dex_file,
229 const DexFile& dex_file,
[all …]
/aosp12/art/compiler/utils/
H A 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()
90 arrays_.Put(dex_file, std::move(ElementArray(NumberOfDexIndices(dex_file)))); in AddDexFile()
96 for (const DexFile* dex_file : dex_files) { in AddDexFiles() local
97 if (!HaveDexFile(dex_file)) { in AddDexFiles()
98 AddDexFile(dex_file); in AddDexFiles()
106 auto it = arrays_.find(dex_file); in GetArray()
113 auto it = arrays_.find(dex_file); in GetArray()
[all …]
/aosp12/art/runtime/
H A Dsdk_checker.cc55 for (const std::unique_ptr<const DexFile>& dex_file : sdk_dex_files_) { in ShouldDenyAccess() local
57 dex_file->FindTypeId(art_method->GetDeclaringClassDescriptor()); in ShouldDenyAccess()
61 const dex::StringId* name_id = dex_file->FindStringId(art_method->GetName()); in ShouldDenyAccess()
68 if (!dex_file->CreateTypeList( in ShouldDenyAccess()
80 dex_file->FindMethodId(*declaring_type_id, *name_id, *proto_id); in ShouldDenyAccess()
101 for (const std::unique_ptr<const DexFile>& dex_file : sdk_dex_files_) { in ShouldDenyAccess() local
104 const dex::TypeId* declaring_type_id = dex_file->FindTypeId( in ShouldDenyAccess()
139 for (const std::unique_ptr<const DexFile>& dex_file : sdk_dex_files_) { in ShouldDenyAccess() local
140 const dex::TypeId* type_id = dex_file->FindTypeId(descriptor); in ShouldDenyAccess()
142 dex::TypeIndex type_idx = dex_file->GetIndexForTypeId(*type_id); in ShouldDenyAccess()
[all …]
H A 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()
192 return dex_file->GetMethodSignature(dex_file->GetMethodId(dex_method_idx)); in GetSignature()
202 return dex_file->GetMethodName(dex_file->GetMethodId(dex_method_idx)); in GetName()
213 const char* name = dex_file->GetMethodName(dex_file->GetMethodId(dex_method_idx), &length); in GetNameView()
252 const DexFile* dex_file = GetDexFile(); in GetPrototype() local
253 return dex_file->GetMethodPrototype(dex_file->GetMethodId(GetDexMethodIndex())); in GetPrototype()
291 return dex_file->GetTypeDescriptor(dex_file->GetTypeId(GetReturnTypeIndex())); in GetReturnTypeDescriptor()
[all …]
H A 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()
/aosp12/art/test/692-vdex-inmem-loader/
H A Dvdex_inmem_loader.cc50 [&](const DexFile* dex_file) { in Java_Main_areClassesVerified() argument
51 dex_files.push_back(dex_file); in Java_Main_areClassesVerified()
60 for (const DexFile* dex_file : dex_files) { in Java_Main_areClassesVerified() local
62 const char* desc = dex_file->GetClassDescriptor(dex_file->GetClassDef(cdef_idx)); in Java_Main_areClassesVerified()
89 [&](const DexFile* dex_file) { in Java_Main_hasVdexFile() argument
90 dex_files.push_back(dex_file); in Java_Main_hasVdexFile()
121 [&](const DexFile* dex_file) { in Java_Main_isBackedByOatFile() argument
146 [&](const DexFile* dex_file) { in Java_Main_areClassesPreverified() argument
147 dex_files.push_back(dex_file); in Java_Main_areClassesPreverified()
156 for (const DexFile* dex_file : dex_files) { in Java_Main_areClassesPreverified() local
[all …]
/aosp12/art/tools/dexanalyze/
H A Ddexanalyze_experiments.cc82 ProcessDexFile(*dex_file); in ProcessDexFiles()
220 dex_file->StringDataByIdx(dex_file->GetTypeId(dex::TypeIndex(i)).descriptor_idx_)); in ProcessDexFiles()
223 unique_field_names.insert(dex_file->StringDataByIdx(dex_file->GetFieldId(i).name_idx_)); in ProcessDexFiles()
226 unique_method_names.insert(dex_file->StringDataByIdx(dex_file->GetMethodId(i).name_idx_)); in ProcessDexFiles()
228 ProcessDexFile(*dex_file); in ProcessDexFiles()
239 num_string_ids_ += dex_file.NumStringIds(); in ProcessDexFile()
240 num_method_ids_ += dex_file.NumMethodIds(); in ProcessDexFile()
241 num_field_ids_ += dex_file.NumFieldIds(); in ProcessDexFile()
242 num_type_ids_ += dex_file.NumTypeIds(); in ProcessDexFile()
243 num_class_defs_ += dex_file.NumClassDefs(); in ProcessDexFile()
[all …]
/aosp12/art/runtime/dex/
H A Ddex_file_annotations.cc120 const DexFile& dex_file, in ClassData() argument
124 dex_file_(dex_file), in ClassData()
275 dex_file.GetStringData(dex_file.GetStringId(dex::StringIndex(element_name_index))); in SearchEncodedAnnotation()
279 SkipAnnotationValue(dex_file, &annotation); in SearchEncodedAnnotation()
340 const DexFile& dex_file = klass.GetDexFile(); in FindAnnotationSetForClass() local
421 const DexFile& dex_file = klass.GetDexFile(); in ProcessAnnotationValue() local
701 const DexFile& dex_file = klass.GetDexFile(); in CreateAnnotationMember() local
766 const DexFile& dex_file = klass.GetDexFile(); in GetAnnotationItemFromAnnotationSet() local
1171 SearchAnnotationSet(*dex_file, in GetParametersMetadataForMethod()
1281 dex_file, in GetNativeMethodAnnotationAccessFlags()
[all …]
/aosp12/art/dex2oat/driver/
H A Dcompiler_driver.cc376 const DexFile& dex_file, in CompileMethodHarness() argument
423 const DexFile& dex_file, in CompileMethodQuick() argument
434 const DexFile& dex_file, in CompileMethodQuick()
448 dex_file, dex_file.GetClassDef(class_def_idx), method_idx); in CompileMethodQuick()
536 *dex_file, in Resolve()
1072 const DexFile* dex_file = it->dex_file; in LoadImageClasses() local
1364 dex_file_(dex_file), in ParallelCompilationManager()
1644 dex_file, in Visit()
2632 dex_file, in CompileDexFile()
2722 ref.dex_file->GetClassDescriptor(ref.dex_file->GetClassDef(ref.index))) in RecordClassStatus()
[all …]
/aosp12/art/tools/veridex/
H A 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()
/aosp12/system/unwinding/libunwindstack/tests/
H A DDexFileTest.cpp146 ASSERT_TRUE(dex_file != nullptr); in TEST()
150 dex_file = DexFile::Create(0x4000, sizeof(kDexData), &memory, &info); in TEST()
151 EXPECT_TRUE(dex_file == nullptr); in TEST()
173 ASSERT_TRUE(dex_file != nullptr); in TEST()
177 ASSERT_TRUE(dex_file->GetFunctionName(0x4102, &method, &method_offset)); in TEST()
181 ASSERT_TRUE(dex_file->GetFunctionName(0x4118, &method, &method_offset)); in TEST()
191 ASSERT_TRUE(dex_file != nullptr); in TEST()
197 EXPECT_FALSE(dex_file->GetFunctionName(0x98, &method, &method_offset)); in TEST()
210 EXPECT_TRUE(dex_file != nullptr); in TEST()
214 ASSERT_TRUE(dex_file->GetFunctionName(0x4118, &method, &method_offset)); in TEST()
[all …]
/aosp12/art/compiler/debug/
H A Delf_symtab_writer.h60 DCHECK(mi->dex_file != nullptr); in GetDedupedName()
61 return mi->dex_file == first->dex_file && mi->class_def_index == first->class_def_index; in GetDedupedName()
64 return strcmp(mi->dex_file->GetMethodName(mi->dex_method_index), in GetDedupedName()
65 first->dex_file->GetMethodName(first->dex_method_index)) == 0; in GetDedupedName()
73 auto& dex_class_def = first->dex_file->GetClassDef(first->class_def_index); in GetDedupedName()
74 AppendPrettyDescriptor(first->dex_file->GetClassDescriptor(dex_class_def), &*out); in GetDedupedName()
80 *out += first->dex_file->GetMethodName(first->dex_method_index); in GetDedupedName()
142 DCHECK(info.dex_file != nullptr); in WriteDebugSymbols()
143 std::string name = info.dex_file->PrettyMethod(info.dex_method_index, !mini_debug_info); in WriteDebugSymbols()
164 const DexFile* dex_file = it.second; in WriteDebugSymbols() local
[all …]

12345678910>>...13