public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Luis Machado <luis.machado@arm.com>
To: Pedro Alves <pedro@palves.net>, John Baldwin <jhb@FreeBSD.org>,
	gdb-patches@sourceware.org,
	David Spickett <David.Spickett@arm.com>
Subject: Re: [PATCH] [Arm] Remove dead FPA code
Date: Thu, 13 Oct 2022 08:23:11 +0100	[thread overview]
Message-ID: <df01dddb-7158-6fee-f5e2-5f43b2b635bd@arm.com> (raw)
In-Reply-To: <1003e65d-50fe-8aed-4d98-d06833d27011@palves.net>

On 10/10/22 15:58, Pedro Alves wrote:
> On 2022-10-05 9:26 a.m., Luis Machado wrote:
> 
>> Yeah, that's what I was worried about. Register discoveries without XML are not great, and more recently debugging stubs have been
>> exposing more system registers. Having to consider FPA (which was *removed* 10 years ago from GCC, but fell in disuse before then) is not
>> acceptable at this point.
>>
>> If those debugging stubs want to skip XML, I think it would be reasonable for them to at least update the expected 'g' packet to contain just
>> the basic registers, with CPSR as 16.
>>
>> That might need some coordination. I can coordinate this from the Linux Kernel's side, but I never dealt with the BSD kernels.
> 
> I'm not seeing much point in this:
> 
> #1 - If the remote side supplies XML, then the register number doesn't really matter, GDB auto-maps the numbers.
> 
> #2 - If the remote side doesn't supply XML, then you're just setting up for a world of coordination pain for no benefit.
> 
> In GDB, to keep things working, we just have to keep the FPA register number hole in place.  That's hardly causing
> any maintenance burden, IMO.  We just have to have comments in place explaining why we have them.

Based on a recent thread with the Arm Linux Kernel maintainer, he finds it reasonable to make kgdb
return XML data and to keep a compatibility layer (the g guesses) going for a reasonable amount of
time, after which we can retire the guesses and drop the code.

It is not clear when we'll drop the compatibility layer, but at least we can get some traction towards
making targets use XML and maybe add some deprecation warning to the g packet guesses. If we keep the code as-is,
there is no incentive to update targets using old mechanisms.

GDB talks about FPA as if it were something that existed not long ago, while in fact it was deprecated even before GDB
started using XML descriptions. But the registers were kept that way and GDB was never updated (supposedly because it needed
to be compatible with some other tool at the time), leading to other tools copying what GDB was exposing, even though they didn't
support FPA at all.

One such example is the Linux Kernel, which added these registers because GDB required them.

So in this case GDB has the potential to influence other tools, and we should strive to keep things clean and updated as much as
possible. This is an attempt at that.

  reply	other threads:[~2022-10-13  7:23 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 [this message]
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
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=df01dddb-7158-6fee-f5e2-5f43b2b635bd@arm.com \
    --to=luis.machado@arm.com \
    --cc=David.Spickett@arm.com \
    --cc=gdb-patches@sourceware.org \
    --cc=jhb@FreeBSD.org \
    --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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).