[PATCH v1] changing mmap flags and memfd_create flags to print abbreviated values under -Xraw

shankarapailoor shankarapailoor at gmail.com
Tue Nov 27 03:50:03 UTC 2018


>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.

>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?
On Mon, Nov 26, 2018 at 9:38 PM Dmitry V. Levin <ldv at altlinux.org> wrote:
>
> On Mon, Nov 26, 2018 at 05:30:06PM -0800, shankarapailoor wrote:
> > Hi again!
> >
> > As a follow up, under -Xraw do you think it is better to just show raw
> > values instead of the corresponding function call e.g
> > inet_addr("127.0.0.1"), htons, htonl, etc?
>
> Definitely.
>
> > For example, instead of:
> >
> > bind(3, {sa_family=0x2, sin_port=htons(0), sin_addr=inet_addr("0.0.0.0")}, 16)
> >
> > we would have:
> >
> > bind(3, {sa_family=0x2, sin_port=0, sin_addr=0x0}, 16)
>
> Maybe print sin_addr as %#x?
> What do you think is the appropriate raw representation for IPv6 addresses?
>
>
> --
> ldv
> --
> Strace-devel mailing list
> Strace-devel at lists.strace.io
> https://lists.strace.io/mailman/listinfo/strace-devel



-- 
Regards,
Shankara Pailoor


More information about the Strace-devel mailing list