]> granicus.if.org Git - strace/commitdiff
print_fields.h: introduce PRINT_FIELD_ADDR and PRINT_FIELD_ADDR64 macros
authorEugene Syromyatnikov <evgsyr@gmail.com>
Thu, 8 Mar 2018 21:51:30 +0000 (22:51 +0100)
committerDmitry V. Levin <ldv@altlinux.org>
Wed, 4 Apr 2018 16:33:19 +0000 (16:33 +0000)
* print_fields.h (PRINT_FIELD_ADDR, PRINT_FIELD_ADDR64): New macro.

print_fields.h

index e456f4c2a63f6084af8f62443c8e1064c27f2314..0b810d5c3dbf5778a684c62dfbac4bd91a9e9baf 100644 (file)
        STRACE_PRINTF("%s%s=%#llx", (prefix_), #field_,                 \
                      zero_extend_signed_to_ull((where_).field_))
 
+#define PRINT_FIELD_ADDR(prefix_, where_, field_)                      \
+       do {                                                            \
+               STRACE_PRINTF("%s%s=", (prefix_), #field_);             \
+               printaddr((where_).field_);                             \
+       } while (0)
+
+#define PRINT_FIELD_ADDR64(prefix_, where_, field_)                    \
+       do {                                                            \
+               STRACE_PRINTF("%s%s=", (prefix_), #field_);             \
+               printaddr64((where_).field_);                           \
+       } while (0)
+
 #define PRINT_FIELD_0X(prefix_, where_, field_)                                \
        STRACE_PRINTF("%s%s=%#0*llx", (prefix_), #field_,               \
                      (int) sizeof((where_).field_) * 2,                \