Home
last modified time | relevance | path

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

12345678910>>...12

/art/libdexfile/external/
Ddex_file_supp_test.cc35 std::unique_ptr<DexFile> dex_file; in TEST()
36 EXPECT_TRUE(DexFile::Create(kDexData, size, &size, "", &dex_file).Ok()); in TEST()
42 size_t size = sizeof(art::DexFile::Header) - 1; in TEST()
43 std::unique_ptr<DexFile> dex_file; in TEST()
44 DexFile::Error error = DexFile::Create(kDexData, size, &size, "", &dex_file); in TEST()
48 EXPECT_EQ(size, sizeof(art::DexFile::Header)); in TEST()
53 size_t size = sizeof(art::DexFile::Header); in TEST()
54 std::unique_ptr<DexFile> dex_file; in TEST()
55 DexFile::Error error = DexFile::Create(kDexData, size, &size, "", &dex_file); in TEST()
63 static std::unique_ptr<DexFile> GetTestDexData() { in GetTestDexData()
[all …]
/art/runtime/verifier/
Dverifier_deps.h37 class DexFile; variable
63 explicit VerifierDeps(const std::vector<const DexFile*>& dex_files, bool output_only = true);
70 bool ParseStoredData(const std::vector<const DexFile*>& dex_files, ArrayRef<const uint8_t> data);
74 void MergeWith(std::unique_ptr<VerifierDeps> other, const std::vector<const DexFile*>& dex_files);
79 void RecordClassVerified(const DexFile& dex_file, const dex::ClassDef& class_def)
84 const DexFile& dex_file,
93 const DexFile& dex_file,
103 const DexFile& dex_file,
113 void Encode(const std::vector<const DexFile*>& dex_files, std::vector<uint8_t>* buffer) const;
123 const std::vector<bool>& GetVerifiedClasses(const DexFile& dex_file) const { in GetVerifiedClasses()
[all …]
/art/libdexfile/dex/
Ddex_file_verifier.cc57 constexpr uint32_t MapTypeToBitMask(DexFile::MapItemType map_item_type) { in MapTypeToBitMask()
59 case DexFile::kDexTypeHeaderItem: return 1 << 0; in MapTypeToBitMask()
60 case DexFile::kDexTypeStringIdItem: return 1 << 1; in MapTypeToBitMask()
61 case DexFile::kDexTypeTypeIdItem: return 1 << 2; in MapTypeToBitMask()
62 case DexFile::kDexTypeProtoIdItem: return 1 << 3; in MapTypeToBitMask()
63 case DexFile::kDexTypeFieldIdItem: return 1 << 4; in MapTypeToBitMask()
64 case DexFile::kDexTypeMethodIdItem: return 1 << 5; in MapTypeToBitMask()
65 case DexFile::kDexTypeClassDefItem: return 1 << 6; in MapTypeToBitMask()
66 case DexFile::kDexTypeCallSiteIdItem: return 1 << 7; in MapTypeToBitMask()
67 case DexFile::kDexTypeMethodHandleItem: return 1 << 8; in MapTypeToBitMask()
[all …]
Ddex_file_verifier_test.cc43 static void MakeDexVersion37(DexFile* dex_file) { in MakeDexVersion37()
44 size_t offset = OFFSETOF_MEMBER(DexFile::Header, magic_) + 6; in MakeDexVersion37()
50 DexFile::Header* header = reinterpret_cast<DexFile::Header*>(dex_file); in FixUpChecksum()
53 const uint32_t non_sum = sizeof(DexFile::Header::magic_) + sizeof(DexFile::Header::checksum_); in FixUpChecksum()
61 DexFile* GetDexFile(const uint8_t* dex_bytes, size_t length) { in GetDexFile()
67 const std::function<void(DexFile*)>& f, in VerifyModification()
73 std::unique_ptr<DexFile> dex_file(GetDexFile(dex_bytes.get(), length)); in VerifyModification()
96 static std::unique_ptr<const DexFile> OpenDexFileBase64(const char* base64, in OpenDexFileBase64()
106 std::vector<std::unique_ptr<const DexFile>> tmp; in OpenDexFileBase64()
119 std::unique_ptr<const DexFile> dex_file = std::move(tmp[0]); in OpenDexFileBase64()
[all …]
Ddex_file-inl.h42 inline int32_t DexFile::GetStringLength(const dex::StringId& string_id) const { in GetStringLength()
47 inline const char* DexFile::GetStringDataAndUtf16Length(const dex::StringId& string_id, in GetStringDataAndUtf16Length()
55 inline const char* DexFile::GetStringData(const dex::StringId& string_id) const { in GetStringData()
60 inline const char* DexFile::StringDataAndUtf16LengthByIdx(dex::StringIndex idx, in StringDataAndUtf16LengthByIdx()
70 inline const char* DexFile::StringDataByIdx(dex::StringIndex idx) const { in StringDataByIdx()
75 inline std::string_view DexFile::StringViewByIdx(dex::StringIndex idx) const { in StringViewByIdx()
81 inline const char* DexFile::StringByTypeIdx(dex::TypeIndex idx, uint32_t* unicode_length) const { in StringByTypeIdx()
89 inline const char* DexFile::StringByTypeIdx(dex::TypeIndex idx) const { in StringByTypeIdx()
97 inline const char* DexFile::GetTypeDescriptor(const dex::TypeId& type_id) const { in GetTypeDescriptor()
101 inline const char* DexFile::GetFieldTypeDescriptor(const dex::FieldId& field_id) const { in GetFieldTypeDescriptor()
[all …]
Dart_dex_file_loader.h30 class DexFile; variable
62 std::unique_ptr<const DexFile> Open(
74 std::unique_ptr<const DexFile> Open(const std::string& location,
87 std::vector<std::unique_ptr<const DexFile>>* dex_files) const;
93 std::vector<std::unique_ptr<const DexFile>>* dex_files) const;
103 std::vector<std::unique_ptr<const DexFile>>* dex_files) const;
106 std::unique_ptr<const DexFile> OpenDex(int fd,
119 std::vector<std::unique_ptr<const DexFile>>* dex_files) const;
128 std::vector<std::unique_ptr<const DexFile>>* dex_files) const;
130 std::unique_ptr<const DexFile> OpenFile(int fd,
[all …]
Ddex_file.cc64 uint32_t DexFile::CalculateChecksum() const { in CalculateChecksum()
68 uint32_t DexFile::CalculateChecksum(const uint8_t* begin, size_t size) { in CalculateChecksum()
69 const uint32_t non_sum_bytes = OFFSETOF_MEMBER(DexFile::Header, signature_); in CalculateChecksum()
73 uint32_t DexFile::ChecksumMemoryRange(const uint8_t* begin, size_t size) { in ChecksumMemoryRange()
77 int DexFile::GetPermissions() const { in GetPermissions()
82 bool DexFile::IsReadOnly() const { in IsReadOnly()
87 bool DexFile::EnableWrite() const { in EnableWrite()
92 bool DexFile::DisableWrite() const { in DisableWrite()
97 DexFile::DexFile(const uint8_t* base, in DexFile() function in art::DexFile
138 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 …]
Dart_dex_file_loader.cc133 if (!(zip_entry->IsUncompressed() && zip_entry->IsAlignedTo(alignof(DexFile::Header)))) { in GetMultiDexChecksums()
145 std::unique_ptr<const DexFile> dex_file(OpenFile(fd.Release(), in GetMultiDexChecksums()
161 std::unique_ptr<const DexFile> ArtDexFileLoader::Open( in Open()
186 std::unique_ptr<const DexFile> ArtDexFileLoader::Open(const std::string& location, in Open()
196 if (size < sizeof(DexFile::Header)) { in Open()
204 std::unique_ptr<DexFile> dex_file = OpenCommon(begin, in Open()
230 std::vector<std::unique_ptr<const DexFile>>* dex_files) const { in Open()
246 std::vector<std::unique_ptr<const DexFile>>* dex_files) const { in Open()
261 std::vector<std::unique_ptr<const DexFile>>* dex_files) const { in Open()
273 std::vector<std::unique_ptr<const DexFile>>* dex_files) const { in OpenWithMagic()
[all …]
Dcode_item_accessors.h34 class DexFile; variable
43 ALWAYS_INLINE CodeItemInstructionAccessor(const DexFile& dex_file,
82 ALWAYS_INLINE void Init(const DexFile& dex_file, const dex::CodeItem* code_item);
99 ALWAYS_INLINE CodeItemDataAccessor(const DexFile& dex_file, const dex::CodeItem* code_item);
128 ALWAYS_INLINE void Init(const DexFile& dex_file, const dex::CodeItem* code_item);
148 ALWAYS_INLINE CodeItemDebugInfoAccessor(const DexFile& dex_file, in CodeItemDebugInfoAccessor()
154 ALWAYS_INLINE void Init(const DexFile& dex_file,
184 const DexFile* dex_file_ = nullptr;
/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/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/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.cc57 case DexFile::DBG_END_SEQUENCE: in GetDebugInfoStreamSize()
59 case DexFile::DBG_ADVANCE_PC: in GetDebugInfoStreamSize()
62 case DexFile::DBG_ADVANCE_LINE: in GetDebugInfoStreamSize()
65 case DexFile::DBG_START_LOCAL: in GetDebugInfoStreamSize()
70 case DexFile::DBG_START_LOCAL_EXTENDED: in GetDebugInfoStreamSize()
76 case DexFile::DBG_END_LOCAL: in GetDebugInfoStreamSize()
77 case DexFile::DBG_RESTART_LOCAL: in GetDebugInfoStreamSize()
80 case DexFile::DBG_SET_PROLOGUE_END: in GetDebugInfoStreamSize()
81 case DexFile::DBG_SET_EPILOGUE_BEGIN: in GetDebugInfoStreamSize()
83 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 …]
Ddexdiag.cc67 { DexFile::kDexTypeHeaderItem, { "Header", 'H' } },
68 { DexFile::kDexTypeStringIdItem, { "StringId", 'S' } },
69 { DexFile::kDexTypeTypeIdItem, { "TypeId", 'T' } },
70 { DexFile::kDexTypeProtoIdItem, { "ProtoId", 'P' } },
71 { DexFile::kDexTypeFieldIdItem, { "FieldId", 'F' } },
72 { DexFile::kDexTypeMethodIdItem, { "MethodId", 'M' } },
73 { DexFile::kDexTypeClassDefItem, { "ClassDef", 'C' } },
74 { DexFile::kDexTypeCallSiteIdItem, { "CallSiteId", 'z' } },
75 { DexFile::kDexTypeMethodHandleItem, { "MethodHandle", 'Z' } },
76 { DexFile::kDexTypeMapList, { "TypeMap", 'L' } },
[all …]
Ddexlayout.h39 class DexFile; variable
115 const DexFile* dex_file,
173 void LayoutClassDefsAndClassData(const DexFile* dex_file);
174 void LayoutCodeItems(const DexFile* dex_file);
175 void LayoutStringData(const DexFile* dex_file);
179 void LayoutOutputFile(const DexFile* dex_file);
180 bool OutputDexFile(const DexFile* input_dex_file,
185 void DumpCFG(const DexFile* dex_file, int idx);
186 void DumpCFG(const DexFile* dex_file, uint32_t dex_method_idx, const dex::CodeItem* code);
/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()
/art/dex2oat/driver/
Dcompiler_driver.h64 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;
233 const std::vector<const DexFile*>& dex_files,
237 const DexFile& dex_file,
238 const std::vector<const DexFile*>& dex_files,
247 const std::vector<const DexFile*>& dex_files,
252 const std::vector<const DexFile*>& dex_files,
[all …]
/art/libprofile/profile/
Dprofile_boot_info.h26 class DexFile; variable
41 void Add(const DexFile* dex_file, uint32_t method_index);
48 bool Load(int fd, const std::vector<const DexFile*>& dex_files);
50 const std::vector<const DexFile*>& GetDexFiles() const { in GetDexFiles()
62 std::vector<const DexFile*> dex_files_;
Dprofile_boot_info_test.cc38 std::vector<const DexFile*> dex_files; in TEST_F()
48 std::unique_ptr<const DexFile> dex(OpenTestDexFile("ManyMethods")); in TEST_F()
49 std::vector<const DexFile*> dex_files = { dex.get() }; in TEST_F()
67 std::vector<std::unique_ptr<const DexFile>> dex_files = OpenTestDexFiles("MultiDex"); in TEST_F()
68 std::vector<const DexFile*> dex_files2; in TEST_F()
69 for (const std::unique_ptr<const DexFile>& file : dex_files) { in TEST_F()
96 std::unique_ptr<const DexFile> dex(OpenTestDexFile("ManyMethods")); in TEST_F()
105 std::vector<std::unique_ptr<const DexFile>> dex_files = OpenTestDexFiles("MultiDex"); in TEST_F()
106 std::vector<const DexFile*> dex_files2; in TEST_F()
107 for (const std::unique_ptr<const DexFile>& file : dex_files) { in TEST_F()
/art/libartbase/base/
Dcommon_art_test.h44 class DexFile; variable
165 std::vector<std::unique_ptr<const DexFile>> dex_files; in MutateDexFile()
175 const std::unique_ptr<const DexFile>& dex = dex_files[0]; in MutateDexFile()
177 DexFile* dex_file = const_cast<DexFile*>(dex.get()); in MutateDexFile()
179 const_cast<DexFile::Header&>(dex_file->GetHeader()).checksum_ = dex_file->CalculateChecksum(); in MutateDexFile()
232 std::unique_ptr<const DexFile> LoadExpectSingleDexFile(const char* location);
237 std::vector<std::unique_ptr<const DexFile>> OpenDexFiles(const char* filename);
240 std::unique_ptr<const DexFile> OpenDexFile(const char* filename);
243 std::vector<std::unique_ptr<const DexFile>> OpenTestDexFiles(const char* name);
245 std::unique_ptr<const DexFile> OpenTestDexFile(const char* name);
[all …]
/art/libdexfile/external/include/art_api/
Ddex_file_support.h58 class DexFile {
100 /*out*/ std::unique_ptr<DexFile>* out_dex_file) { in Create()
105 *out_dex_file = std::unique_ptr<DexFile>(new DexFile{adex}); in Create()
110 virtual ~DexFile() { in ~DexFile()
127 explicit DexFile(ADexFile* self) : self_(self) {} in DexFile() function
131 DISALLOW_COPY_AND_ASSIGN(DexFile);
/art/openjdkjvmti/
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_;

12345678910>>...12