Re: [PATCH v3 01/24] New target methods for memory tagging support

Simon Marchi via Gdb-patches
2020-12-25T05:08:38Z

> + /* Return the allocated memory tags of type TYPE associated with
> + [ADDRESS, ADDRESS + LEN) in TAGS.
> +
> + LEN is the number of bytes in the memory range. TAGS is a vector of
> + bytes containing the tags found in the above memory range.
> +
> + It is up to the architecture/target to interpret the bytes in the TAGS
> + vector and read the tags appropriately. */
> + virtual int fetch_memtags (CORE_ADDR address, size_t len,
> + gdb::byte_vector &tags, int type)
> + TARGET_DEFAULT_IGNORE ();
> +
> + /* Write the allocation tags of type TYPE contained in TAGS to the memory
> + range [ADDRESS, ADDRESS + LEN).
> +
> + LEN is the number of bytes in the memory range. TAGS is a vector of
> + bytes containing the tags to be stored to the memory range.
> +
> + It is up to the architecture/target to interpret the bytes in the TAGS
> + vector and store them appropriately. */
> + virtual int store_memtags (CORE_ADDR address, size_t len,
> + const gdb::byte_vector &tags, int type)

Some more feedback: make the return values bool, if they are bool, and document
the meaning in the comment.

Simon