strace: Teach mmap() pretty-printer about more MAP_FOO flags

This commit is contained in:
Andreas Kling 2021-10-31 17:06:05 +01:00
parent 472401a51e
commit 248ff8e971
Notes: sideshowbarker 2024-07-18 01:39:51 +09:00

View file

@ -581,6 +581,14 @@ struct Formatter<MmapFlags> : StandardFormatter {
active_flags.append("MAP_PRIVATE");
if (flags & MAP_FIXED)
active_flags.append("MAP_FIXED");
if (flags & MAP_RANDOMIZED)
active_flags.append("MAP_RANDOMIZED");
if (flags & MAP_STACK)
active_flags.append("MAP_STACK");
if (flags & MAP_NORESERVE)
active_flags.append("MAP_NORESERVE");
if (flags & MAP_PURGEABLE)
active_flags.append("MAP_PURGEABLE");
builder.join(" | ", active_flags);
}
};