From: Yodel Eldar <yodel.eldar@gmail.com>
To: gdb-patches@sourceware.org
Cc: Yodel Eldar <yodel.eldar@gmail.com>
Subject: [PATCH 0/2] gdb/alpha: Add target description support and fpcr flags
Date: Mon, 26 May 2025 10:12:17 -0500 [thread overview]
Message-ID: <20250526151219.399450-1-yodel.eldar@gmail.com> (raw)
Please note that the second patch depends on the first.
I initially wrote the target description for use in another project, but
when I connected GDB to that project's gdbstub during testing, GDB
emitted a warning about rejecting the target description (because it
does not support them for Alpha); so, I firstly submit it here (along
with some plumbing) and would like to assign the copyright to the FSF
for the first time.
Target description support will allow Alpha target users to easily
specify features of their system at hand that GDB does not have itself;
e.g., according to [1] (see below), Alpha 21264 (EV6) does not implement
the DNOD flag (bit 47) of the fpcr, contrary to other versions; users
can easily inform GDB of this difference by dynamically feeding it their
desired target description instead of modifying code for recompilation.
Furthermore, Alpha's target-dependent code no longer needs helper
functions to get the name or type of a requested register as seen with
the removal of alpha_register_name and alpha_register_type in patch one;
this separation of concerns improves maintainability over the long run.
Converting fpcr from an int64 to a flags type with just a few lines of
XML in the second patch demonstrates the power of the target description
framework in the convenience that it affords. As a control register, the
flags type suits the fpcr better than an int64, because it is a bitfield
of flags; admittedly, sixteen flags are a lot, but the fpcr does not
appear in "info regs" unless the command is invoked with "float" or
"all," and its flags will not appear in the output unless they are set.
Lastly, this is my first submission to GDB, and I want to take this
opportunity to thank all of the incredible folks who have contributed to
this beloved project that has helped me better understand what occurs
under the hood of programs over the years. Thank you! I welcome any and
all suggestions for improvement.
[1] https://www.star.bnl.gov/public/daq/HARDWARE/21264_data_sheet.pdf
Yodel Eldar (2):
gdb/alpha: Add target description support
gdb/alpha: Redefine fpcr with fpcr_flags type
gdb/NEWS | 2 +
gdb/alpha-tdep.c | 87 ++++++++++++-----------
gdb/doc/gdb.texinfo | 42 +++++++++++
gdb/features/Makefile | 1 +
gdb/features/alpha-core.xml | 136 ++++++++++++++++++++++++++++++++++++
gdb/features/alpha.c | 111 +++++++++++++++++++++++++++++
gdb/features/alpha.xml | 11 +++
7 files changed, 351 insertions(+), 39 deletions(-)
create mode 100644 gdb/features/alpha-core.xml
create mode 100644 gdb/features/alpha.c
create mode 100644 gdb/features/alpha.xml
--
2.49.0
next reply other threads:[~2025-05-26 15:15 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-26 15:12 Yodel Eldar [this message]
2025-05-26 15:12 ` [PATCH 1/2] gdb/alpha: Add target description support Yodel Eldar
2025-05-26 16:13 ` Eli Zaretskii
2025-05-26 17:14 ` Yodel
2025-06-03 18:49 ` Simon Marchi
2025-06-04 13:44 ` Yodel Eldar
2025-06-04 14:49 ` Maciej W. Rozycki
2025-06-04 17:29 ` Yodel Eldar
2025-06-12 19:29 ` Yodel Eldar
2025-06-12 20:30 ` Simon Marchi
2025-06-12 20:33 ` Simon Marchi
2025-06-12 22:07 ` Yodel Eldar
2025-06-13 14:34 ` Simon Marchi
2025-06-30 0:08 ` Yodel Eldar
2025-07-02 17:14 ` Simon Marchi
2025-07-02 18:51 ` Yodel Eldar
2025-07-02 18:53 ` Maciej W. Rozycki
2025-07-02 19:02 ` Simon Marchi
2025-07-02 19:21 ` Maciej W. Rozycki
2025-07-02 20:52 ` Yodel Eldar
2025-07-02 21:12 ` Maciej W. Rozycki
2025-07-03 16:49 ` Yodel Eldar
2025-07-03 16:02 ` Simon Marchi
2025-07-02 18:48 ` Maciej W. Rozycki
2025-05-26 15:12 ` [PATCH 2/2] gdb/alpha: Redefine fpcr with fpcr_flags type Yodel Eldar
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=20250526151219.399450-1-yodel.eldar@gmail.com \
--to=yodel.eldar@gmail.com \
--cc=gdb-patches@sourceware.org \
/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