- if (entering(tcp)) {
- printfd(tcp, tcp->u_arg[0]);
- tprints(", ");
- printstr(tcp, tcp->u_arg[1], tcp->u_arg[2]);
- tprintf(", %lu", tcp->u_arg[2]);
+ printfd(tcp, tcp->u_arg[0]);
+ tprints(", ");
+ printstr(tcp, tcp->u_arg[1], tcp->u_arg[2]);
+ tprintf(", %lu", tcp->u_arg[2]);
+
+ return RVAL_DECODED;
+}
+
+struct print_iovec_config {
+ enum iov_decode decode_iov;
+ unsigned long data_size;
+};
+
+static bool
+print_iovec(struct tcb *tcp, void *elem_buf, size_t elem_size, void *data)
+{
+ const unsigned long *iov;
+ unsigned long iov_buf[2], len;
+ struct print_iovec_config *c = data;
+
+ if (elem_size < sizeof(iov_buf)) {
+ iov_buf[0] = ((unsigned int *) elem_buf)[0];
+ iov_buf[1] = ((unsigned int *) elem_buf)[1];
+ iov = iov_buf;
+ } else {
+ iov = elem_buf;