case EFAULT: case EIO: case EPERM:
/* address space is inaccessible */
if (nread) {
- perror_msg("umoven: short read (%u < %u) @0x%" PRI_klx,
- nread, nread + len, addr - nread);
+ perror_func_msg("short read (%u < %u)"
+ " @0x%" PRI_klx,
+ nread, nread + len,
+ addr - nread);
}
return -1;
default:
/* all the rest is strange and should be reported */
- perror_msg("umoven: PTRACE_PEEKDATA pid:%d @0x%" PRI_klx,
- pid, addr);
+ perror_func_msg("pid:%d @0x%" PRI_klx,
+ pid, addr);
return -1;
}
return -1;
default:
/* all the rest is strange and should be reported */
- perror_msg("process_vm_readv: pid:%d @0x%" PRI_klx,
- pid, addr);
+ perror_func_msg("pid:%d @0x%" PRI_klx, pid, addr);
return -1;
}
}
case EFAULT: case EIO: case EPERM:
/* address space is inaccessible */
if (nread) {
- perror_msg("umovestr: short read (%d < %d) @0x%" PRI_klx,
- nread, nread + len, addr - nread);
+ perror_func_msg("short read (%d < %d)"
+ " @0x%" PRI_klx,
+ nread, nread + len,
+ addr - nread);
}
return -1;
default:
/* all the rest is strange and should be reported */
- perror_msg("umovestr: PTRACE_PEEKDATA pid:%d @0x%" PRI_klx,
- pid, addr);
+ perror_func_msg("pid:%d @0x%" PRI_klx,
+ pid, addr);
return -1;
}
case EFAULT: case EIO:
/* address space is inaccessible */
if (nread)
- perror_msg("umovestr: short read (%d < %d) @0x%" PRI_klx,
- nread, nread + len, addr - nread);
+ perror_func_msg("short read (%d < %d)"
+ " @0x%" PRI_klx,
+ nread, nread + len,
+ addr - nread);
return -1;
case ESRCH:
/* the process is gone */
return -1;
default:
/* all the rest is strange and should be reported */
- perror_msg("process_vm_readv: pid:%d @0x%" PRI_klx,
- pid, addr);
+ perror_func_msg("pid:%d @0x%" PRI_klx, pid, addr);
return -1;
}
}
errno = 0;
val = ptrace(PTRACE_PEEKUSER, (pid_t) tcp->pid, (void *) off, 0);
if (val == -1 && errno) {
- if (errno != ESRCH) {
- perror_msg("upeek: PTRACE_PEEKUSER pid:%d @0x%lx)",
- tcp->pid, off);
- }
+ if (errno != ESRCH)
+ perror_func_msg("PTRACE_PEEKUSER pid:%d @0x%lx)",
+ tcp->pid, off);
return -1;
}
*res = (unsigned long) val;