This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [Patch]Clean up the XML files for ARM
- From: Pedro Alves <palves at redhat dot com>
- To: Terry Guo <terry dot guo at arm dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Mon, 23 Jun 2014 13:41:00 +0100
- Subject: Re: [Patch]Clean up the XML files for ARM
- Authentication-results: sourceware.org; auth=none
- References: <000b01cf8540$dafa6d80$90ef4880$ at arm dot com> <CANu=Dmj+bns6TtgSULCBy-5_+iLGPgY0aXOPD0pmQgSMbRuJ7g at mail dot gmail dot com> <001701cf8555$40925540$c1b6ffc0$ at arm dot com> <53983C82 dot 4040208 at codesourcery dot com> <001801cf85ef$f9decd40$ed9c67c0$ at arm dot com> <000001cf8908$49f991f0$ddecb5d0$ at arm dot com> <CANu=Dmg7gXZtmKA9Du=ZsYuStpKMJRe+Bypu+MQkn-XDAn52xA at mail dot gmail dot com> <001501cf8c34$7336e840$59a4b8c0$ at arm dot com> <53A40465 dot 70508 at redhat dot com> <001c01cf8c71$6e7295b0$4b57c110$ at arm dot com> <53A41949 dot 70005 at redhat dot com> <002601cf8dd3$6ee6f780$4cb4e680$ at arm dot com>
On 06/22/2014 05:35 AM, Terry Guo wrote:
> rename from gdb/features/arm-with-m-vfp-d16.c
> rename to gdb/features/arm/with-m-vfp-d16.c
> index a0da583..5f47e3d 100644
> --- a/gdb/features/arm-with-m-vfp-d16.c
> +++ b/gdb/features/arm/with-m-vfp-d16.c
> @@ -1,13 +1,13 @@
> /* THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi:set ro:
> - Original: arm-with-m-vfp-d16.xml */
> + Original: with-m-vfp-d16.xml */
Thank you.
However, I've just now realized a design problem with
losing the prefixes all over... :-(
> -struct target_desc *tdesc_arm_with_m_vfp_d16;
> +struct target_desc *tdesc_with_m_vfp_d16;
> static void
> -initialize_tdesc_arm_with_m_vfp_d16 (void)
> +initialize_tdesc_with_m_vfp_d16 (void)
> {
Losing the prefix in the generated code is problematic for
multi-arch (--enable-target=all) builds, because this way we're
open for conflict between archs. E.g., say we have
arch1/linux.xml
arch1/linux.c
arch2/linux.xml
arch2/linux.c
Then we end up with multiple conflicting definitions of
"struct target_desc *tdesc_linux;"
I think we should fix this by making the directory name be a prefix
in the generated code. That is, in the ARM case, these hunks would
disappear from your patch:
> -struct target_desc *tdesc_arm_with_m_vfp_d16;
> +struct target_desc *tdesc_with_m_vfp_d16;
> static void
> -initialize_tdesc_arm_with_m_vfp_d16 (void)
> +initialize_tdesc_with_m_vfp_d16 (void)
> {
Would you like to work on this?
--
Pedro Alves