Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Terry Guo <terry.guo@arm.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [Patch]Clean up the XML files for ARM
Date: Mon, 23 Jun 2014 12:41:00 -0000	[thread overview]
Message-ID: <53A8205C.50201@redhat.com> (raw)
In-Reply-To: <002601cf8dd3$6ee6f780$4cb4e680$@arm.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


  reply	other threads:[~2014-06-23 12:41 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-11  6:46 Terry Guo
2014-06-11  8:16 ` Will Newton
2014-06-11  9:12   ` Terry Guo
2014-06-11 11:24     ` Luis Machado
2014-06-12  3:40       ` Terry Guo
2014-06-16  2:12         ` Terry Guo
2014-06-16  7:27           ` Will Newton
2014-06-20  3:05             ` Terry Guo
2014-06-20  5:03               ` Luis Gustavo
2014-06-20  9:52               ` Pedro Alves
2014-06-20 10:21                 ` Terry Guo
2014-06-20 11:21                   ` Pedro Alves
2014-06-22  4:36                     ` Terry Guo
2014-06-23 12:41                       ` Pedro Alves [this message]
2014-06-25  1:30                         ` Terry Guo
2016-10-04 10:11 [PATCH] Clean " Yao Qi
2016-10-04 18:40 ` Pedro Alves
2016-10-05  8:38   ` Yao Qi

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=53A8205C.50201@redhat.com \
    --to=palves@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=terry.guo@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