/dalvik/vm/ |
D | Bits.h | 234 INLINE int readUtf8String(unsigned char const** ppSrc, char* buf, size_t bufLen) in readUtf8String() argument 239 memcpy(buf, *ppSrc, copyLen); in readUtf8String() 240 buf[copyLen] = '\0'; in readUtf8String() 255 char* buf; in readNewUtf8String() local 257 buf = (char*) malloc(length+1); in readNewUtf8String() 259 memcpy(buf, *ppSrc, length); in readNewUtf8String() 260 buf[length] = '\0'; in readNewUtf8String() 265 return buf; in readNewUtf8String() 272 INLINE void set1(u1* buf, u1 val) in set1() argument 274 *buf = (u1)(val); in set1() [all …]
|
D | Profile.c | 112 static inline void storeShortLE(u1* buf, u2 val) in storeShortLE() argument 114 *buf++ = (u1) val; in storeShortLE() 115 *buf++ = (u1) (val >> 8); in storeShortLE() 117 static inline void storeIntLE(u1* buf, u4 val) in storeIntLE() argument 119 *buf++ = (u1) val; in storeIntLE() 120 *buf++ = (u1) (val >> 8); in storeIntLE() 121 *buf++ = (u1) (val >> 16); in storeIntLE() 122 *buf++ = (u1) (val >> 24); in storeIntLE() 124 static inline void storeLongLE(u1* buf, u8 val) in storeLongLE() argument 126 *buf++ = (u1) val; in storeLongLE() [all …]
|
D | Ddm.c | 38 bool dvmDdmHandlePacket(const u1* buf, int dataLen, u1** pReplyBuf, in dvmDdmHandlePacket() argument 98 memcpy(dataArray->contents, buf, dataLen); in dvmDdmHandlePacket() 297 u1 buf[256]; in dvmDdmSendThreadNotification() local 315 if (stringLen > (sizeof(buf) - sizeof(u4)*2) / 2) in dvmDdmSendThreadNotification() 316 stringLen = (sizeof(buf) - sizeof(u4)*2) / 2; in dvmDdmSendThreadNotification() 319 set4BE(&buf[0x00], thread->threadId); in dvmDdmSendThreadNotification() 320 set4BE(&buf[0x04], stringLen); in dvmDdmSendThreadNotification() 323 outChars = (u2*) &buf[0x08]; in dvmDdmSendThreadNotification() 331 set4BE(&buf[0x00], thread->threadId); in dvmDdmSendThreadNotification() 334 dvmDbgDdmSendChunk(type, len, buf); in dvmDdmSendThreadNotification() [all …]
|
D | StdioConverter.c | 44 char buf[kMaxLine+1]; member 233 actual = read(fd, data->buf + data->count, want); in readAndLog() 247 char* cp = data->buf; in readAndLog() 248 const char* start = data->buf; in readAndLog() 262 if (start == data->buf && data->count == kMaxLine) { in readAndLog() 263 data->buf[kMaxLine] = '\0'; in readAndLog() 273 if (start != data->buf) { in readAndLog() 274 if (start >= data->buf + data->count) { in readAndLog() 279 int remaining = data->count - (start - data->buf); in readAndLog() 280 memmove(data->buf, start, remaining); in readAndLog()
|
D | JarFile.c | 46 char *buf, *c; in openAlternateSuffix() local 52 buf = malloc(bufLen); in openAlternateSuffix() 53 if (buf == NULL) { in openAlternateSuffix() 61 memcpy(buf, fileName, fileNameLen + 1); in openAlternateSuffix() 62 c = strrchr(buf, '.'); in openAlternateSuffix() 69 fd = open(buf, flags); in openAlternateSuffix() 71 *pCachedName = buf; in openAlternateSuffix() 74 LOGV("Couldn't open %s: %s\n", buf, strerror(errno)); in openAlternateSuffix() 76 free(buf); in openAlternateSuffix()
|
D | Native.c | 251 char buf[256]; in dvmCreateSystemLibraryName() local 254 len = snprintf(buf, sizeof(buf), OS_SHARED_LIB_FORMAT_STR, libName); in dvmCreateSystemLibraryName() 255 if (len >= (int) sizeof(buf)) in dvmCreateSystemLibraryName() 258 return strdup(buf); in dvmCreateSystemLibraryName() 766 static void appendValue(char type, const JValue value, char* buf, size_t n, in appendValue() argument 769 size_t len = strlen(buf); in appendValue() 771 buf[len - 1] = '.'; in appendValue() 772 buf[len - 2] = '.'; in appendValue() 773 buf[len - 3] = '.'; in appendValue() 776 char* p = buf + len; in appendValue()
|
D | Ddm.h | 28 bool dvmDdmHandlePacket(const u1* buf, int dataLen, u1** pReplyBuf,
|
D | Debugger.c | 1101 const u1* buf) in dvmDbgSetArrayElements() argument 1122 copyValuesFromBE(data + firstIndex*width, buf, count, width); in dvmDbgSetArrayElements() 1134 ObjectId id = dvmReadObjectId(&buf); in dvmDbgSetArrayElements() 1514 void dvmDbgGetFieldValue(ObjectId objectId, FieldId fieldId, u1* buf, in dvmDbgGetFieldValue() argument 1528 set1(buf, intVal != 0); in dvmDbgGetFieldValue() 1533 set1(buf, intVal); in dvmDbgGetFieldValue() 1539 set2BE(buf, intVal); in dvmDbgGetFieldValue() 1545 set4BE(buf, intVal); in dvmDbgGetFieldValue() 1551 dvmSetObjectId(buf, objectToObjectId(objVal)); in dvmDbgGetFieldValue() 1557 set8BE(buf, longVal); in dvmDbgGetFieldValue() [all …]
|
/dalvik/tools/hprof-conv/ |
D | HprofConv.c | 275 static uint16_t get2BE(const unsigned char* buf) in get2BE() argument 279 val = (buf[0] << 8) | buf[1]; in get2BE() 286 static uint32_t get4BE(const unsigned char* buf) in get4BE() argument 290 val = (buf[0] << 24) | (buf[1] << 16) | (buf[2] << 8) | buf[3]; in get4BE() 297 static void set4BE(unsigned char* buf, uint32_t val) in set4BE() argument 299 buf[0] = val >> 24; in set4BE() 300 buf[1] = val >> 16; in set4BE() 301 buf[2] = val >> 8; in set4BE() 302 buf[3] = val; in set4BE() 324 const unsigned char* buf = origBuf; in computeClassDumpLen() local [all …]
|
/dalvik/vm/jdwp/ |
D | JdwpHandler.c | 120 const u1* buf, int dataLen, ExpandBuf* pReply, in finishInvoke() argument 132 numArgs = read4BE(&buf); in finishInvoke() 149 typeTag = read1(&buf); in finishInvoke() 151 value = jdwpReadValue(&buf, width); in finishInvoke() 157 options = read4BE(&buf); in finishInvoke() 211 static JdwpError handleVM_Version(JdwpState* state, const u1* buf, in handleVM_Version() argument 237 const u1* buf, int dataLen, ExpandBuf* pReply) in handleVM_ClassesBySignature() argument 244 classDescriptor = readNewUtf8String(&buf, &strLen); in handleVM_ClassesBySignature() 288 const u1* buf, int dataLen, ExpandBuf* pReply) in handleVM_AllThreads() argument 313 const u1* buf, int dataLen, ExpandBuf* pReply) in handleVM_TopLevelThreadGroups() argument [all …]
|
D | Jdwp.h | 56 INLINE void dvmSetFieldId(u1* buf, FieldId val) { return set4BE(buf, val); } in dvmSetFieldId() argument 57 INLINE void dvmSetMethodId(u1* buf, MethodId val) { return set4BE(buf, val); } in dvmSetMethodId() argument 58 INLINE void dvmSetObjectId(u1* buf, ObjectId val) { return set8BE(buf, val); } in dvmSetObjectId() argument 59 INLINE void dvmSetRefTypeId(u1* buf, RefTypeId val) { return set8BE(buf, val); } in dvmSetRefTypeId() argument 60 INLINE void dvmSetFrameId(u1* buf, FrameId val) { return set8BE(buf, val); } in dvmSetFrameId() argument
|
D | JdwpSocket.c | 544 const unsigned char* buf = packetBuf; 553 length = read4BE(&buf); 554 id = read4BE(&buf); 555 flags = read1(&buf); 558 error = read2BE(&buf); 561 cmdSet = read1(&buf); 562 cmd = read1(&buf); 565 dataLen = length - (buf - packetBuf); 571 dvmPrintHexDumpDbg(buf, dataLen, LOG_TAG); 581 const unsigned char* buf = netState->inputBuffer; in handlePacket() local [all …]
|
D | JdwpAdb.c | 427 const unsigned char* buf = netState->inputBuffer; in handlePacket() local 437 length = read4BE(&buf); in handlePacket() 438 id = read4BE(&buf); in handlePacket() 439 flags = read1(&buf); in handlePacket() 442 error = read2BE(&buf); in handlePacket() 445 cmdSet = read1(&buf); in handlePacket() 446 cmd = read1(&buf); in handlePacket() 450 dataLen = length - (buf - netState->inputBuffer); in handlePacket() 459 dvmJdwpProcessRequest(state, &hdr, buf, dataLen, pReply); in handlePacket()
|
D | JdwpHandler.h | 42 const u1* buf, int dataLen, ExpandBuf* pReply);
|
/dalvik/vm/compiler/codegen/arm/ |
D | ArchUtility.c | 28 static char * decodeRegList(int vector, char *buf) in decodeRegList() argument 32 buf[0] = 0; in decodeRegList() 36 sprintf(buf + strlen(buf), ", r%d", i); in decodeRegList() 39 sprintf(buf, "r%d", i); in decodeRegList() 43 return buf; in decodeRegList() 70 static void buildInsnString(char *fmt, ArmLIR *lir, char* buf, in buildInsnString() argument 74 char *bufEnd = &buf[size-1]; in buildInsnString() 218 if (buf+strlen(tbuf) <= bufEnd) { in buildInsnString() 219 strcpy(buf, tbuf); in buildInsnString() 220 buf += strlen(tbuf); in buildInsnString() [all …]
|
/dalvik/libnativehelper/ |
D | JNIHelp.c | 59 static void getExceptionSummary(JNIEnv* env, jthrowable exception, char* buf, size_t bufLen) in getExceptionSummary() argument 82 snprintf(buf, bufLen, "%s: %s", classNameChars, messageChars); in getExceptionSummary() 86 snprintf(buf, bufLen, "%s: <error getting message>", classNameChars); in getExceptionSummary() 90 strncpy(buf, classNameChars, bufLen); in getExceptionSummary() 91 buf[bufLen - 1] = '\0'; in getExceptionSummary() 104 snprintf(buf, bufLen, "%s", "<error getting class name>"); in getExceptionSummary() 111 static void printStackTrace(JNIEnv* env, jthrowable exception, char* buf, size_t bufLen) in printStackTrace() argument 146 (*env)->GetStringUTFRegion(env, messageStr, 0, messageStrLength, buf); in printStackTrace() 148 buf[messageStrLength] = '\0'; in printStackTrace() 164 getExceptionSummary(env, exception, buf, bufLen); in printStackTrace() [all …]
|
/dalvik/vm/alloc/ |
D | DdmHeap.c | 61 u1 *buf, *b; in dvmDdmSendHeapInfo() local 63 buf = (u1 *)malloc(HPIF_SIZE(1)); in dvmDdmSendHeapInfo() 64 if (buf == NULL) { in dvmDdmSendHeapInfo() 67 b = buf; in dvmDdmSendHeapInfo() 121 assert((intptr_t)b == (intptr_t)buf + (intptr_t)HPIF_SIZE(1)); in dvmDdmSendHeapInfo() 123 dvmDbgDdmSendChunk(CHUNK_TYPE("HPIF"), b - buf, buf); in dvmDdmSendHeapInfo() 178 u1 *buf; member 195 assert(ctx->buf <= ctx->pieceLenField && in flush_hpsg_chunk() 201 dvmDbgDdmSendChunk(ctx->type, ctx->p - ctx->buf, ctx->buf); in flush_hpsg_chunk() 205 ctx->p = ctx->buf; in flush_hpsg_chunk() [all …]
|
D | HeapDebug.c | 51 char buf[128]; in insertProcessName() local 52 ssize_t n = read(fd, buf, sizeof(buf) - 1); in insertProcessName() 58 memcpy(name, buf, n); in insertProcessName() 64 buf[n] = '\0'; in insertProcessName() 65 char *dot = strrchr(buf, '.'); in insertProcessName() 70 dot = strrchr(buf, '/'); in insertProcessName() 84 memcpy(name, buf, PROC_NAME_LEN); in insertProcessName() 87 if (strcmp(buf, "zygote") != 0) { in insertProcessName()
|
/dalvik/vm/hprof/ |
D | HprofOutput.c | 24 #define U2_TO_BUF_BE(buf, offset, value) \ argument 26 unsigned char *buf_ = (unsigned char *)(buf); \ 33 #define U4_TO_BUF_BE(buf, offset, value) \ argument 35 unsigned char *buf_ = (unsigned char *)(buf); \ 44 #define U8_TO_BUF_BE(buf, offset, value) \ argument 46 unsigned char *buf_ = (unsigned char *)(buf); \ 93 unsigned char buf[4]; in hprofContextInit() local 106 U4_TO_BUF_BE(buf, 0, sizeof(void *)); in hprofContextInit() 107 fwrite(buf, 1, sizeof(u4), fp); in hprofContextInit() 119 U4_TO_BUF_BE(buf, 0, (u4)(nowMs >> 32)); in hprofContextInit() [all …]
|
/dalvik/tools/dexdeps/src/com/android/dexdeps/ |
D | Output.java | 252 char[] buf = new char[targetLen + arrayDepth * 2]; in descriptorToDot() local 258 buf[i] = (ch == '/') ? '.' : ch; in descriptorToDot() 263 buf[i++] = '['; in descriptorToDot() 264 buf[i++] = ']'; in descriptorToDot() 266 assert i == buf.length; in descriptorToDot() 268 return new String(buf); in descriptorToDot()
|
/dalvik/tools/dmtracedump/ |
D | TraceDump.c | 1480 char buf[80]; in printInclusiveMethod() local 1501 sprintf(buf, "[%d]", relative->index); in printInclusiveMethod() 1503 int len = strlen(buf); in printInclusiveMethod() 1506 sprintf(buf, "<a href=\"#m%d\">[%d]", in printInclusiveMethod() 1521 space_ptr, buf, anchor_close, in printInclusiveMethod() 1528 space_ptr, buf, anchor_close, in printInclusiveMethod() 1538 space_ptr, buf, anchor_close, in printInclusiveMethod() 1545 space_ptr, buf, anchor_close, in printInclusiveMethod() 1802 char buf[40]; in printInclusiveProfile() local 1832 sprintf(buf, "[%d]", ii); in printInclusiveProfile() [all …]
|
D | CreateTestTrace.c | 77 char buf[BUF_SIZE]; variable 139 while (fgets(buf, BUF_SIZE, inputFp)) { in parseInputFile() 140 char *cp = buf; in parseInputFile() 171 while (fgets(buf, BUF_SIZE, inputFp)) { in parseInputFile() 177 char *cp = buf; in parseInputFile() 254 printf("Indent: %d; IndentLevel: %d; Line: %s", indent, indentLevel, buf); in parseInputFile() 271 fprintf(stderr, "Error: line %d: %s", linenum, buf); in parseInputFile() 282 fprintf(stderr, "Error: line %d: %s", linenum, buf); in parseInputFile() 290 fprintf(stderr, "Error: line %d: %s", linenum, buf); in parseInputFile()
|
/dalvik/libnativehelper/include/nativehelper/ |
D | jni.h | 513 jclass DefineClass(const char *name, jobject loader, const jbyte* buf, in DefineClass() 515 { return functions->DefineClass(this, name, loader, buf, bufLen); } in DefineClass() 940 jboolean* buf) in GetBooleanArrayRegion() 941 { functions->GetBooleanArrayRegion(this, array, start, len, buf); } in GetBooleanArrayRegion() 943 jbyte* buf) in GetByteArrayRegion() 944 { functions->GetByteArrayRegion(this, array, start, len, buf); } in GetByteArrayRegion() 946 jchar* buf) in GetCharArrayRegion() 947 { functions->GetCharArrayRegion(this, array, start, len, buf); } in GetCharArrayRegion() 949 jshort* buf) in GetShortArrayRegion() 950 { functions->GetShortArrayRegion(this, array, start, len, buf); } in GetShortArrayRegion() [all …]
|
/dalvik/dx/src/com/android/dx/util/ |
D | TwoColumnOutput.java | 232 private static void appendNewlineIfNecessary(StringBuffer buf, in appendNewlineIfNecessary() argument 235 int len = buf.length(); in appendNewlineIfNecessary() 237 if ((len != 0) && (buf.charAt(len - 1) != '\n')) { in appendNewlineIfNecessary()
|
/dalvik/dx/src/com/android/dx/cf/direct/ |
D | ClassPathOpener.java | 207 byte[] buf = new byte[20000]; in processArchive() 233 int amt = in.read(buf); in processArchive() 238 baos.write(buf, 0, amt); in processArchive()
|