Re: [PATCH v3 21/24] Extend "x" and "print" commands to support memory tagging

Simon Marchi via Gdb-patches
2020-12-27T04:18:40Z

On 2020-11-09 12:04 p.m., Luis Machado via Gdb-patches wrote:
> The "print" command will point out any possible tag mismatches it finds
> when dealing with pointers, in case such a pointer is tagged. No additional
> modifiers are needed.
>
> Suppose we have a pointer "p" with value 0x1234 (logical tag 0x0) and that we
> have an allocation tag of 0x1 for that particular area of memory. This is the
> expected output:
>
> (gdb) p/x p
> Logical tag (0x0) does not match the allocation tag (0x1).
> $1 = 0x1234

Should there be an option to print to enable/disable this behavior?
Something like "print -memory-tags-violations <on|off>", and a
corresponding "set print memory-tags-violations <on|off>"?

Simon