zero_extend_signed_to_ull(t->tv_usec));
}
+static void
+print_timeval_t_utime(const timeval_t *t)
+{
+ print_timeval_t(t);
+ tprints_comment(sprinttime_usec(t->tv_sec,
+ zero_extend_signed_to_ull(t->tv_usec)));
+}
+
MPERS_PRINTER_DECL(void, print_struct_timeval, const void *arg)
{
print_timeval_t(arg);
}
+MPERS_PRINTER_DECL(bool, print_struct_timeval_data_size,
+ const void *arg, const size_t size)
+{
+ if (size < sizeof(timeval_t)) {
+ tprints("?");
+ return false;
+ }
+
+ print_timeval_t(arg);
+ return true;
+}
+
MPERS_PRINTER_DECL(void, print_timeval,
struct tcb *const tcp, const kernel_ulong_t addr)
{
return;
tprints("[");
- print_timeval_t(&t[0]);
+ print_timeval_t_utime(&t[0]);
tprints(", ");
- print_timeval_t(&t[1]);
+ print_timeval_t_utime(&t[1]);
tprints("]");
}
zero_extend_signed_to_ull(t->tv_usec));
}
+static void
+print_timeval32_t_utime(const timeval32_t *t)
+{
+ print_timeval32_t(t);
+ tprints_comment(sprinttime_usec(t->tv_sec,
+ zero_extend_signed_to_ull(t->tv_usec)));
+}
+
void
print_timeval32(struct tcb *const tcp, const kernel_ulong_t addr)
{
return;
tprints("[");
- print_timeval32_t(&t[0]);
+ print_timeval32_t_utime(&t[0]);
tprints(", ");
- print_timeval32_t(&t[1]);
+ print_timeval32_t_utime(&t[1]);
tprints("]");
}