]> granicus.if.org Git - strace/commitdiff
Introduce PRINT_FIELD_FD and PRINT_FIELD_STRN
authorDmitry V. Levin <ldv@altlinux.org>
Mon, 17 Jul 2017 11:59:26 +0000 (11:59 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Mon, 17 Jul 2017 11:59:26 +0000 (11:59 +0000)
* print_fields.h (PRINT_FIELD_FD, PRINT_FIELD_STRN): New macros.

print_fields.h

index 0ca9dfc9d9fbea60e89bf92ea288efafff1a7582..4ebd7b2a875af407bc0c57d9c158289304005c93 100644 (file)
                printaddr((mpers_ptr_t) (where_).field_);               \
        } while (0)
 
+#define PRINT_FIELD_FD(prefix_, where_, field_, tcp_)                  \
+       do {                                                            \
+               STRACE_PRINTF("%s%s=", (prefix_), #field_);             \
+               printfd((tcp_), (where_).field_);                       \
+       } while (0)
+
+#define PRINT_FIELD_STRN(prefix_, where_, field_, len_, tcp_)          \
+       do {                                                            \
+               STRACE_PRINTF("%s%s=", (prefix_), #field_);             \
+               printstrn((tcp_), (where_).field_, (len_));             \
+       } while (0)
+
 #endif /* !STRACE_PRINT_FIELDS_H */