Home
last modified time | relevance | path

Searched refs:DexFile (Results 1 – 25 of 263) sorted by relevance

1234567891011

/art/libdexfile/external/
Ddex_file_supp.cc40 DEFINE_DLFUNC_PTR(DexFile, ExtDexFileOpenFromMemory);
41 DEFINE_DLFUNC_PTR(DexFile, ExtDexFileOpenFromFd);
42 DEFINE_DLFUNC_PTR(DexFile, ExtDexFileGetMethodInfoForOffset);
43 DEFINE_DLFUNC_PTR(DexFile, ExtDexFileGetAllMethodInfos);
44 DEFINE_DLFUNC_PTR(DexFile, ExtDexFileFree);
75 SET_DLFUNC_PTR(DexFile, ExtDexFileOpenFromMemory); in LoadLibdexfileExternal()
76 SET_DLFUNC_PTR(DexFile, ExtDexFileOpenFromFd); in LoadLibdexfileExternal()
77 SET_DLFUNC_PTR(DexFile, ExtDexFileGetMethodInfoForOffset); in LoadLibdexfileExternal()
78 SET_DLFUNC_PTR(DexFile, ExtDexFileGetAllMethodInfos); in LoadLibdexfileExternal()
79 SET_DLFUNC_PTR(DexFile, ExtDexFileFree); in LoadLibdexfileExternal()
[all …]
Ddex_file_supp_test.cc110 size_t size = sizeof(art::DexFile::Header) - 1; in TEST()
112 EXPECT_EQ(DexFile::OpenFromMemory(kDexData, &size, "", &error_msg), nullptr); in TEST()
113 EXPECT_EQ(size, sizeof(art::DexFile::Header)); in TEST()
118 size_t size = sizeof(art::DexFile::Header); in TEST()
120 EXPECT_EQ(DexFile::OpenFromMemory(kDexData, &size, "", &error_msg), nullptr); in TEST()
125 static std::unique_ptr<DexFile> GetTestDexData() { in GetTestDexData()
128 std::unique_ptr<DexFile> dex_file = DexFile::OpenFromMemory(kDexData, &size, "", &error_msg); in GetTestDexData()
140 ASSERT_EQ(sizeof(art::DexFile::Header) - 1, in TEST()
142 TEMP_FAILURE_RETRY(write(tf.fd, kDexData, sizeof(art::DexFile::Header) - 1)))); in TEST()
145 EXPECT_EQ(DexFile::OpenFromFd(tf.fd, 0, tf.path, &error_msg), nullptr); in TEST()
[all …]
/art/compiler/utils/
Datomic_dex_ref_map.h27 class DexFile; variable
54 void AddDexFile(const DexFile* dex_file);
55 void AddDexFiles(const std::vector<const DexFile*>& dex_files);
58 std::vector<const DexFile*> GetDexFiles() const;
60 bool HaveDexFile(const DexFile* dex_file) const { in HaveDexFile()
73 using DexFileArrays = SafeMap<const DexFile*, ElementArray>;
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/libdexfile/dex/
Ddex_file_verifier.cc48 static uint32_t MapTypeToBitMask(DexFile::MapItemType map_item_type) { in MapTypeToBitMask()
50 case DexFile::kDexTypeHeaderItem: return 1 << 0; in MapTypeToBitMask()
51 case DexFile::kDexTypeStringIdItem: return 1 << 1; in MapTypeToBitMask()
52 case DexFile::kDexTypeTypeIdItem: return 1 << 2; in MapTypeToBitMask()
53 case DexFile::kDexTypeProtoIdItem: return 1 << 3; in MapTypeToBitMask()
54 case DexFile::kDexTypeFieldIdItem: return 1 << 4; in MapTypeToBitMask()
55 case DexFile::kDexTypeMethodIdItem: return 1 << 5; in MapTypeToBitMask()
56 case DexFile::kDexTypeClassDefItem: return 1 << 6; in MapTypeToBitMask()
57 case DexFile::kDexTypeCallSiteIdItem: return 1 << 7; in MapTypeToBitMask()
58 case DexFile::kDexTypeMethodHandleItem: return 1 << 8; in MapTypeToBitMask()
[all …]
Dart_dex_file_loader.h30 class DexFile; variable
57 std::unique_ptr<const DexFile> Open(
69 std::unique_ptr<const DexFile> Open(const std::string& location,
82 std::vector<std::unique_ptr<const DexFile>>* dex_files) const;
88 std::vector<std::unique_ptr<const DexFile>>* dex_files) const;
91 std::unique_ptr<const DexFile> OpenDex(int fd,
104 std::vector<std::unique_ptr<const DexFile>>* dex_files) const;
113 std::vector<std::unique_ptr<const DexFile>>* dex_files) const;
115 std::unique_ptr<const DexFile> OpenFile(int fd,
128 std::vector<std::unique_ptr<const DexFile>>* dex_files) const;
[all …]
Ddex_file-inl.h41 inline int32_t DexFile::GetStringLength(const dex::StringId& string_id) const { in GetStringLength()
46 inline const char* DexFile::GetStringDataAndUtf16Length(const dex::StringId& string_id, in GetStringDataAndUtf16Length()
54 inline const char* DexFile::GetStringData(const dex::StringId& string_id) const { in GetStringData()
59 inline const char* DexFile::StringDataAndUtf16LengthByIdx(dex::StringIndex idx, in StringDataAndUtf16LengthByIdx()
69 inline const char* DexFile::StringDataByIdx(dex::StringIndex idx) const { in StringDataByIdx()
74 inline std::string_view DexFile::StringViewByIdx(dex::StringIndex idx) const { in StringViewByIdx()
80 inline const char* DexFile::StringByTypeIdx(dex::TypeIndex idx, uint32_t* unicode_length) const { in StringByTypeIdx()
88 inline const char* DexFile::StringByTypeIdx(dex::TypeIndex idx) const { in StringByTypeIdx()
96 inline const char* DexFile::GetTypeDescriptor(const dex::TypeId& type_id) const { in GetTypeDescriptor()
100 inline const char* DexFile::GetFieldTypeDescriptor(const dex::FieldId& field_id) const { in GetFieldTypeDescriptor()
[all …]
Ddex_file.cc63 uint32_t DexFile::CalculateChecksum() const { in CalculateChecksum()
67 uint32_t DexFile::CalculateChecksum(const uint8_t* begin, size_t size) { in CalculateChecksum()
68 const uint32_t non_sum_bytes = OFFSETOF_MEMBER(DexFile::Header, signature_); in CalculateChecksum()
72 uint32_t DexFile::ChecksumMemoryRange(const uint8_t* begin, size_t size) { in ChecksumMemoryRange()
76 int DexFile::GetPermissions() const { in GetPermissions()
81 bool DexFile::IsReadOnly() const { in IsReadOnly()
86 bool DexFile::EnableWrite() const { in EnableWrite()
91 bool DexFile::DisableWrite() const { in DisableWrite()
96 DexFile::DexFile(const uint8_t* base, in DexFile() function in art::DexFile
137 DexFile::~DexFile() { in ~DexFile()
[all …]
Ddex_file_loader_test.cc212 std::vector<std::unique_ptr<const DexFile>>* dex_files, in OpenDexFilesBase64()
219 std::vector<std::unique_ptr<const DexFile>> tmp; in OpenDexFilesBase64()
232 static std::unique_ptr<const DexFile> OpenDexFileBase64(const char* base64, in OpenDexFileBase64()
238 std::vector<std::unique_ptr<const DexFile>> dex_files; in OpenDexFileBase64()
246 static std::unique_ptr<const DexFile> OpenDexFileInMemoryBase64(const char* base64, in OpenDexFileInMemoryBase64()
255 std::unique_ptr<const DexFile> dex_file(dex_file_loader.Open(dex_bytes->data(), in OpenDexFileInMemoryBase64()
271 static void ValidateDexFileHeader(std::unique_ptr<const DexFile> dex_file) { in ValidateDexFileHeader()
276 static const uint8_t kExpectedSha1[DexFile::kSha1DigestSize] = { in ValidateDexFileHeader()
282 const DexFile::Header& header = dex_file->GetHeader(); in ValidateDexFileHeader()
310 std::unique_ptr<const DexFile> raw(OpenDexFileBase64(kRawDex, kLocationString, &dex_bytes)); in TEST_F()
[all …]
Dsignature.h33 class DexFile; variable
55 Signature(const DexFile* dex, const dex::ProtoId& proto) : dex_file_(dex), proto_id_(&proto) { in Signature()
60 friend class DexFile; variable
62 const DexFile* const dex_file_ = nullptr;
Dcode_item_accessors.h34 class DexFile; variable
42 ALWAYS_INLINE CodeItemInstructionAccessor(const DexFile& dex_file,
81 ALWAYS_INLINE void Init(const DexFile& dex_file, const dex::CodeItem* code_item);
98 ALWAYS_INLINE CodeItemDataAccessor(const DexFile& dex_file, const dex::CodeItem* code_item);
127 ALWAYS_INLINE void Init(const DexFile& dex_file, const dex::CodeItem* code_item);
147 ALWAYS_INLINE CodeItemDebugInfoAccessor(const DexFile& dex_file, in CodeItemDebugInfoAccessor()
153 ALWAYS_INLINE void Init(const DexFile& dex_file,
183 const DexFile* dex_file_ = nullptr;
Dart_dex_file_loader.cc132 if (!(zip_entry->IsUncompressed() && zip_entry->IsAlignedTo(alignof(DexFile::Header)))) { in GetMultiDexChecksums()
143 std::unique_ptr<const DexFile> dex_file(OpenFile(fd.Release(), in GetMultiDexChecksums()
159 std::unique_ptr<const DexFile> ArtDexFileLoader::Open( in Open()
184 std::unique_ptr<const DexFile> ArtDexFileLoader::Open(const std::string& location, in Open()
194 if (size < sizeof(DexFile::Header)) { in Open()
202 std::unique_ptr<DexFile> dex_file = OpenCommon(begin, in Open()
228 std::vector<std::unique_ptr<const DexFile>>* dex_files) const { in Open()
244 std::vector<std::unique_ptr<const DexFile>>* dex_files) const { in Open()
259 std::vector<std::unique_ptr<const DexFile>>* dex_files) const { in OpenWithMagic()
266 std::unique_ptr<const DexFile> dex_file(OpenFile(fd, in OpenWithMagic()
[all …]
/art/runtime/verifier/
Dverifier_deps.h37 class DexFile; variable
61 explicit VerifierDeps(const std::vector<const DexFile*>& dex_files);
63 VerifierDeps(const std::vector<const DexFile*>& dex_files, ArrayRef<const uint8_t> data);
67 void MergeWith(std::unique_ptr<VerifierDeps> other, const std::vector<const DexFile*>& dex_files);
72 void RecordClassVerified(const DexFile& dex_file, const dex::ClassDef& class_def)
76 static void MaybeRecordVerificationStatus(const DexFile& dex_file,
83 static void MaybeRecordClassRedefinition(const DexFile& dex_file, const dex::ClassDef& class_def)
88 static void MaybeRecordClassResolution(const DexFile& dex_file,
96 static void MaybeRecordFieldResolution(const DexFile& dex_file,
104 static void MaybeRecordMethodResolution(const DexFile& dex_file,
[all …]
/art/dexlayout/
Ddex_ir.cc56 DexFile::kDexTypeHeaderItem,
61 DexFile::kDexTypeStringIdItem,
66 DexFile::kDexTypeTypeIdItem,
71 DexFile::kDexTypeProtoIdItem,
76 DexFile::kDexTypeFieldIdItem,
81 DexFile::kDexTypeMethodIdItem,
86 DexFile::kDexTypeClassDefItem,
91 DexFile::kDexTypeCallSiteIdItem,
96 DexFile::kDexTypeMethodHandleItem,
101 DexFile::kDexTypeStringDataItem,
[all …]
Ddex_ir_builder.cc56 case DexFile::DBG_END_SEQUENCE: in GetDebugInfoStreamSize()
58 case DexFile::DBG_ADVANCE_PC: in GetDebugInfoStreamSize()
61 case DexFile::DBG_ADVANCE_LINE: in GetDebugInfoStreamSize()
64 case DexFile::DBG_START_LOCAL: in GetDebugInfoStreamSize()
69 case DexFile::DBG_START_LOCAL_EXTENDED: in GetDebugInfoStreamSize()
75 case DexFile::DBG_END_LOCAL: in GetDebugInfoStreamSize()
76 case DexFile::DBG_RESTART_LOCAL: in GetDebugInfoStreamSize()
79 case DexFile::DBG_SET_PROLOGUE_END: in GetDebugInfoStreamSize()
80 case DexFile::DBG_SET_EPILOGUE_BEGIN: in GetDebugInfoStreamSize()
82 case DexFile::DBG_SET_FILE: { in GetDebugInfoStreamSize()
[all …]
Ddex_visualize.cc174 const DexFile* dex_file, in DumpMethodItem()
216 { DexFile::kDexTypeHeaderItem, 1 },
217 { DexFile::kDexTypeStringIdItem, 2 },
218 { DexFile::kDexTypeTypeIdItem, 3 },
219 { DexFile::kDexTypeProtoIdItem, 4 },
220 { DexFile::kDexTypeFieldIdItem, 5 },
221 { DexFile::kDexTypeMethodIdItem, 6 },
222 { DexFile::kDexTypeClassDefItem, 7 },
223 { DexFile::kDexTypeTypeList, 8 },
224 { DexFile::kDexTypeAnnotationSetRefList, 9 },
[all …]
Ddex_writer.cc123 case DexFile::kDexAnnotationByte: in WriteEncodedValue()
126 case DexFile::kDexAnnotationShort: in WriteEncodedValue()
129 case DexFile::kDexAnnotationChar: in WriteEncodedValue()
132 case DexFile::kDexAnnotationInt: in WriteEncodedValue()
135 case DexFile::kDexAnnotationLong: in WriteEncodedValue()
138 case DexFile::kDexAnnotationFloat: in WriteEncodedValue()
142 case DexFile::kDexAnnotationDouble: in WriteEncodedValue()
146 case DexFile::kDexAnnotationMethodType: in WriteEncodedValue()
149 case DexFile::kDexAnnotationMethodHandle: in WriteEncodedValue()
152 case DexFile::kDexAnnotationString: in WriteEncodedValue()
[all …]
/art/runtime/dex/
Ddex_file_annotations.cc58 struct DexFile::AnnotationValue {
85 const DexFile& GetDexFile() const REQUIRES_SHARED(Locks::mutator_lock_) { in GetDexFile()
120 const DexFile& dex_file, in ClassData()
131 const DexFile& dex_file_;
143 if (expected == DexFile::kDexVisibilityRuntime) { in IsVisibilityCompatible()
145 return actual == DexFile::kDexVisibilityRuntime || actual == DexFile::kDexVisibilityBuild; in IsVisibilityCompatible()
151 static const AnnotationSetItem* FindAnnotationSetForField(const DexFile& dex_file, in FindAnnotationSetForField()
183 const AnnotationItem* SearchAnnotationSet(const DexFile& dex_file, in SearchAnnotationSet()
205 bool SkipAnnotationValue(const DexFile& dex_file, const uint8_t** annotation_ptr) in SkipAnnotationValue()
209 uint8_t value_type = header_byte & DexFile::kDexAnnotationValueTypeMask; in SkipAnnotationValue()
[all …]
/art/runtime/
Ddex_reference_collection.h27 class DexFile; variable
36 using MapAllocator = Allocator<std::pair<const DexFile*, IndexVector>>;
38 const DexFile*,
40 std::less<const DexFile*>,
41 Allocator<std::pair<const DexFile* const, IndexVector>>>;
48 void AddReference(const DexFile* dex, IndexType index) { in AddReference()
66 const DexFile* current_dex_file_ = nullptr;
70 ALWAYS_INLINE IndexVector* GetOrInsertVector(const DexFile* dex) { in GetOrInsertVector()
Dcommon_runtime_test.h46 class DexFile; variable
70 std::vector<std::unique_ptr<const DexFile>> dex_files; in MutateDexFile()
80 const std::unique_ptr<const DexFile>& dex = dex_files[0]; in MutateDexFile()
82 DexFile* dex_file = const_cast<DexFile*>(dex.get()); in MutateDexFile()
84 const_cast<DexFile::Header&>(dex_file->GetHeader()).checksum_ = dex_file->CalculateChecksum(); in MutateDexFile()
133 const DexFile* java_lang_dex_file_;
134 std::vector<const DexFile*> boot_class_path_;
138 std::vector<const DexFile*> GetDexFiles(jobject jclass_loader);
139 std::vector<const DexFile*> GetDexFiles(ScopedObjectAccess& soa,
144 const DexFile* GetFirstDexFile(jobject jclass_loader);
/art/dex2oat/driver/
Dcompiler_driver.h66 class DexFile; variable
97 void SetClasspathDexFiles(const std::vector<const DexFile*>& dex_files);
105 const std::vector<const DexFile*>& dex_files,
111 const std::vector<const DexFile*>& dex_files,
203 bool ShouldVerifyClassBasedOnProfile(const DexFile& dex_file, uint16_t class_idx) const;
237 const std::vector<const DexFile*>& dex_files,
241 const DexFile& dex_file,
242 const std::vector<const DexFile*>& dex_files,
251 const std::vector<const DexFile*>& dex_files,
256 const std::vector<const DexFile*>& dex_files,
[all …]
/art/openjdkjvmti/
Dfixed_up_dex_file.cc49 static void RecomputeDexChecksum(art::DexFile* dex_file) { in RecomputeDexChecksum()
50 reinterpret_cast<art::DexFile::Header*>(const_cast<uint8_t*>(dex_file->Begin()))->checksum_ = in RecomputeDexChecksum()
54 static const art::VdexFile* GetVdex(const art::DexFile& original_dex_file) { in GetVdex()
66 static void DoDexUnquicken(const art::DexFile& new_dex_file, in DoDexUnquicken()
67 const art::DexFile& original_dex_file) { in DoDexUnquicken()
76 static void DCheckVerifyDexFile(const art::DexFile& dex) { in DCheckVerifyDexFile()
90 std::unique_ptr<FixedUpDexFile> FixedUpDexFile::Create(const art::DexFile& original, in Create()
94 std::unique_ptr<const art::DexFile> new_dex_file; in Create()
155 RecomputeDexChecksum(const_cast<art::DexFile*>(new_dex_file.get())); in Create()
Dfixed_up_dex_file.h52 static std::unique_ptr<FixedUpDexFile> Create(const art::DexFile& original,
55 const art::DexFile& GetDexFile() { in GetDexFile()
68 explicit FixedUpDexFile(std::unique_ptr<const art::DexFile> fixed_up_dex_file, in FixedUpDexFile()
74 std::unique_ptr<const art::DexFile> dex_file_;
/art/libdexfile/external/include/art_api/
Ddex_file_support.h79 friend class DexFile; variable
119 class DexFile {
121 DexFile(DexFile&& dex_file) noexcept { in DexFile() function
125 virtual ~DexFile();
136 static std::unique_ptr<DexFile> OpenFromMemory(const void* addr, in OpenFromMemory()
148 return std::unique_ptr<DexFile>(new DexFile(ext_dex_file)); in OpenFromMemory()
159 static std::unique_ptr<DexFile> OpenFromFd(int fd, in OpenFromFd()
171 return std::unique_ptr<DexFile>(new DexFile(ext_dex_file)); in OpenFromFd()
207 explicit DexFile(ExtDexFile* ext_dex_file) : ext_dex_file_(ext_dex_file) {} in DexFile() function
221 DISALLOW_COPY_AND_ASSIGN(DexFile);
/art/dex2oat/dex/
Ddex_to_dex_compiler.h36 class DexFile; variable
63 const DexFile& dex_file,
84 void SetDexFiles(const std::vector<const DexFile*>& dex_files);
98 BitVector* GetOrAddBitVectorForDex(const DexFile* dex_file) REQUIRES(lock_);
103 const DexFile* active_dex_file_ = nullptr;
109 std::unordered_map<const DexFile*, BitVector> should_quicken_;
/art/libartbase/base/
Dcommon_art_test.h58 class DexFile; variable
136 std::vector<std::unique_ptr<const DexFile>> dex_files; in MutateDexFile()
146 const std::unique_ptr<const DexFile>& dex = dex_files[0]; in MutateDexFile()
148 DexFile* dex_file = const_cast<DexFile*>(dex.get()); in MutateDexFile()
150 const_cast<DexFile::Header&>(dex_file->GetHeader()).checksum_ = dex_file->CalculateChecksum(); in MutateDexFile()
200 std::unique_ptr<const DexFile> LoadExpectSingleDexFile(const char* location);
207 std::vector<std::unique_ptr<const DexFile>> OpenDexFiles(const char* filename);
210 std::unique_ptr<const DexFile> OpenDexFile(const char* filename);
213 std::vector<std::unique_ptr<const DexFile>> OpenTestDexFiles(const char* name);
215 std::unique_ptr<const DexFile> OpenTestDexFile(const char* name);
[all …]

1234567891011