/art/tools/dexfuzz/src/dexfuzz/rawdex/ |
H A D | ClassDefItem.java | 5 * you may not use this file except in compliance with the License. 40 public void read(DexRandomAccessFile file) throws IOException { argument 41 file.getOffsetTracker().getNewOffsettable(file, this); 42 classIdx = file.readUInt(); 43 accessFlags = file.readUInt(); 44 superclassIdx = file.readUInt(); 45 interfacesOff = file.getOffsetTracker().getNewOffset(file.readUInt()); 46 sourceFileIdx = file 53 write(DexRandomAccessFile file) argument [all...] |
H A D | CodeItem.java | 5 * you may not use this file except in compliance with the License. 48 public void read(DexRandomAccessFile file) throws IOException { argument 49 file.alignForwards(4); 50 file.getOffsetTracker().getNewOffsettable(file, this); 51 registersSize = file.readUShort(); 52 insSize = file.readUShort(); 53 outsSize = file.readUShort(); 54 triesSize = file.readUShort(); 55 debugInfoOff = file 71 populateInstructionList(DexRandomAccessFile file) argument 91 write(DexRandomAccessFile file) argument [all...] |
H A D | EncodedField.java | 5 * you may not use this file except in compliance with the License. 26 public void read(DexRandomAccessFile file) throws IOException { argument 27 fieldIdxDiff = file.readUleb128(); 28 accessFlags = file.readUleb128(); 32 public void write(DexRandomAccessFile file) throws IOException { argument 33 file.writeUleb128(fieldIdxDiff); 34 file.writeUleb128(accessFlags);
|
H A D | EncodedMethod.java | 5 * you may not use this file except in compliance with the License. 29 public void read(DexRandomAccessFile file) throws IOException { argument 30 methodIdxDiff = file.readUleb128(); 31 accessFlags = file.readUleb128(); 32 codeOff = file.getOffsetTracker().getNewOffset(file.readUleb128()); 39 public void write(DexRandomAccessFile file) throws IOException { argument 40 file.writeUleb128(methodIdxDiff); 41 file.writeUleb128(accessFlags); 42 file [all...] |
H A D | HeaderItem.java | 5 * you may not use this file except in compliance with the License. 49 public void read(DexRandomAccessFile file) throws IOException { argument 50 file.getOffsetTracker().getNewOffsettable(file, this); 53 magic[i] = file.readByte(); 55 checksum = file.readUInt(); 58 signature[i] = file.readByte(); 60 fileSize = file.readUInt(); 61 headerSize = file.readUInt(); 62 endianTag = file 90 write(DexRandomAccessFile file) argument [all...] |
H A D | Instruction.java | 5 * you may not use this file except in compliance with the License. 116 public void read(DexRandomAccessFile file) throws IOException { argument 119 long offset = file.getFilePointer(); 120 int opcodeValue = readOpcode(file); 128 file.seek(offset); 129 file.read(rawBytes); 146 public void write(DexRandomAccessFile file) throws IOException { argument 150 file.write(rawBytes); 152 info.format.writeToFile(file, this); 168 private int readOpcode(DexRandomAccessFile file) throw argument [all...] |
H A D | MapItem.java | 5 * you may not use this file except in compliance with the License. 46 public void read(DexRandomAccessFile file) throws IOException { argument 47 type = file.readUShort(); 48 file.readUShort(); // Unused padding. 49 size = file.readUInt(); 51 offset = file.getOffsetTracker().getNewHeaderOffset(file.readUInt()); 53 offset = file.getOffsetTracker().getNewOffset(file.readUInt()); 58 public void write(DexRandomAccessFile file) throw argument [all...] |
H A D | RawDexFile.java | 5 * you may not use this file except in compliance with the License. 53 public void read(DexRandomAccessFile file) throws IOException { argument 55 offsetTracker = file.getOffsetTracker(); 57 file.seek(0); 60 (header = new HeaderItem()).read(file); 71 mapList.read(file); 73 file.getOffsetTracker().associateOffsets(); 77 public void write(DexRandomAccessFile file) throws IOException { argument 78 file.seek(0); 141 // Use the map list to write the file 308 calculateAdler32Checksum(DexRandomAccessFile file) argument 323 updateHeader(DexRandomAccessFile file) argument [all...] |
H A D | OffsetTracker.java | 5 * you may not use this file except in compliance with the License. 29 * referred to by an offset somewhere else in the file - RawDexObjects) and Offsets. 31 * its original position in the file using a map, and the order in which the Offsettables were 33 * the whole file, we use the map to find the Offsettable it pointed at. 34 * Then, as we write out the file, for every Offsettable we write out, we record its new position, 40 * points to jump forward and back to, because we cannot read and write the file out in exactly 43 * in preparation for the order in which the file is written out? 49 * A map from the original offset in the input DEX file to 65 * A table of all offsets that is populated as we read in the DEX file. 73 * as we write out a DEX file 127 getNewOffsettable(DexRandomAccessFile file, RawDexObject item) argument 184 updatePositionOfNextOffsettable(DexRandomAccessFile file) argument 204 tryToWriteOffset(Offset offset, DexRandomAccessFile file, boolean useUleb128) argument 239 updateOffsets(DexRandomAccessFile file) argument [all...] |
/art/compiler/debug/dwarf/ |
H A D | dwarf_test.h | 5 * you may not use this file except in compliance with the License. 61 // Write simple elf file with just the DWARF sections. 63 ScratchFile file; local 64 FileOutputStream output_stream(file.GetFile()); 85 // Read the elf file back using objdump. 88 cmd = cmd + "objdump " + args + " " + file.GetFilename() + " 2>&1"; 158 // Buffers which are going to assembled into ELF file and passed to objdump.
|
H A D | debug_line_opcode_writer.h | 5 * you may not use this file except in compliance with the License. 71 void SetFile(int file) { argument 72 if (current_file_ != file) { 74 this->PushUleb128(file); 75 current_file_ = file;
|
/art/compiler/utils/ |
H A D | assembler_thumb_test.cc | 5 * you may not use this file except in compliance with the License. 32 // Include results file (generated manually) 39 // copy the output into the .cc.inc file in the form 44 // in the .cc.inc file. 95 ScratchFile file; local 97 const char* filename = file.GetFilename().c_str(); 138 // into the .inc file, so let's add the appropriate prefix/suffix needed in the C++ code. 143 // Check the results match the appropriate results in the .inc file.
|
H A D | assembler_test_base.h | 5 * you may not use this file except in compliance with the License. 39 // We put this into a class as gtests are self-contained, so this helper needs to be in an h-file. 205 // Compile the assembly file from_file to a binary file to_file. Returns true on success. 239 // Runs objdump -h on the binary file and extracts the first line with .text. 241 std::string Objdump(std::string file) { argument 255 args.push_back(file); 257 args.push_back(file+".dump"); 269 std::ifstream dump(file+".dump"); 327 bool DisassembleBinary(std::string file, st argument 441 FileExists(std::string file) argument [all...] |
/art/profman/ |
H A D | profile_assistant_test.cc | 5 * you may not use this file except in compliance with the License. 53 int GetFd(const ScratchFile& file) const { 54 return static_cast<int>(file.GetFd()); 57 void CheckProfileInfo(ScratchFile& file, const ProfileCompilationInfo& info) { argument 59 ASSERT_TRUE(file.GetFile()->ResetOffset()); 60 ASSERT_TRUE(file_info.Load(GetFd(file))); 72 EXPECT_TRUE(OS::FileExists(file_path.c_str())) << file_path << " should be a valid file path"; 76 argv_str.push_back("--profile-file-fd=" + std::to_string(profiles_fd[k])); 78 argv_str.push_back("--reference-profile-file-fd=" + std::to_string(reference_profile_fd)); 242 // Assign different hashes for the same dex file [all...] |
/art/runtime/base/unix_file/ |
H A D | random_access_file_test.h | 5 * you may not use this file except in compliance with the License. 34 // backed by a temporary file. 68 std::unique_ptr<RandomAccessFile> file(MakeTestFile()); 70 // Reading from the start of an empty file gets you zero bytes, however many 72 ASSERT_EQ(0, file->Read(buf, 0, 0)); 73 ASSERT_EQ(0, file->Read(buf, 123, 0)); 76 ASSERT_EQ(content.size(), static_cast<uint64_t>(file->Write(content.data(), content.size(), 0))); 78 TestReadContent(content, file.get()); 80 CleanUp(file.get()); 83 void TestReadContent(const std::string& content, RandomAccessFile* file) { argument [all...] |
/art/runtime/jit/ |
H A D | profile_compilation_info_test.cc | 5 * you may not use this file except in compliance with the License. 67 uint32_t GetFd(const ScratchFile& file) { argument 68 return static_cast<uint32_t>(file.GetFd()); 180 // Trying to add info for an existing file but with a different checksum. 189 // Use the same file, change the checksum. 321 // Check that we fail because of unexpected data at the end of the file.
|
/art/runtime/base/ |
H A D | logging.cc | 5 * you may not use this file except in compliance with the License. 141 LogMessageData(const char* file, unsigned int line, LogSeverity severity, int error) argument 142 : file_(file), 146 const char* last_slash = strrchr(file, '/'); 147 file = (last_slash == nullptr) ? file : last_slash + 1; 185 LogMessage::LogMessage(const char* file, unsigned int line, LogSeverity severity, int error) argument 186 : data_(new LogMessageData(file, line, severity, error)) { 192 << " " << getpid() << " " << ::art::GetTid() << " " << file << ":" << line << "]"; 252 void LogMessage::LogLine(const char* file, unsigne argument 275 LogLineLowStack(const char* file, unsigned int line, LogSeverity log_severity, const char* message) argument [all...] |
/art/runtime/ |
H A D | dex_file_test.cc | 5 * you may not use this file except in compliance with the License. 144 // write to provided file 145 std::unique_ptr<File> file(OS::CreateEmptyFile(location)); 146 CHECK(file.get() != nullptr); 147 if (!file->WriteFully(dex_bytes.get(), length)) { 148 PLOG(FATAL) << "Failed to write base64 as dex file"; 150 if (file->FlushCloseOrErase() != 0) { 151 PLOG(FATAL) << "Could not flush and close test file."; 153 file.reset(); 155 // read dex file 371 ScratchFile file; local [all...] |
H A D | common_runtime_test.cc | 5 * you may not use this file except in compliance with the License. 88 ScratchFile::ScratchFile(File* file) { argument 89 CHECK(file != nullptr); 90 filename_ = file->GetPath(); 91 file_.reset(file); 117 PLOG(WARNING) << "Error closing scratch file."; 301 LOG(FATAL) << "Could not open .dex file '" << location << "': " << error_msg << "\n"; 304 CHECK_EQ(1U, dex_files.size()) << "Expected only one dex file in " << location; 536 // DexPathList has an array dexElements of Elements[] which each contain a dex file.
|
H A D | oat_file.cc | 5 * you may not use this file except in compliance with the License. 75 // 2) Load() to try to open the file. 247 *error_msg = StringPrintf("In oat file '%s' found truncated OatHeader", GetLocation().c_str()); 253 *error_msg = StringPrintf("In oat file '%s' found truncated variable-size data: " 270 *error_msg = StringPrintf("In oat file '%s' found OatDexFile #%zu truncated after dex file " 277 *error_msg = StringPrintf("In oat file '%s' found OatDexFile #%zu with empty location name", 283 *error_msg = StringPrintf("In oat file '%s' found OatDexFile #%zu with truncated dex file " 298 *error_msg = StringPrintf("In oat file ' 811 OpenElfFile(File* file, const std::string& location, uint8_t* requested_base, uint8_t* oat_file_begin, bool writable, bool executable, bool low_4gb, const char* abs_dex_location, std::string* error_msg) argument 883 ElfFileOpen(File* file, uint8_t* oat_file_begin, bool writable, bool executable, bool low_4gb, std::string* error_msg) argument 1004 OpenWritable(File* file, const std::string& location, const char* abs_dex_location, std::string* error_msg) argument 1020 OpenReadable(File* file, const std::string& location, const char* abs_dex_location, std::string* error_msg) argument [all...] |
H A D | oat_file_assistant.cc | 5 * you may not use this file except in compliance with the License. 97 // Clean up the lock file. 125 *error_msg = "Failed to determine lock file"; 158 // See if the oat file is in good shape as is. 172 // See if the odex file is in good shape as is. 186 // See if we can get an up-to-date file by running patchoat. 232 VLOG(oat) << "Oat File Assistant: No relocated oat file found," 233 << " attempting to fall back to interpreting oat file instead."; 272 // Load the primary dex file. 277 LOG(WARNING) << "Attempt to load out-of-date oat file " 467 GivenOatFileStatus(const OatFile& file) argument 480 GivenOatFileIsOutOfDate(const OatFile& file) argument 569 GivenOatFileNeedsRelocation(const OatFile& file) argument 573 GivenOatFileIsUpToDate(const OatFile& file) argument 810 std::string file; local [all...] |
H A D | trace.cc | 5 * you may not use this file except in compliance with the License. 327 // Open trace file if not going directly to ddms. 337 PLOG(ERROR) << "Unable to open trace file '" << trace_filename << "'"; 339 ThrowRuntimeException("Unable to open trace file '%s'", trace_filename); 434 PLOG(WARNING) << "Could not flush trace file."; 440 PLOG(ERROR) << "Could not close trace file."; 670 // Write the secondary file with all the method names. 687 os << StringPrintf("data-file-overflow=%s\n", overflow_ ? "true" : "false"); 718 File file; local 719 if (!file [all...] |
/art/tools/dexfuzz/src/dexfuzz/program/ |
H A D | Program.java | 5 * you may not use this file except in compliance with the License. 66 * After the raw DEX file has been parsed, it is passed into this class 84 * The parsed raw DEX file. 117 * Used if we're loading mutations from a file, so we can find the correct mutator. 127 * A list of all mutations used for loading/dumping mutations from/to a file. 144 * Construct the mutatable Program based on the raw DEX file that was parsed initially. 544 public void writeRawDexFile(DexRandomAccessFile file) throws IOException { argument 545 rawDexFile.write(file); 548 public void updateRawDexFileHeader(DexRandomAccessFile file) throws IOException { argument 549 rawDexFile.updateHeader(file); [all...] |
/art/compiler/ |
H A D | oat_test.cc | 5 * you may not use this file except in compliance with the License. 127 bool WriteElf(File* file, argument 143 return DoWriteElf(file, oat_writer, key_value_store, verify); 146 bool WriteElf(File* file, argument 157 return DoWriteElf(file, oat_writer, key_value_store, verify); 160 bool WriteElf(File* file, argument 170 return DoWriteElf(file, oat_writer, key_value_store, verify); 173 bool DoWriteElf(File* file, argument 181 file); 187 file, [all...] |
/art/patchoat/ |
H A D | patchoat.cc | 5 * you may not use this file except in compliance with the License. 20 #include <sys/file.h> 105 // This function takes an elf file and reads the current patch delta value 110 *error_msg = "Unable to get oat header from elf file."; 114 *error_msg = "Elf file has an invalid oat header"; 139 // Either try to close the file (close=true), or erase it. 140 static bool FinishFile(File* file, bool close) { argument 142 if (file->FlushCloseOrErase() != 0) { 143 PLOG(ERROR) << "Failed to flush and close file."; 148 file 963 std::unique_ptr<File> file; local [all...] |