From: Andrew Burgess <aburgess@redhat.com>
To: Ezra.Sitorus@arm.com, gdb-patches@sourceware.org
Cc: luis.machado.foss@gmail.com, pedro@palves.net,
Ezra Sitorus <ezra.sitorus@arm.com>
Subject: Re: [RFC PATCH] gdb/py: Add pretty printer for __mfp8 for aarch64
Date: Tue, 18 Nov 2025 17:12:02 +0000 [thread overview]
Message-ID: <87wm3ntgd9.fsf@redhat.com> (raw)
In-Reply-To: <20251118141457.83739-1-Ezra.Sitorus@arm.com>
<Ezra.Sitorus@arm.com> writes:
> From: Ezra Sitorus <ezra.sitorus@arm.com>
>
> __mfp8/mfloat8_t is encoded as unsigned int in DWARF so we are unable to
> print out variables of this type properly. As a result, this patch adds
> a python pretty printer to display these values. To use:
Pretty printers are usually defined alongside the library that adds the
types that need pretty printing. But (from a quick google search) it
would seem that these types are ARM extensions to the C language, and so
are present in most/all C compilers for ARM targets?
Given that adding pretty printers to GDB is unusual, I think it is worth
including a justification for why the pretty printers should be added
here, and not with the compiler.
> import gdb.printer
> gdb.printer.register_aarch64_fp8_printer(gdb.current_objfile())
I think you ideally want these to be automatically registered, just how
compiler pretty printers would be automatically loaded.
You should investigate the 'new_objfile' event. But I'm not certain how
you're going to decide if the pretty printer should be registered or
not as you'll only want to register this for suitable AArch64 inferiors
I guess. Maybe there's something that could be done via the program
space?
My concern is that if these printers don't auto-register then users
aren't going to know this feature exists.
Remember, we can always extend the Python API to add the features you
need to make it possible to auto-register ... we just need to know what
you need :)
Thanks,
Andrew
next prev parent reply other threads:[~2025-11-18 17:13 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 [this message]
2025-11-18 18:37 ` Ezra Sitorus
2025-11-26 16:08 ` Ezra Sitorus
2025-11-18 18:42 ` Tom Tromey
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=87wm3ntgd9.fsf@redhat.com \
--to=aburgess@redhat.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