]> granicus.if.org Git - strace/commit
Add address printing functions
authorDmitry V. Levin <ldv@altlinux.org>
Sun, 5 Jul 2015 22:09:29 +0000 (22:09 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Thu, 9 Jul 2015 01:21:56 +0000 (01:21 +0000)
commit332a32619c5e66bca75fbb28d81dd35e7ebf77fa
tree6e383c2f97104f88443ab3bd9ba37679bc417f4d
parent204c2bc9cb50daf4d3c8b5067a57c071ef55dfc4
Add address printing functions

printaddr is a simple function implementing "print NULL or address"
idiom.
umoven_or_printaddr is a wrapper around umoven that has the same return
value semantics as umoven but also prints the address when the data
is not going to be fetched (in case of exiting(tcp) && syserror(tcp))
or cannot be fetched (umoven fails).
umove_or_printaddr is a macro wrapper around umoven_or_printaddr that
mirrors umove wrapper around umoven.

* defs.h (printaddr, umoven_or_printaddr): New prototypes.
(umove_or_printaddr): New macro.
* util.c (printaddr, umoven_or_printaddr): New functions.
defs.h
util.c