From: Eugene Syromyatnikov Date: Thu, 8 Mar 2018 21:51:30 +0000 (+0100) Subject: print_fields.h: introduce PRINT_FIELD_ADDR and PRINT_FIELD_ADDR64 macros X-Git-Tag: v4.22~21 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=82120681e302be56c5b6d7056bdbd944236d44b9;p=strace print_fields.h: introduce PRINT_FIELD_ADDR and PRINT_FIELD_ADDR64 macros * print_fields.h (PRINT_FIELD_ADDR, PRINT_FIELD_ADDR64): New macro. --- diff --git a/print_fields.h b/print_fields.h index e456f4c2..0b810d5c 100644 --- a/print_fields.h +++ b/print_fields.h @@ -53,6 +53,18 @@ 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, \