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

Eli Zaretskii via Gdb-patches
2020-11-09T17:14:52Z

> Date: Mon, 9 Nov 2020 14:04:32 -0300
> From: Luis Machado via Gdb-patches <gdb-patches@sourceware.org>
> Cc: david.spickett@linaro.org
>
> 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

If the tags did match, GDB would have also printed the contents of the
memory pointed to by p, right? At least with pointer to 'char *'
strings it would. Does GDB still print the contents if the tags don't
match? If it doesn't, it should say something like "Cannot access
memory at NNNN: logical tag doesn't match".