Re: [PATCH v5 02/25] New gdbarch memory tagging hooks

Simon Marchi via Gdb-patches
2021-02-05T02:38:30Z

On 2021-01-27 3:20 p.m., Luis Machado via Gdb-patches wrote:
> +/* See arch-utils.h */
> +
> +struct value *
> +default_get_memtag (struct gdbarch *gdbarch, struct value *address,
> + enum memtag_type tag_type)
> +{
> + /* By default, return no tag. */
> + return NULL;

Nit: nullptr.

> +}
> +
> CORE_ADDR
> generic_skip_trampoline_code (struct frame_info *frame, CORE_ADDR pc)
> {
> diff --git a/gdb/arch-utils.h b/gdb/arch-utils.h
> index a7e53ea5ae..e1ffa03eff 100644
> --- a/gdb/arch-utils.h
> +++ b/gdb/arch-utils.h
> @@ -132,6 +132,29 @@ extern const struct floatformat **
> default_floatformat_for_type (struct gdbarch *gdbarch,
> const char *name, int len);
>
> +/* Default implementation of gdbarch_tagged_address_p. */
> +extern std::string default_memtag_to_string (struct gdbarch *gdbarch,
> + struct value *address,
> + enum memtag_type tag_type);

The comment should read "gdbarch_memtag_to_string".

Otherwise, LGTM.

Simon