Lines Matching refs:buf
262 static bool read_string(struct ps_prochandle* ph, uintptr_t addr, char* buf, size_t size) {
270 buf[i] = c;
276 buf[i] = '\0';
455 static bool core_read_data(struct ps_prochandle* ph, uintptr_t addr, char *buf, size_t size) {
473 if ((len = pread(fd, buf, len, off)) <= 0)
478 buf = (char *)buf + len;
488 // we are not assuming 'buf' to be zero initialized.
489 memset(buf, 0, len);
490 buf += len;
505 uintptr_t addr, const char *buf , size_t size) {
531 static bool core_handle_prstatus(struct ps_prochandle* ph, const char* buf, size_t nbytes) {
532 // we have to read prstatus_t from buf
534 prstatus_t* prstat = (prstatus_t*) buf;
598 char* buf = NULL;
611 if ( (buf = (char*) malloc(size)) == NULL) {
617 if (read(ph->core->core_fd, buf, size) != size) {
622 p = buf;
623 while (p < buf + size) {
636 free(buf);
640 if (buf) free(buf);