Lines Matching refs:buf
263 static bool read_string(struct ps_prochandle* ph, uintptr_t addr, char* buf, size_t size) {
271 buf[i] = c;
277 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) {
537 static bool core_handle_prstatus(struct ps_prochandle* ph, const char* buf, size_t nbytes) {
538 // we have to read prstatus_t from buf
540 prstatus_t* prstat = (prstatus_t*) buf;
604 char* buf = NULL;
617 if ( (buf = (char*) malloc(size)) == NULL) {
623 if (read(ph->core->core_fd, buf, size) != size) {
628 p = buf;
629 while (p < buf + size) {
642 free(buf);
646 if (buf) free(buf);