Searched defs:buf (Results 1 - 25 of 37) sorted by relevance

12

/dalvik/vm/compiler/codegen/mips/
H A DArchUtility.cpp34 static void buildInsnString(const char *fmt, MipsLIR *lir, char* buf, argument
38 char *bufEnd = &buf[size-1];
149 if (buf+strlen(tbuf) <= bufEnd) {
150 strcpy(buf, tbuf);
151 buf += strlen(tbuf);
157 *buf++ = *fmt++;
159 if (buf == bufEnd)
162 *buf = 0;
167 char buf[256];
168 buf[
[all...]
/dalvik/dexgen/src/com/android/dexgen/util/
H A DTwoColumnOutput.java229 * @param buf {@code non-null;} the buffer in question
232 private static void appendNewlineIfNecessary(StringBuffer buf, argument
235 int len = buf.length();
237 if ((len != 0) && (buf.charAt(len - 1) != '\n')) {
/dalvik/dx/src/com/android/dx/util/
H A DTwoColumnOutput.java229 * @param buf {@code non-null;} the buffer in question
232 private static void appendNewlineIfNecessary(StringBuffer buf, argument
235 int len = buf.length();
237 if ((len != 0) && (buf.charAt(len - 1) != '\n')) {
/dalvik/vm/
H A DStdioConverter.cpp36 char buf[kMaxLine+1]; member in struct:BufferedData
214 actual = read(fd, data->buf + data->count, want);
228 char* cp = data->buf;
229 const char* start = data->buf;
234 //ALOGW("GOT %d at %d '%s'", cp - start, start - data->buf, start);
243 if (start == data->buf && data->count == kMaxLine) {
244 data->buf[kMaxLine] = '\0';
254 if (start != data->buf) {
255 if (start >= data->buf + data->count) {
260 int remaining = data->count - (start - data->buf);
[all...]
H A DBits.h234 INLINE int readUtf8String(unsigned char const** ppSrc, char* buf, size_t bufLen) argument
239 memcpy(buf, *ppSrc, copyLen);
240 buf[copyLen] = '\0';
255 char* buf; local
257 buf = (char*) malloc(length+1);
259 memcpy(buf, *ppSrc, length);
260 buf[length] = '\0';
265 return buf;
272 INLINE void set1(u1* buf, u1 val) argument
274 *buf
280 set2BE(u1* buf, u2 val) argument
289 set4BE(u1* buf, u4 val) argument
300 set8BE(u1* buf, u8 val) argument
315 set2LE(u1* buf, u2 val) argument
324 set4LE(u1* buf, u4 val) argument
335 set8LE(u1* buf, u8 val) argument
350 setUtf8String(u1* buf, const u1* str) argument
[all...]
H A DJarFile.cpp48 char *buf, *c; local
54 buf = (char*)malloc(bufLen);
55 if (buf == NULL) {
63 memcpy(buf, fileName, fileNameLen + 1);
64 c = strrchr(buf, '.');
71 fd = open(buf, flags);
73 *pCachedName = buf;
76 ALOGV("Couldn't open %s: %s", buf, strerror(errno));
78 free(buf);
H A DRawDexFile.cpp48 struct stat buf; local
49 int result = fstat(fd, &buf);
56 *modTime = (u4) buf.st_mtime;
57 *size = (size_t) buf.st_size;
58 assert((size_t) buf.st_size == buf.st_size);
H A DDdm.cpp29 * "buf" contains a full JDWP packet, possibly with multiple chunks. We
39 bool dvmDdmHandlePacket(const u1* buf, int dataLen, u1** pReplyBuf, argument
68 memcpy(dataArray->contents, buf, dataLen);
146 ALOGV("dvmHandleDdm returning type=%.4s buf=%p len=%d",
262 u1 buf[256]; local
280 if (stringLen > (sizeof(buf) - sizeof(u4)*2) / 2) {
281 stringLen = (sizeof(buf) - sizeof(u4)*2) / 2;
285 set4BE(&buf[0x00], thread->threadId);
286 set4BE(&buf[0x04], stringLen);
289 outChars = (u2*)(void*)&buf[
323 u1 buf[bufLen]; local
378 u1* buf = tmpBuf; local
[all...]
H A DProfile.h48 u1* buf; member in struct:MethodTraceState
H A DUtfString.cpp309 int start, int len, char* buf)
312 convertUtf16ToUtf8(buf, data, len);
308 dvmGetStringUtfRegion(const StringObject* jstr, int start, int len, char* buf) argument
H A DMisc.cpp801 char* buf = new char[length]; local
805 result = vsnprintf(buf, length, format, backup_ap);
810 dst->append(buf, result);
811 delete[] buf;
814 delete[] buf;
H A DNative.cpp250 char buf[256]; local
253 len = snprintf(buf, sizeof(buf), OS_SHARED_LIB_FORMAT_STR, libName);
254 if (len >= (int) sizeof(buf))
257 return strdup(buf);
H A DProfile.cpp150 static inline void storeShortLE(u1* buf, u2 val) argument
152 *buf++ = (u1) val;
153 *buf++ = (u1) (val >> 8);
155 static inline void storeIntLE(u1* buf, u4 val) argument
157 *buf++ = (u1) val;
158 *buf++ = (u1) (val >> 8);
159 *buf++ = (u1) (val >> 16);
160 *buf++ = (u1) (val >> 24);
162 static inline void storeLongLE(u1* buf, u8 val) argument
164 *buf
[all...]
H A DThread.cpp1200 char buf[16]; // MAX_TASK_COMM_LEN=16 is hard-coded into bionic local
1201 strncpy(buf, s, sizeof(buf)-1);
1202 buf[sizeof(buf)-1] = '\0';
1203 int err = pthread_setname_np(pthread_self(), buf);
1206 buf, strerror(err));
3141 static int getSchedulerGroup(int tid, char* buf, size_t bufLen)
3150 snprintf(buf, bufLen, "[fopen-error:%d]", errno);
3182 strncpy(buf, gr
[all...]
/dalvik/vm/compiler/codegen/arm/
H A DArchUtility.cpp28 static char * decodeRegList(ArmOpcode opcode, int vector, char *buf) argument
32 buf[0] = 0;
42 sprintf(buf + strlen(buf), ", r%d", regId);
45 sprintf(buf, "r%d", regId);
49 return buf;
76 static void buildInsnString(const char *fmt, ArmLIR *lir, char* buf, argument
80 char *bufEnd = &buf[size-1];
225 if (buf+strlen(tbuf) <= bufEnd) {
226 strcpy(buf, tbu
[all...]
/dalvik/libdex/
H A DSysUtil.cpp316 int sysWriteFully(int fd, const void* buf, size_t count, const char* logMsg) argument
319 ssize_t actual = TEMP_FAILURE_RETRY(write(fd, buf, count));
327 buf = (const void*) (((const u1*) buf) + actual);
339 unsigned char buf[kBufSize]; local
344 ssize_t actual = TEMP_FAILURE_RETRY(read(inFd, buf, getSize));
351 if (sysWriteFully(outFd, buf, getSize, "sysCopyFileToFile") != 0)
/dalvik/vm/hprof/
H A DHprofOutput.cpp24 #define U2_TO_BUF_BE(buf, offset, value) \
26 unsigned char *buf_ = (unsigned char *)(buf); \
33 #define U4_TO_BUF_BE(buf, offset, value) \
35 unsigned char *buf_ = (unsigned char *)(buf); \
44 #define U8_TO_BUF_BE(buf, offset, value) \
46 unsigned char *buf_ = (unsigned char *)(buf); \
93 unsigned char buf[4]; local
106 U4_TO_BUF_BE(buf, 0, sizeof(void *));
107 fwrite(buf, 1, sizeof(u4), fp);
119 U4_TO_BUF_BE(buf,
[all...]
/dalvik/vm/jdwp/
H A DJdwp.h55 INLINE void dvmSetFieldId(u1* buf, FieldId val) { return set4BE(buf, val); } argument
56 INLINE void dvmSetMethodId(u1* buf, MethodId val) { return set4BE(buf, val); } argument
57 INLINE void dvmSetObjectId(u1* buf, ObjectId val) { return set8BE(buf, val); } argument
58 INLINE void dvmSetRefTypeId(u1* buf, RefTypeId val) { return set8BE(buf, val); } argument
59 INLINE void dvmSetFrameId(u1* buf, FrameId val) { return set8BE(buf, va argument
[all...]
H A DJdwpAdb.cpp429 const unsigned char* buf = netState->inputBuffer; local
439 length = read4BE(&buf);
440 id = read4BE(&buf);
441 flags = read1(&buf);
444 error = read2BE(&buf);
447 cmdSet = read1(&buf);
448 cmd = read1(&buf);
452 dataLen = length - (buf - netState->inputBuffer);
461 dvmJdwpProcessRequest(state, &hdr, buf, dataLen, pReply);
H A DJdwpSocket.cpp63 /* pending data from the network; would be more efficient as circular buf */
548 const unsigned char* buf = packetBuf;
557 length = read4BE(&buf);
558 id = read4BE(&buf);
559 flags = read1(&buf);
562 error = read2BE(&buf);
565 cmdSet = read1(&buf);
566 cmd = read1(&buf);
569 dataLen = length - (buf - packetBuf);
575 dvmPrintHexDumpDbg(buf, dataLe
585 const unsigned char* buf = netState->inputBuffer; local
[all...]
H A DJdwpEvent.cpp722 u1* buf = expandBufGetBuffer(pReq); local
724 set4BE(buf, expandBufGetLength(pReq));
725 set4BE(buf+4, dvmJdwpNextRequestSerial(state));
726 set1(buf+8, 0); /* flags */
727 set1(buf+9, kJdwpEventCommandSet);
728 set1(buf+10, kJdwpCompositeCommand);
/dalvik/tools/dmtracedump/
H A DCreateTestTrace.c77 char buf[BUF_SIZE]; variable
139 while (fgets(buf, BUF_SIZE, inputFp)) {
140 char *cp = buf;
171 while (fgets(buf, BUF_SIZE, inputFp)) {
177 char *cp = buf;
254 printf("Indent: %d; IndentLevel: %d; Line: %s", indent, indentLevel, buf);
271 fprintf(stderr, "Error: line %d: %s", linenum, buf);
282 fprintf(stderr, "Error: line %d: %s", linenum, buf);
290 fprintf(stderr, "Error: line %d: %s", linenum, buf);
/dalvik/vm/alloc/
H A DDdmHeap.cpp61 u1 *buf, *b; local
63 buf = (u1 *)malloc(HPIF_SIZE(1));
64 if (buf == NULL) {
67 b = buf;
121 assert((intptr_t)b == (intptr_t)buf + (intptr_t)HPIF_SIZE(1));
123 dvmDbgDdmSendChunk(CHUNK_TYPE("HPIF"), b - buf, buf); local
178 u1 *buf; member in struct:HeapChunkContext
198 assert(ctx->buf <= ctx->pieceLenField &&
204 dvmDbgDdmSendChunk(ctx->type, ctx->p - ctx->buf, ct
[all...]
/dalvik/tools/hprof-conv/
H A DHprofConv.c275 static uint16_t get2BE(const unsigned char* buf) argument
279 val = (buf[0] << 8) | buf[1];
286 static uint32_t get4BE(const unsigned char* buf) argument
290 val = (buf[0] << 24) | (buf[1] << 16) | (buf[2] << 8) | buf[3];
297 static void set4BE(unsigned char* buf, uint32_t val) argument
299 buf[
324 const unsigned char* buf = origBuf; local
430 unsigned char* buf = origBuf; local
633 unsigned char* buf = ebGetBuffer(pBuf); local
[all...]
/dalvik/vm/native/
H A Ddalvik_system_VMRuntime.cpp186 char buf[64]; local
187 sprintf(buf, "%d.%d.%d",
189 returnCString(pResult, buf);

Completed in 408 milliseconds

12