command QMemTags

Format: ‘QMemTags:start address,length:type:tag bytes’

Meaning: Store memory tags of type type to the address range [start address, start address + length). The target is responsible for interpreting the type, the tag bytes and modifying the memory tag granules accordingly, given this is architecture-specific.

The interpretation of how many tags (nt) should be written to how many memory tag granules (ng) is also architecture-specific. The behavior is implementation-specific, but the following is suggested.

If the number of memory tags, nt, is greater than or equal to the number of memory tag granules, ng, only ng tags will be stored.

If nt is less than ng, the behavior is that of a fill operation, and the tag bytes will be used as a pattern that will get repeated until ng tags are stored.

start address is the starting address of the memory range. The address does not have any restriction on alignment or size.

length is the length, in bytes, of the memory range.

type is the type of tag the request wants to fetch. The type is a signed integer.

ARM

type = 0: MTE logical tag

type = 1: MTE allocation tag

tag bytes is a sequence of hex encoded uninterpreted bytes which will be interpreted by the target. Each pair of hex digits is interpreted as a single byte.

GDB will only send this packet if the stub has advertised support for memory tagging via ‘qSupported’.

Reply:

OK