print_timespec_t(&t);
}
+MPERS_PRINTER_DECL(const char *, sprint_timespec)(struct tcb *tcp, const long addr)
+{
+ timespec_t t;
+ static char buf[sizeof(time_fmt) + 3 * sizeof(t)];
+
+ if (!addr) {
+ strcpy(buf, "NULL");
+ } else if (!verbose(tcp) || (exiting(tcp) && syserror(tcp)) ||
+ umove(tcp, addr, &t)) {
+ snprintf(buf, sizeof(buf), "%#lx", addr);
+ } else {
+ snprintf(buf, sizeof(buf), time_fmt,
+ (intmax_t) t.tv_sec, (intmax_t) t.tv_nsec);
+ }
+
+ return buf;
+}
+
MPERS_PRINTER_DECL(void, print_timespec_utime_pair)(struct tcb *tcp, const long addr)
{
timespec_t t[2];
tprints("]");
}
+MPERS_PRINTER_DECL(const char *, sprint_timeval)(struct tcb *tcp, const long addr)
+{
+ timeval_t t;
+ static char buf[sizeof(time_fmt) + 3 * sizeof(t)];
+
+ if (!addr) {
+ strcpy(buf, "NULL");
+ } else if (!verbose(tcp) || (exiting(tcp) && syserror(tcp)) ||
+ umove(tcp, addr, &t)) {
+ snprintf(buf, sizeof(buf), "%#lx", addr);
+ } else {
+ snprintf(buf, sizeof(buf), time_fmt,
+ (intmax_t) t.tv_sec, (intmax_t) t.tv_usec);
+ }
+
+ return buf;
+}
+
MPERS_PRINTER_DECL(void, print_itimerval)(struct tcb *tcp, const long addr)
{
timeval_t t[2];
tprints("}");
}
+const char *
+sprint_timeval32(struct tcb *tcp, const long addr)
+{
+ timeval32_t t;
+ static char buf[sizeof(time_fmt) + 3 * sizeof(t)];
+
+ if (!addr) {
+ strcpy(buf, "NULL");
+ } else if (!verbose(tcp) || (exiting(tcp) && syserror(tcp)) ||
+ umove(tcp, addr, &t)) {
+ snprintf(buf, sizeof(buf), "%#lx", addr);
+ } else {
+ snprintf(buf, sizeof(buf), time_fmt,
+ (intmax_t) t.tv_sec, (intmax_t) t.tv_usec);
+ }
+
+ return buf;
+}
+
#endif /* ALPHA */