public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Luis Machado <luis.machado@arm.com>
To: Keith Seitz <keiths@redhat.com>, Simon Marchi <simark@simark.ca>,
	gdb-patches@sourceware.org
Subject: Re: [PATCH 1/2] cleanup: Add missing feature/ XML files to Makefile
Date: Tue, 13 Sep 2022 15:10:37 +0100	[thread overview]
Message-ID: <a5e6b6c0-033a-0d0d-215e-1563c6dc575a@arm.com> (raw)
In-Reply-To: <77ffceca-e0c9-ed22-162f-cbf2f904aefa@redhat.com>

On 9/13/22 14:55, Keith Seitz wrote:
> On 9/13/22 06:34, Simon Marchi wrote:
>> With your patch applied, I tried re-generating everything:
>>
>> $ cd features
>> $ rm *.c */*.c
>> $ make cfiles GDB="/home/simark/build/binutils-gdb-all-targets/gdb/gdb --data-directory=/home/simark/build/binutils-gdb-all-targets/gdb/data-directory"
>>
>> And then git shows these files as missing:
>>
>>          deleted:    aarch64-sve.c
>>          deleted:    cskyv2-linux.c
>>
>> aarch64-sve.c is not generate, so it's actually fine.  cskyv2-linux.c is
>> generated, but we are missing the XML for it, I sent a reply to the
>> patch thread that added it to ask the author to upload it.
> 
> Bah. I caught aarch64-sve.c, but not the other. Thank you for catching that.
> I will keep my eye out for it and update when cskyv2-linux.xml reappears.
> 
>>
>> When typing just "make" in features/, I get this diff:
>>
>> diff --git a/gdb/regformats/or1k-linux.dat b/gdb/regformats/or1k-linux.dat
>> index 7b64646fc65a..9a9f8a640188 100644
>> --- a/gdb/regformats/or1k-linux.dat
>> +++ b/gdb/regformats/or1k-linux.dat
>> @@ -2,7 +2,7 @@
>>   # Generated from: or1k-linux.xml
>>   name:or1k_linux
>>   xmltarget:or1k-linux.xml
>> -expedite:r1,npc
>> +expedite:
>>   32:r0
>>   32:r1
>>   32:r2
>>
>> Probably a separate fix, but I think we need
>>
>>    or1k-expedite = r1,npc
>>
>> in features/Makefile
> 
> Just typing "make" in features does nothing here. Am I neglecting to do
> something?
> 
>>>       rs6000/powerpc-32.xml \
>>>       rs6000/powerpc-32l.xml \
>>>       rs6000/powerpc-403.xml \
>>> diff --git a/gdb/features/arm/arm-secext.c b/gdb/features/arm/arm-secext.c
>>> index 39ef4afb05f..c71cffd2db6 100644
>>> --- a/gdb/features/arm/arm-secext.c
>>> +++ b/gdb/features/arm/arm-secext.c
>>> @@ -4,7 +4,7 @@
>>>   #include "gdbsupport/tdesc.h"
>>>   static int
>>> -create_feature_arm_arm_m_system (struct target_desc *result, long regnum)
>>> +create_feature_arm_arm_secext (struct target_desc *result, long regnum)
>>
>> This change looks good, it was obviously wrong before.  But I don't see
>> any call to create_feature_arm_arm_secext in the code base, so what is
>> the point of this file?  Should the arm tdep code use it?  It might be
>> worth asking in the thread that added this file.
> 
> Before submitting, I did email the original author, who CC'd Luis. I've added
> him (Luis) to CC so that he can answer here more definitively than any
> paraphrase in which I might introduce confusion.
> 
> Keith
> 

Right. So the org.gnu.gdb.arm.secext feature + registers are only reported by remote targets. We don't actually use this C file or its functions in
GDB/GDBserver.

I think it should be OK to remove these files (Linux doesn't support m-profiles, so it is unlikely this will get
used in the near future). We should add documentation about the feature, its registers and its purpose somewhere,
either in the code or in the manual. I can do that.

Otherwise the changes look OK to me. Watch out for the dynamically-generated descriptions (like aarch64-sve.c). I plan
to submit a patch to remove aarch64-tls.xml and make aarch64-tls.c generate the feature dynamically.

Is there something we should be aware of when adding such files that don't have corresponding .xml ones?

  parent reply	other threads:[~2022-09-13 14:10 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-12 22:47 Keith Seitz
2022-09-12 22:47 ` [PATCH 2/2] Constify target_desc declarations Keith Seitz
2022-09-13 13:38   ` Simon Marchi
2022-09-13 13:34 ` [PATCH 1/2] cleanup: Add missing feature/ XML files to Makefile Simon Marchi
2022-09-13 13:55   ` Keith Seitz
2022-09-13 13:57     ` Simon Marchi
2022-09-13 14:44       ` Keith Seitz
2022-09-13 14:10     ` Luis Machado [this message]
2022-09-13 15:11       ` Simon Marchi
2022-09-13 15:19         ` Luis Machado
     [not found]     ` <2e6adda3-3cdf-7520-eee9-d58f179537ab@redhat.com>
     [not found]       ` <3b7b0389-3cfe-ea44-7a22-9cb496debd4c@simark.ca>
2022-09-29 17:08         ` Keith Seitz

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=a5e6b6c0-033a-0d0d-215e-1563c6dc575a@arm.com \
    --to=luis.machado@arm.com \
    --cc=gdb-patches@sourceware.org \
    --cc=keiths@redhat.com \
    --cc=simark@simark.ca \
    /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).