public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Pedro Alves <pedro@palves.net>
To: Luis Machado <luis.machado@arm.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH] [Arm] Remove dead FPA code
Date: Thu, 13 Oct 2022 09:44:37 +0100	[thread overview]
Message-ID: <e81158a0-3a19-236a-b89f-31ddb57d42fb@palves.net> (raw)
In-Reply-To: <555eafe1-4314-a68b-a048-67d6f462abf1@arm.com>

On 2022-10-13 8:18 a.m., Luis Machado wrote:
> On 10/10/22 15:56, Pedro Alves wrote:

>>> More recently we've added two new guesses for MVE and M-profile system registers, but it doesn't
>>> make sense to do so, as these features are advertised as XML already.
>>
>> What was the justification for adding them back then, then?
>>
> 
> It was meant to support other register sets under a situation where no XML is sent back. 

Well, that's the reason for all the guesses existing.  The question was more about -- why were _those_
particular guesses needed / added?  Maybe because such stubs already existed in the wild, and
people were using some downstream patched version of GDB to work with them?

> Though valid, my feeling is that
> it was done mostly as copy/pasting what was already being done for the GPR's/FPA. The documentation isn't exactly clear
> on whether one should do it or not. Only a few targets use these guesses (Arm, Mips and Microblaze).

It's strictly a backwards compatibility feature.  It's explained in the comment:

/* For backward-compatibility we allow two 'g' packet lengths with
   the remote protocol depending on whether FPA registers are
   supplied.  M-profile targets do not have FPA registers, but some
   stubs already exist in the wild which use a 'g' packet which
   supplies them albeit with dummy values.  The packet format which
   includes FPA registers should be considered deprecated for
   M-profile targets.  */

static void
arm_register_g_packet_guesses (struct gdbarch *gdbarch)
{

Is there something that could be improved in that comment to make it clearer?

> Removing the guesses doesn't buy us much on its own, but there is opportunity to get targets to move
> to XML descriptions, which is something easier to work with, more flexible and less error-prone. So it looks
> like a step in the right direction.

The thing is that the old/existing stubs that don't send an XML don't need the flexibility.  They just need
to continue working as they do today.  Removing the guesses and changing the default g/G packet layout
causes pain to _users_ foremost.  IMO, removing backwards compatibility just for the sake of it doesn't
really help anyone.

For new registers/features, XML is how to get the flexibility.  So I think the angle should be that
we, as maintainers, should not accept adding support for more/new registers without XML tdescs.

  reply	other threads:[~2022-10-13  8:44 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-20 12:30 Luis Machado
2022-09-20 12:47 ` Eli Zaretskii
2022-10-02 13:39 ` Enze Li
2022-10-03  8:27   ` Luis Machado
2022-10-03 17:33 ` John Baldwin
2022-10-03 19:16 ` Pedro Alves
2022-10-04  8:43   ` Luis Machado
2022-10-04 17:08     ` John Baldwin
2022-10-04 17:43       ` Luis Machado
2022-10-04 21:36         ` John Baldwin
2022-10-05  8:26           ` Luis Machado
2022-10-05  8:36             ` David Spickett
2022-10-05  8:36               ` David Spickett
2022-10-05 16:48             ` John Baldwin
2022-10-05 16:57               ` Richard Earnshaw
2022-10-06 13:02                 ` Luis Machado
2022-10-10 14:58             ` Pedro Alves
2022-10-13  7:23               ` Luis Machado
2022-10-13  8:29                 ` Pedro Alves
2022-10-13  9:40                   ` Luis Machado
2022-10-25 13:54                     ` Luis Machado
2022-11-14 14:30                     ` Simon Marchi
2022-10-10 14:56     ` Pedro Alves
2022-10-13  7:18       ` Luis Machado
2022-10-13  8:44         ` Pedro Alves [this message]
2022-10-13  9:15           ` Luis Machado

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=e81158a0-3a19-236a-b89f-31ddb57d42fb@palves.net \
    --to=pedro@palves.net \
    --cc=gdb-patches@sourceware.org \
    --cc=luis.machado@arm.com \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).