Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: <Ezra.Sitorus@arm.com>
Cc: <gdb-patches@sourceware.org>,  <luis.machado.foss@gmail.com>,
	<pedro@palves.net>
Subject: Re: [RFC PATCH] gdb/py: Add pretty printer for __mfp8 for aarch64
Date: Tue, 18 Nov 2025 11:42:07 -0700	[thread overview]
Message-ID: <874iqrrxmo.fsf@tromey.com> (raw)
In-Reply-To: <20251118141457.83739-1-Ezra.Sitorus@arm.com> (Ezra Sitorus's message of "Tue, 18 Nov 2025 14:14:57 +0000")

>>>>>   <Ezra.Sitorus@arm.com> writes:

> __mfp8/mfloat8_t is encoded as unsigned int in DWARF so we are unable to
> print out variables of this type properly.

Can the compiler be fixed to emit correct DWARF instead?  That seems
like it would be a lot better, and in keeping with the purpose of DWARF.

> +class aarch64_mfp8_printer(gdb.ValuePrinter):
> +    # Print aarch64 mfp8 formats
> +
...
> +    def convert_to_float(self, s, e, m, m_bits, bias):

Classes inheriting from ValuePrinter should use a leading "_" for all
attributes other than those specified by the pretty-printing protocol.
This rule lets gdb add functionality over time.

Tom

  parent reply	other threads:[~2025-11-18 18:42 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-18 14:14 Ezra.Sitorus
2025-11-18 17:12 ` Andrew Burgess
2025-11-18 18:37   ` Ezra Sitorus
2025-11-26 16:08   ` Ezra Sitorus
2025-11-18 18:42 ` Tom Tromey [this message]
2025-11-19 13:12   ` Ezra Sitorus
2025-11-19 15:58     ` Tom Tromey
2025-11-19 21:28       ` Ezra Sitorus
2025-12-16 16:39       ` Ezra Sitorus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874iqrrxmo.fsf@tromey.com \
    --to=tom@tromey.com \
    --cc=Ezra.Sitorus@arm.com \
    --cc=gdb-patches@sourceware.org \
    --cc=luis.machado.foss@gmail.com \
    --cc=pedro@palves.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox