[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 03:35:10 UTC 2018


On Mon, Nov 26, 2018 at 01:59:45PM -0800, shankarapailoor wrote:
> Thanks Dmitry! I will add tests in the future like you showed.
> 
> I have a few more traces where I observe flags even when running the
> trace with -Xraw. Here are a few:
> 
> rt_tgsigqueueinfo(13471, 13471, SIG_0, {}) = 0
> rt_sigsuspend([QUIT], 8) = ? ERESTARTNOHAND (To be restarted if no handler)
> rt_sigaction(SIG_0, {sa_handler=0x20000080, sa_mask=[BUS FPE PWR],
> sa_flags=0}, 0x20000240, 16107701032088221702) = -1 EINVAL (Invalid
> argument)
> 
> Would you say that the QUIT, SIG_0, sa_mask=[BUS FPE PWR] flags should
> be raw values under -Xraw? Furthermore, should sa_mask=[BUS FPE PWR]
> be an integer?

SIG_0 is a misnomer: number 0 is not a valid signal number, and SIG_0 is
not a valid name for a signal.  I've just pushed a change that replaces
SIG_0 with 0.

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.


-- 
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/20181127/cd7abb26/attachment.bin>


More information about the Strace-devel mailing list