[PATCH v1] changing mmap flags and memfd_create flags to print abbreviated values under -Xraw
Dmitry V. Levin
ldv at altlinux.org
Tue Nov 27 23:38:30 UTC 2018
On Mon, Nov 26, 2018 at 09:50:03PM -0600, shankarapailoor wrote:
> >However, other signals are still printed in traditional symbolic form
> despite of -X raw and -X verbose settings, this has to be fixed.
> The same could be said about signal masks. I'm not sure what's the best
> raw representation for signal masks, maybe it's an array of hex bytes.
>
> Seems reasonable to me. Looking at
> https://elixir.bootlin.com/linux/latest/source/include/uapi/asm-generic/signal.h#L91
> it seems that the mask is just an array of unsigned longs so that
> would probably be best.
This is somewhat complicated by the fact that strace still supports
architectures with legacy syscalls that operate with 32-bit signal masks,
e.g. i386 personality on x86_64. You can have a look at
signal.c:sprintsigmask_n() and its users to get an idea.
> >Maybe print sin_addr as %#x?
>
> Yeah I think so
>
> >What do you think is the appropriate raw representation for IPv6 addresses?
>
> Good question. Maybe a 16 byte hex string or an array of hex values of
> length 16?
IPv6 address is not really a string, so I'd rather go for an array of hex bytes.
--
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20181128/b507d2bd/attachment.bin>
More information about the Strace-devel
mailing list