[PATCH 1/2] cleanup: Add missing feature/ XML files to Makefile
Luis Machado
luis.machado@arm.com
Tue Sep 13 14:10:37 GMT 2022
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?
More information about the Gdb-patches
mailing list