Home
last modified time | relevance | path

Searched refs:offset (Results 1 – 25 of 140) sorted by relevance

123456

/tools/dexter/slicer/
Dwriter.cc102 SLICER_EXTRA(auto offset = data.size()); in WriteEncodedValue()
190 auto ptr = data.ptr<const dex::u1>(offset); in WriteEncodedValue()
191 auto size = data.size() - offset; in WriteEncodedValue()
227 dex::u4 offset = section.SectionOffset(); in CopySection() local
229 SLICER_CHECK(offset >= sizeof(dex::Header)); in CopySection()
230 SLICER_CHECK(offset + size <= image_size); in CopySection()
232 ::memcpy(image + offset, section.data(), size); in CopySection()
257 dex::u4 offset = 0; in CreateImage() local
261 offset += sizeof(dex::Header); in CreateImage()
262 offset += dex_->string_ids.Init(offset, dex_ir_->strings.size()); in CreateImage()
[all …]
Dbytecode_encoder.cc126 bytecode->offset = offset_; in Visit()
212 if (label->offset != kInvalidOffset) { in Visit()
213 assert(label->offset <= offset_); in Visit()
214 A = label->offset - offset_; in Visit()
229 if (label->offset != kInvalidOffset) { in Visit()
231 assert(label->offset <= offset_); in Visit()
232 A = label->offset - offset_; in Visit()
247 if (label->offset != kInvalidOffset) { in Visit()
248 assert(label->offset <= offset_); in Visit()
249 B = label->offset - offset_; in Visit()
[all …]
Dcode_ir.cc64 try_block_begin->offset = tryBlock.start_addr; in DissasembleTryBlocks()
68 try_block_end->offset = tryBlock.start_addr + tryBlock.insn_count; in DissasembleTryBlocks()
123 dbg_header->offset = 0; in DissasembleDebugInfo()
130 annotation->offset = 0; in DissasembleDebugInfo()
139 annotation->offset = 0; in DissasembleDebugInfo()
233 annotation->offset = address; in DissasembleDebugInfo()
248 dex::u4 offset = ptr - begin; in DissasembleBytecode() local
253 instr = DecodePackedSwitch(ptr, offset); in DissasembleBytecode()
257 instr = DecodeSparseSwitch(ptr, offset); in DissasembleBytecode()
261 instr = DecodeArrayData(ptr, offset); in DissasembleBytecode()
[all …]
Dreader.cc280 ir::AnnotationsDirectory* Reader::ExtractAnnotations(dex::u4 offset) { in ExtractAnnotations() argument
281 if (offset == 0) { in ExtractAnnotations()
285 SLICER_CHECK(offset % 4 == 0); in ExtractAnnotations()
288 auto& ir_annotations = annotations_directories_[offset]; in ExtractAnnotations()
292 auto dex_annotations = dataPtr<dex::AnnotationsDirectoryItem>(offset); in ExtractAnnotations()
314 ir::Annotation* Reader::ExtractAnnotationItem(dex::u4 offset) { in ExtractAnnotationItem() argument
315 SLICER_CHECK(offset != 0); in ExtractAnnotationItem()
318 auto& ir_annotation = annotations_[offset]; in ExtractAnnotationItem()
320 auto dexAnnotationItem = dataPtr<dex::AnnotationItem>(offset); in ExtractAnnotationItem()
328 ir::AnnotationSet* Reader::ExtractAnnotationSet(dex::u4 offset) { in ExtractAnnotationSet() argument
[all …]
/tools/apksig/src/main/java/com/android/apksig/internal/util/
DByteArrayDataSink.java49 public void consume(byte[] buf, int offset, int length) throws IOException { in consume() argument
50 if (offset < 0) { in consume()
53 throw new IndexOutOfBoundsException("offset: " + offset); in consume()
55 if (offset > buf.length) { in consume()
59 "offset: " + offset + ", buf.length: " + buf.length); in consume()
66 System.arraycopy(buf, offset, mArray, mSize, length); in consume()
116 public ByteBuffer getByteBuffer(long offset, int size) { in getByteBuffer() argument
117 checkChunkValid(offset, size); in getByteBuffer()
120 return ByteBuffer.wrap(mArray, (int) offset, size).slice(); in getByteBuffer()
124 public void feed(long offset, long size, DataSink sink) throws IOException { in feed() argument
[all …]
DChainedDataSource.java43 public void feed(long offset, long size, DataSink sink) throws IOException { in feed() argument
44 if (offset + size > mTotalSize) { in feed()
50 if (offset >= src.size()) { in feed()
51 offset -= src.size(); in feed()
56 long remaining = src.size() - offset; in feed()
58 src.feed(offset, size, sink); in feed()
63 src.feed(offset, remaining, sink); in feed()
65 offset = 0; in feed()
70 public ByteBuffer getByteBuffer(long offset, int size) throws IOException { in getByteBuffer() argument
71 if (offset + size > mTotalSize) { in getByteBuffer()
[all …]
DFileChannelDataSource.java56 public FileChannelDataSource(FileChannel channel, long offset, long size) { in FileChannelDataSource() argument
57 if (offset < 0) { in FileChannelDataSource()
64 mOffset = offset; in FileChannelDataSource()
82 public FileChannelDataSource slice(long offset, long size) { in slice() argument
84 checkChunkValid(offset, size, sourceSize); in slice()
85 if ((offset == 0) && (size == sourceSize)) { in slice()
89 return new FileChannelDataSource(mChannel, mOffset + offset, size); in slice()
93 public void feed(long offset, long size, DataSink sink) throws IOException { in feed() argument
95 checkChunkValid(offset, size, sourceSize); in feed()
100 long chunkOffsetInFile = mOffset + offset; in feed()
[all …]
DByteBufferDataSource.java55 public ByteBuffer getByteBuffer(long offset, int size) { in getByteBuffer() argument
56 checkChunkValid(offset, size); in getByteBuffer()
59 int chunkPosition = (int) offset; in getByteBuffer()
78 public void copyTo(long offset, int size, ByteBuffer dest) { in copyTo() argument
79 dest.put(getByteBuffer(offset, size)); in copyTo()
83 public void feed(long offset, long size, DataSink sink) throws IOException { in feed() argument
87 sink.consume(getByteBuffer(offset, (int) size)); in feed()
91 public ByteBufferDataSource slice(long offset, long size) { in slice() argument
92 if ((offset == 0) && (size == mSize)) { in slice()
99 getByteBuffer(offset, (int) size), in slice()
[all …]
/tools/metalava/src/main/java/com/android/tools/metalava/model/psi/
DJavadoc.kt135 val offset = if (lastTag != null) { in mergeDocumentation() constant
140 return insertInto(doc, "@return $newText", offset) in mergeDocumentation()
143 val offset = if (append) in mergeDocumentation() constant
146 return insertInto(doc, newText, offset) in mergeDocumentation()
163 val offset = when { in mergeDocumentation() constant
169 return insertInto(doc, "$tagName $newText", offset) in mergeDocumentation()
172 val offset = if (append) in mergeDocumentation() constant
175 return insertInto(doc, newText, offset) in mergeDocumentation()
235 …val offset = if (initialOffset > 4 && existingDoc.regionMatches(initialOffset - 4, "\n * ", 0, 4, … in insertInto() constant
244 val prefix = existingDoc.substring(0, offset) in insertInto()
[all …]
/tools/apkzlib/src/main/java/com/android/tools/build/apkzlib/sign/
DZFileDataSource.java42 private final long offset; field in ZFileDataSource
57 offset = 0; in ZFileDataSource()
66 public ZFileDataSource(@Nonnull ZFile file, long offset, long size) { in ZFileDataSource() argument
67 Preconditions.checkArgument(offset >= 0, "offset < 0"); in ZFileDataSource()
70 this.offset = offset; in ZFileDataSource()
90 public DataSource slice(long offset, long size) { in slice() argument
92 checkChunkValid(offset, size, sourceSize); in slice()
93 if ((offset == 0) && (size == sourceSize)) { in slice()
97 return new ZFileDataSource(file, this.offset + offset, size); in slice()
101 public void feed(long offset, long size, @Nonnull DataSink sink) throws IOException { in feed() argument
[all …]
/tools/apksig/src/test/java/com/android/apksig/util/
DDataSourceTestBase.java223 String expectedContents, DataSource ds, long offset, int size) throws IOException { in assertSliceEquals() argument
224 DataSource slice = ds.slice(offset, size); in assertSliceEquals()
229 protected static void assertSliceThrowsIOOB(DataSource ds, long offset, int size) { in assertSliceThrowsIOOB() argument
231 ds.slice(offset, size); in assertSliceThrowsIOOB()
237 String expectedContents, DataSource ds, long offset, int size) throws IOException { in assertGetByteBufferEquals() argument
238 ByteBuffer buf = ds.getByteBuffer(offset, size); in assertGetByteBufferEquals()
245 protected static void assertGetByteBufferThrowsIOOB(DataSource ds, long offset, int size) in assertGetByteBufferThrowsIOOB() argument
248 ds.getByteBuffer(offset, size); in assertGetByteBufferThrowsIOOB()
254 String expectedFedContents, DataSource ds, long offset, int size) throws IOException { in assertFeedEquals() argument
256 ds.feed(offset, size, out); in assertFeedEquals()
[all …]
/tools/external/fat32lib/src/main/java/de/waldheinz/fs/fat/
DLittleEndian.java40 public static int getUInt8(byte[] src, int offset) { in getUInt8() argument
41 return src[offset] & 0xFF; in getUInt8()
50 public static int getUInt16(byte[] src, int offset) { in getUInt16() argument
51 final int v0 = src[offset + 0] & 0xFF; in getUInt16()
52 final int v1 = src[offset + 1] & 0xFF; in getUInt16()
62 public static long getUInt32(byte[] src, int offset) { in getUInt32() argument
63 final long v0 = src[offset + 0] & 0xFF; in getUInt32()
64 final long v1 = src[offset + 1] & 0xFF; in getUInt32()
65 final long v2 = src[offset + 2] & 0xFF; in getUInt32()
66 final long v3 = src[offset + 3] & 0xFF; in getUInt32()
[all …]
DSector.java32 private final long offset; field in Sector
41 protected Sector(BlockDevice device, long offset, int size) { in Sector() argument
42 this.offset = offset; in Sector()
59 device.read(offset, buffer); in read()
85 device.write(offset, buffer); in write()
89 protected int get16(int offset) { in get16() argument
90 return buffer.getShort(offset) & 0xffff; in get16()
93 protected long get32(int offset) { in get32() argument
94 return buffer.getInt(offset) & 0xffffffff; in get32()
97 protected int get8(int offset) { in get8() argument
[all …]
DClusterChain.java197 public void readData(long offset, ByteBuffer dest) in readData() argument
207 int chainIdx = (int) (offset / clusterSize); in readData()
208 if (offset % clusterSize != 0) { in readData()
209 int clusOfs = (int) (offset % clusterSize); in readData()
211 (int) (clusterSize - (offset % clusterSize) - 1)); in readData()
216 offset += size; in readData()
243 public void writeData(long offset, ByteBuffer srcBuf) throws IOException { in writeData() argument
249 final long minSize = offset + len; in writeData()
256 int chainIdx = (int) (offset / clusterSize); in writeData()
257 if (offset % clusterSize != 0) { in writeData()
[all …]
DFatUtils.java46 long offset = resSects * sectSize; in getFatOffset() local
49 offset += fatNr * fatSize; in getFatOffset()
51 return offset; in getFatOffset()
66 long offset = getFatOffset(bs, 0); in getRootDirOffset() local
68 offset += fats * sectsPerFat * sectSize; in getRootDirOffset()
70 return offset; in getRootDirOffset()
81 long offset = getRootDirOffset(bs); in getFilesOffset() local
83 offset += bs.getRootDirEntryCount() * 32; in getFilesOffset()
85 return offset; in getFilesOffset()
/tools/apkzlib/src/main/java/com/android/tools/build/apkzlib/zip/
DZipField.java66 protected final int offset; field in ZipField
93 ZipField(int offset, int size, @Nonnull String name, ZipFieldInvariant... invariants) { in ZipField() argument
94 Preconditions.checkArgument(offset >= 0, "offset >= 0"); in ZipField()
98 this.offset = offset; in ZipField()
112 ZipField(int offset, int size, long expected, @Nonnull String name) { in ZipField() argument
113 Preconditions.checkArgument(offset >= 0, "offset >= 0"); in ZipField()
117 this.offset = offset; in ZipField()
296 int offset() { in offset() method in ZipField
297 return offset; in offset()
307 return offset + size; in endOffset()
[all …]
DZFile.java1325 private void writeEntry(@Nonnull StoredEntry entry, long offset) throws IOException { in writeEntry() argument
1336 directWrite(offset, headerData); in writeEntry()
1349 long writeOffset = offset + headerData.length; in writeEntry()
1361 entry.replaceSourceFromZip(offset); in writeEntry()
2271 public void directWrite(long offset, @Nonnull byte[] data, int start, int count) in directWrite() argument
2275 Preconditions.checkArgument(offset >= 0, "offset < 0"); in directWrite()
2289 raf.seek(offset); in directWrite()
2301 public void directWrite(long offset, @Nonnull byte[] data) throws IOException { in directWrite() argument
2303 directWrite(offset, data, 0, data.length); in directWrite()
2334 public int directRead(long offset, @Nonnull byte[] data, int start, int count) in directRead() argument
[all …]
/tools/dexter/slicer/export/slicer/
Dreader.h74 ir::AnnotationsDirectory* ExtractAnnotations(dex::u4 offset);
75 ir::Annotation* ExtractAnnotationItem(dex::u4 offset);
76 ir::AnnotationSet* ExtractAnnotationSet(dex::u4 offset);
77 ir::AnnotationSetRefList* ExtractAnnotationSetRefList(dex::u4 offset);
87 ir::EncodedArray* ExtractEncodedArray(dex::u4 offset);
95 ir::TypeList* ExtractTypeList(dex::u4 offset);
100 ir::DebugInfo* ExtractDebugInfo(dex::u4 offset);
101 ir::Code* ExtractCode(dex::u4 offset);
106 const T* ptr(int offset) const { in ptr() argument
107 SLICER_CHECK(offset >= 0 && offset + sizeof(T) <= size_); in ptr()
[all …]
/tools/test/connectivity/acts/framework/acts/test_utils/bt/
Dgatts_lib.py151 offset = event['data']['offset']
187 format(request_id, status, offset, data))
188 data = data[offset:offset + mtu - 1]
190 self.gatt_server, 0, request_id, status, offset, data)
283 offset = 0
305 "data] [{}, {}, {}, {}]".format(request_id, status, offset,
308 self.gatt_server, 0, request_id, status, offset, data)
324 offset = 0
350 offset = event['data']['offset']
373 self.gatt_server, 0, request_id, status, offset, [1])
[all …]
/tools/test/connectivity/acts/framework/acts/test_utils/abstract_devices/
Dbluetooth_device.py159 handle, offset, value): argument
182 handle, offset, argument
214 offset, value): argument
222 handle, offset, max_bytes): argument
464 handle, offset, value): argument
523 handle, offset, argument
612 offset, value): argument
924 handle, offset, value): argument
940 result = self.device.gattc_lib.writeCharById(handle, offset, value)
949 self, peer_identifier, handle, offset, value, reliable_mode=False): argument
[all …]
/tools/apkzlib/src/test/java/com/android/tools/build/apkzlib/zfile/
DApkAlignmentTest.java70 long offset = in soFilesUncompressedAndAligned() local
72 assertTrue(offset % 4096 == 0); in soFilesUncompressedAndAligned()
91 long offset = in soFilesMergedFromZipsCanBeUncompressedAndAligned() local
93 assertFalse(offset % 4096 == 0); in soFilesMergedFromZipsCanBeUncompressedAndAligned()
123 long offset = in soFilesMergedFromZipsCanBeUncompressedAndAligned() local
125 assertTrue(offset % 4096 == 0); in soFilesMergedFromZipsCanBeUncompressedAndAligned()
167 long offset = in soFilesUncompressedAndNotAligned() local
169 assertTrue(offset % 4096 != 0); in soFilesUncompressedAndNotAligned()
188 long offset = in soFilesMergedFromZipsCanBeUncompressedAndNotAligned() local
190 assertFalse(offset % 4096 == 0); in soFilesMergedFromZipsCanBeUncompressedAndNotAligned()
[all …]
/tools/test/connectivity/acts/framework/acts/controllers/fuchsia_lib/bt/
Dgattc_lib.py102 def writeCharById(self, id, offset, write_value): argument
116 "offset": offset,
124 def writeLongCharById(self, id, offset, write_value, reliable_mode=False): argument
139 "offset": offset,
148 def writeLongDescById(self, id, offset, write_value): argument
162 "offset": offset,
281 def readLongDescriptorById(self, id, offset, max_bytes): argument
295 "offset": offset,
303 def writeDescriptorById(self, id, offset, write_value): argument
323 def readLongCharacteristicById(self, id, offset, max_bytes): argument
[all …]
/tools/test/connectivity/acts_tests/tests/google/fuchsia/bt/
Dcommand_input.py787 offset = int(args[0])
812 desc_id, offset, write_value)
838 offset = int(args[0])
860 desc_id, offset, max_bytes)
886 offset = int(args[0])
903 char_id, offset, max_bytes)
931 offset = int(args[0])
951 char_id, offset, write_value)
1028 offset = int(args[1])
1034 self.unique_mac_addr_id, id, offset, write_value)
[all …]
/tools/apksig/src/main/java/com/android/apksig/internal/zip/
DZipUtils.java58 ByteBuffer zipEndOfCentralDirectory, long offset) { in setZipEocdCentralDirectoryOffset() argument
63 offset); in setZipEocdCentralDirectoryOffset()
242 public static int getUnsignedInt16(ByteBuffer buffer, int offset) { in getUnsignedInt16() argument
243 return buffer.getShort(offset) & 0xffff; in getUnsignedInt16()
250 static void setUnsignedInt16(ByteBuffer buffer, int offset, int value) { in setUnsignedInt16() argument
254 buffer.putShort(offset, (short) value); in setUnsignedInt16()
257 static void setUnsignedInt32(ByteBuffer buffer, int offset, long value) { in setUnsignedInt32() argument
261 buffer.putInt(offset, (int) value); in setUnsignedInt32()
271 static long getUnsignedInt32(ByteBuffer buffer, int offset) { in getUnsignedInt32() argument
272 return buffer.getInt(offset) & 0xffffffffL; in getUnsignedInt32()
/tools/tradefederation/core/common_util/com/android/tradefed/util/
DByteArrayUtil.java44 byte[] bytes, int offset, int length, int containerSize) { in getByteBuffer() argument
47 data[i] = bytes[offset + i]; in getByteBuffer()
63 public static int getInt(byte[] bytes, int offset, int length) { in getInt() argument
64 return getByteBuffer(bytes, offset, length, 4).getInt(); in getInt()
78 public static long getLong(byte[] bytes, int offset, int length) { in getLong() argument
79 return getByteBuffer(bytes, offset, length, 8).getLong(); in getLong()
89 public static String getString(byte[] bytes, int offset, int length) { in getString() argument
90 return new String(Arrays.copyOfRange(bytes, offset, offset + length)); in getString()

123456