projects
/
strace
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
78be7e9
)
Add print_xlat_u and print_xlat_d shorthands
author
Eugene Syromyatnikov
<evgsyr@gmail.com>
Sat, 7 Apr 2018 00:11:07 +0000
(
02:11
+0200)
committer
Eugene Syromyatnikov
<evgsyr@gmail.com>
Thu, 12 Apr 2018 23:00:10 +0000
(
01:00
+0200)
Add variants of print_xlat with various value printing formats.
* defs.h (print_xlat_u, print_xlat_d): New macro, a wrapper for
print_xlat_ex.
defs.h
patch
|
blob
|
history
diff --git
a/defs.h
b/defs.h
index da757d408f5d5c37ba95475a3bc31473c1fdc7c6..6e9d59792fb7af2688b07089cb0b005ef1f216ef 100644
(file)
--- a/
defs.h
+++ b/
defs.h
@@
-646,6
+646,10
@@
extern int sprintxval_ex(char *buf, size_t size, const struct xlat *xlat,
extern void print_xlat_ex(uint64_t val, const char *str, enum xlat_style style);
#define print_xlat(val_) \
print_xlat_ex((val_), #val_, XLAT_STYLE_DEFAULT)
+#define print_xlat_u(val_) \
+ print_xlat_ex((val_), #val_, XLAT_STYLE_FMT_U)
+#define print_xlat_d(val_) \
+ print_xlat_ex((val_), #val_, XLAT_STYLE_FMT_D)
extern int printargs(struct tcb *);
extern int printargs_u(struct tcb *);