[binutils-gdb] Arm: Use feature target descriptions

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

[binutils-gdb] Arm: Use feature target descriptions

gdb-buildbot
*** TEST RESULTS FOR COMMIT f29ec966436f98e761f7a2a7183ad8ebab68c2ea ***

commit f29ec966436f98e761f7a2a7183ad8ebab68c2ea
Author:     Alan Hayward <[hidden email]>
AuthorDate: Fri Jul 19 15:01:11 2019 +0100
Commit:     Alan Hayward <[hidden email]>
CommitDate: Fri Jul 19 15:01:11 2019 +0100

    Arm: Use feature target descriptions
   
    In arm arm_create_target_description and
    aarch32_create_target_description create feature based target descriptions
    instead of returning the old style descriptions.
   
    Ensure the descriptions are created in exactly the same way as the old xml
    files.
   
    Remove the old initialize calls.
   
    gdb/ChangeLog:
   
            * arch/aarch32.c (aarch32_create_target_description): Create
            target descriptions using features.
            * arch/arm.c (arm_create_target_description)
            (arm_create_mprofile_target_description): Likewise.
            * arm-tdep.c (_initialize_arm_tdep): Remove tdesc init calls.

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index d5012b7e09..994e0eff68 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,11 @@
+2019-07-19  Alan Hayward  <[hidden email]>
+
+ * arch/aarch32.c (aarch32_create_target_description): Create
+ target descriptions using features.
+ * arch/arm.c (arm_create_target_description)
+ (arm_create_mprofile_target_description): Likewise.
+ * arm-tdep.c (_initialize_arm_tdep): Remove tdesc init calls.
+
 2019-07-19  Alan Hayward  <[hidden email]>
 
  * Makefile.in: Add new files.
diff --git a/gdb/arch/aarch32.c b/gdb/arch/aarch32.c
index 14d6987d3f..1e21d5ac3a 100644
--- a/gdb/arch/aarch32.c
+++ b/gdb/arch/aarch32.c
@@ -18,12 +18,26 @@
 #include "gdbsupport/common-defs.h"
 #include "aarch32.h"
 
-extern struct target_desc *tdesc_arm_with_neon;
+#include "../features/arm/arm-core.c"
+#include "../features/arm/arm-vfpv3.c"
 
 /* See aarch32.h.  */
 
 target_desc *
 aarch32_create_target_description ()
 {
-  return tdesc_arm_with_neon;
+  target_desc *tdesc = allocate_target_description ();
+
+#ifndef IN_PROCESS_AGENT
+  set_tdesc_architecture (tdesc, "arm");
+#endif
+
+  long regnum = 0;
+
+  regnum = create_feature_arm_arm_core (tdesc, regnum);
+  /* Create a vfpv3 feature, then a blank NEON feature.  */
+  regnum = create_feature_arm_arm_vfpv3 (tdesc, regnum);
+  tdesc_create_feature (tdesc, "org.gnu.gdb.arm.neon");
+
+  return tdesc;
 }
diff --git a/gdb/arch/arm.c b/gdb/arch/arm.c
index 7a0f36e4c4..ea03dd1685 100644
--- a/gdb/arch/arm.c
+++ b/gdb/arch/arm.c
@@ -21,16 +21,12 @@
 #include "gdbsupport/common-regcache.h"
 #include "arm.h"
 
-extern struct target_desc *tdesc_arm_with_vfpv2;
-extern struct target_desc *tdesc_arm_with_vfpv3;
-extern struct target_desc *tdesc_arm_with_iwmmxt;
-
-/* Temporary ifdef.  Will be removed when target descriptions are switched.  */
-#ifndef GDBSERVER
-extern struct target_desc *tdesc_arm_with_m;
-extern struct target_desc *tdesc_arm_with_m_vfp_d16;
-extern struct target_desc *tdesc_arm_with_m_fpa_layout;
-#endif
+#include "../features/arm/arm-core.c"
+#include "../features/arm/arm-vfpv2.c"
+#include "../features/arm/arm-vfpv3.c"
+#include "../features/arm/xscale-iwmmxt.c"
+#include "../features/arm/arm-m-profile.c"
+#include "../features/arm/arm-m-profile-with-fpa.c"
 
 /* See arm.h.  */
 
@@ -389,24 +385,41 @@ shifted_reg_val (struct regcache *regcache, unsigned long inst,
 target_desc *
 arm_create_target_description (arm_fp_type fp_type)
 {
+  target_desc *tdesc = allocate_target_description ();
+
+#ifndef IN_PROCESS_AGENT
+  if (fp_type == ARM_FP_TYPE_IWMMXT)
+    set_tdesc_architecture (tdesc, "iwmmxt");
+  else
+    set_tdesc_architecture (tdesc, "arm");
+#endif
+
+  long regnum = 0;
+
+  regnum = create_feature_arm_arm_core (tdesc, regnum);
+
   switch (fp_type)
     {
     case ARM_FP_TYPE_NONE:
-      return nullptr;
-/* Temporary ifdef.  Will be removed when target descriptions are switched.  */
-#ifndef GDBSERVER
+      break;
+
     case ARM_FP_TYPE_VFPV2:
-      return tdesc_arm_with_vfpv2;
+      regnum = create_feature_arm_arm_vfpv2 (tdesc, regnum);
+      break;
 
     case ARM_FP_TYPE_VFPV3:
-      return tdesc_arm_with_vfpv3;
+      regnum = create_feature_arm_arm_vfpv3 (tdesc, regnum);
+      break;
 
     case ARM_FP_TYPE_IWMMXT:
-      return tdesc_arm_with_iwmmxt;
-#endif
+      regnum = create_feature_arm_xscale_iwmmxt (tdesc, regnum);
+      break;
+
     default:
       error (_("Invalid Arm FP type: %d"), fp_type);
     }
+
+  return tdesc;
 }
 
 /* See arch/arm.h.  */
@@ -414,21 +427,32 @@ arm_create_target_description (arm_fp_type fp_type)
 target_desc *
 arm_create_mprofile_target_description (arm_m_profile_type m_type)
 {
+  target_desc *tdesc = allocate_target_description ();
+
+#ifndef IN_PROCESS_AGENT
+  set_tdesc_architecture (tdesc, "arm");
+#endif
+
+  long regnum = 0;
+
   switch (m_type)
     {
-/* Temporary ifdef.  Will be removed when target descriptions are switched.  */
-#ifndef GDBSERVER
     case ARM_M_TYPE_M_PROFILE:
-      return tdesc_arm_with_m;
+      regnum = create_feature_arm_arm_m_profile (tdesc, regnum);
+      break;
 
     case ARM_M_TYPE_VFP_D16:
-      return tdesc_arm_with_m_fpa_layout;
+      regnum = create_feature_arm_arm_m_profile (tdesc, regnum);
+      regnum = create_feature_arm_arm_vfpv2 (tdesc, regnum);
+      break;
 
     case ARM_M_TYPE_WITH_FPA:
-      return tdesc_arm_with_m_vfp_d16;
-#endif
+      regnum = create_feature_arm_arm_m_profile_with_fpa (tdesc, regnum);
+      break;
+
     default:
       error (_("Invalid Arm M type: %d"), m_type);
     }
-}
 
+  return tdesc;
+}
diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c
index 1b19b72ca1..1d655eab5c 100644
--- a/gdb/arm-tdep.c
+++ b/gdb/arm-tdep.c
@@ -61,14 +61,6 @@
 #include "record-full.h"
 #include <algorithm>
 
-#include "features/arm/arm-with-m.c"
-#include "features/arm/arm-with-m-fpa-layout.c"
-#include "features/arm/arm-with-m-vfp-d16.c"
-#include "features/arm/arm-with-iwmmxt.c"
-#include "features/arm/arm-with-vfpv2.c"
-#include "features/arm/arm-with-vfpv3.c"
-#include "features/arm/arm-with-neon.c"
-
 #if GDB_SELF_TEST
 #include "gdbsupport/selftest.h"
 #endif
@@ -9451,15 +9443,6 @@ _initialize_arm_tdep (void)
   bfd_target_elf_flavour,
   arm_elf_osabi_sniffer);
 
-  /* Initialize the standard target descriptions.  */
-  initialize_tdesc_arm_with_m ();
-  initialize_tdesc_arm_with_m_fpa_layout ();
-  initialize_tdesc_arm_with_m_vfp_d16 ();
-  initialize_tdesc_arm_with_iwmmxt ();
-  initialize_tdesc_arm_with_vfpv2 ();
-  initialize_tdesc_arm_with_vfpv3 ();
-  initialize_tdesc_arm_with_neon ();
-
   /* Add root prefix command for all "set arm"/"show arm" commands.  */
   add_prefix_cmd ("arm", no_class, set_arm_command,
   _("Various ARM-specific commands."),
Reply | Threaded
Open this post in threaded view
|

Failures on Fedora-x86_64-cc-with-index, branch master

gdb-buildbot
Buildername:
        Fedora-x86_64-cc-with-index

Worker:
        fedora-x86-64-4

Full Build URL:
        https://gdb-buildbot.osci.io/#builders/20/builds/342

Author:
        Alan Hayward <[hidden email]>

Commit tested:
        f29ec966436f98e761f7a2a7183ad8ebab68c2ea

Subject of commit:
        Arm: Use feature target descriptions

Testsuite logs (gdb.sum, gdb.log and others):
        https://gdb-buildbot.osci.io/results/Fedora-x86_64-cc-with-index/f2/f29ec966436f98e761f7a2a7183ad8ebab68c2ea/

*** Diff to previous build ***
==============================================
PASS -> KFAIL: gdb.threads/non-ldr-exit.exp: program exits normally
PASS -> KFAIL: gdb.threads/process-dies-while-handling-bp.exp: non_stop=off: cond_bp_target=0: inferior 1 exited
==============================================

*** Complete list of XFAILs for this builder ***

To obtain the list of XFAIL tests for this builder, go to:

        <https://gdb-buildbot.osci.io/results/Fedora-x86_64-cc-with-index/f2/f29ec966436f98e761f7a2a7183ad8ebab68c2ea//xfail.gz>

You can also see a pretty-printed version of the list, with more information
about each XFAIL, by going to:

        <https://gdb-buildbot.osci.io/results/Fedora-x86_64-cc-with-index/f2/f29ec966436f98e761f7a2a7183ad8ebab68c2ea//xfail.table.gz>

Reply | Threaded
Open this post in threaded view
|

Failures on Fedora-x86_64-m32, branch master

gdb-buildbot
In reply to this post by gdb-buildbot
Buildername:
        Fedora-x86_64-m32

Worker:
        fedora-x86-64-3

Full Build URL:
        https://gdb-buildbot.osci.io/#builders/17/builds/340

Author:
        Alan Hayward <[hidden email]>

Commit tested:
        f29ec966436f98e761f7a2a7183ad8ebab68c2ea

Subject of commit:
        Arm: Use feature target descriptions

Testsuite logs (gdb.sum, gdb.log and others):
        https://gdb-buildbot.osci.io/results/Fedora-x86_64-m32/f2/f29ec966436f98e761f7a2a7183ad8ebab68c2ea/

*** Diff to previous build ***
==============================================
PASS -> KFAIL: gdb.threads/process-dies-while-handling-bp.exp: non_stop=off: cond_bp_target=0: inferior 1 exited
==============================================

*** Complete list of XFAILs for this builder ***

To obtain the list of XFAIL tests for this builder, go to:

        <https://gdb-buildbot.osci.io/results/Fedora-x86_64-m32/f2/f29ec966436f98e761f7a2a7183ad8ebab68c2ea//xfail.gz>

You can also see a pretty-printed version of the list, with more information
about each XFAIL, by going to:

        <https://gdb-buildbot.osci.io/results/Fedora-x86_64-m32/f2/f29ec966436f98e761f7a2a7183ad8ebab68c2ea//xfail.table.gz>

Reply | Threaded
Open this post in threaded view
|

Failures on Fedora-x86_64-m64, branch master

gdb-buildbot
In reply to this post by gdb-buildbot
Buildername:
        Fedora-x86_64-m64

Worker:
        fedora-x86-64-4

Full Build URL:
        https://gdb-buildbot.osci.io/#builders/3/builds/365

Author:
        Alan Hayward <[hidden email]>

Commit tested:
        f29ec966436f98e761f7a2a7183ad8ebab68c2ea

Subject of commit:
        Arm: Use feature target descriptions

Testsuite logs (gdb.sum, gdb.log and others):
        https://gdb-buildbot.osci.io/results/Fedora-x86_64-m64/f2/f29ec966436f98e761f7a2a7183ad8ebab68c2ea/

*** Diff to previous build ***
==============================================
PASS -> KFAIL: gdb.threads/process-dies-while-handling-bp.exp: non_stop=on: cond_bp_target=1: inferior 1 exited
==============================================

*** Complete list of XFAILs for this builder ***

To obtain the list of XFAIL tests for this builder, go to:

        <https://gdb-buildbot.osci.io/results/Fedora-x86_64-m64/f2/f29ec966436f98e761f7a2a7183ad8ebab68c2ea//xfail.gz>

You can also see a pretty-printed version of the list, with more information
about each XFAIL, by going to:

        <https://gdb-buildbot.osci.io/results/Fedora-x86_64-m64/f2/f29ec966436f98e761f7a2a7183ad8ebab68c2ea//xfail.table.gz>

Reply | Threaded
Open this post in threaded view
|

Failures on Fedora-x86_64-native-extended-gdbserver-m32, branch master

gdb-buildbot
In reply to this post by gdb-buildbot
Buildername:
        Fedora-x86_64-native-extended-gdbserver-m32

Worker:
        fedora-x86-64-3

Full Build URL:
        https://gdb-buildbot.osci.io/#builders/4/builds/340

Author:
        Alan Hayward <[hidden email]>

Commit tested:
        f29ec966436f98e761f7a2a7183ad8ebab68c2ea

Subject of commit:
        Arm: Use feature target descriptions

Testsuite logs (gdb.sum, gdb.log and others):
        https://gdb-buildbot.osci.io/results/Fedora-x86_64-native-extended-gdbserver-m32/f2/f29ec966436f98e761f7a2a7183ad8ebab68c2ea/

*** Diff to previous build ***
==============================================
PASS -> KFAIL: gdb.threads/process-dies-while-handling-bp.exp: non_stop=on: cond_bp_target=0: inferior 1 exited
==============================================

*** Complete list of XFAILs for this builder ***

To obtain the list of XFAIL tests for this builder, go to:

        <https://gdb-buildbot.osci.io/results/Fedora-x86_64-native-extended-gdbserver-m32/f2/f29ec966436f98e761f7a2a7183ad8ebab68c2ea//xfail.gz>

You can also see a pretty-printed version of the list, with more information
about each XFAIL, by going to:

        <https://gdb-buildbot.osci.io/results/Fedora-x86_64-native-extended-gdbserver-m32/f2/f29ec966436f98e761f7a2a7183ad8ebab68c2ea//xfail.table.gz>

Reply | Threaded
Open this post in threaded view
|

Failures on Fedora-x86_64-native-gdbserver-m32, branch master

gdb-buildbot
In reply to this post by gdb-buildbot
Buildername:
        Fedora-x86_64-native-gdbserver-m32

Worker:
        fedora-x86-64-4

Full Build URL:
        https://gdb-buildbot.osci.io/#builders/24/builds/340

Author:
        Alan Hayward <[hidden email]>

Commit tested:
        f29ec966436f98e761f7a2a7183ad8ebab68c2ea

Subject of commit:
        Arm: Use feature target descriptions

Testsuite logs (gdb.sum, gdb.log and others):
        https://gdb-buildbot.osci.io/results/Fedora-x86_64-native-gdbserver-m32/f2/f29ec966436f98e761f7a2a7183ad8ebab68c2ea/

*** Diff to previous build ***
==============================================
PASS -> KFAIL: gdb.threads/process-dies-while-handling-bp.exp: non_stop=on: cond_bp_target=1: inferior 1 exited
==============================================

*** Complete list of XFAILs for this builder ***

To obtain the list of XFAIL tests for this builder, go to:

        <https://gdb-buildbot.osci.io/results/Fedora-x86_64-native-gdbserver-m32/f2/f29ec966436f98e761f7a2a7183ad8ebab68c2ea//xfail.gz>

You can also see a pretty-printed version of the list, with more information
about each XFAIL, by going to:

        <https://gdb-buildbot.osci.io/results/Fedora-x86_64-native-gdbserver-m32/f2/f29ec966436f98e761f7a2a7183ad8ebab68c2ea//xfail.table.gz>

Reply | Threaded
Open this post in threaded view
|

Failures on Fedora-i686, branch master

gdb-buildbot
In reply to this post by gdb-buildbot
Buildername:
        Fedora-i686

Worker:
        fedora-x86-64-2

Full Build URL:
        https://gdb-buildbot.osci.io/#builders/18/builds/343

Author:
        Alan Hayward <[hidden email]>

Commit tested:
        f29ec966436f98e761f7a2a7183ad8ebab68c2ea

Subject of commit:
        Arm: Use feature target descriptions

Testsuite logs (gdb.sum, gdb.log and others):
        https://gdb-buildbot.osci.io/results/Fedora-i686/f2/f29ec966436f98e761f7a2a7183ad8ebab68c2ea/

*** Diff to previous build ***
==============================================
PASS -> KFAIL: gdb.threads/process-dies-while-handling-bp.exp: non_stop=on: cond_bp_target=0: inferior 1 exited
==============================================

*** Complete list of XFAILs for this builder ***

To obtain the list of XFAIL tests for this builder, go to:

        <https://gdb-buildbot.osci.io/results/Fedora-i686/f2/f29ec966436f98e761f7a2a7183ad8ebab68c2ea//xfail.gz>

You can also see a pretty-printed version of the list, with more information
about each XFAIL, by going to:

        <https://gdb-buildbot.osci.io/results/Fedora-i686/f2/f29ec966436f98e761f7a2a7183ad8ebab68c2ea//xfail.table.gz>

Reply | Threaded
Open this post in threaded view
|

Failures on Fedora-x86_64-native-extended-gdbserver-m64, branch master

gdb-buildbot
In reply to this post by gdb-buildbot
Buildername:
        Fedora-x86_64-native-extended-gdbserver-m64

Worker:
        fedora-x86-64-1

Full Build URL:
        https://gdb-buildbot.osci.io/#builders/2/builds/342

Author:
        Alan Hayward <[hidden email]>

Commit tested:
        f29ec966436f98e761f7a2a7183ad8ebab68c2ea

Subject of commit:
        Arm: Use feature target descriptions

Testsuite logs (gdb.sum, gdb.log and others):
        https://gdb-buildbot.osci.io/results/Fedora-x86_64-native-extended-gdbserver-m64/f2/f29ec966436f98e761f7a2a7183ad8ebab68c2ea/

*** Diff to previous build ***
==============================================
FAIL -> UNRESOLVED: gdb.mi/mi-exec-run.exp: inferior-tty=main: mi=main: force-fail=1: run failure detected
FAIL -> UNRESOLVED: gdb.mi/mi-exec-run.exp: inferior-tty=main: mi=separate: force-fail=1: run failure detected
FAIL -> UNRESOLVED: gdb.mi/mi-exec-run.exp: inferior-tty=separate: mi=main: force-fail=1: run failure detected
FAIL -> UNRESOLVED: gdb.mi/mi-exec-run.exp: inferior-tty=separate: mi=separate: force-fail=1: run failure detected
==============================================

*** Complete list of XFAILs for this builder ***

To obtain the list of XFAIL tests for this builder, go to:

        <https://gdb-buildbot.osci.io/results/Fedora-x86_64-native-extended-gdbserver-m64/f2/f29ec966436f98e761f7a2a7183ad8ebab68c2ea//xfail.gz>

You can also see a pretty-printed version of the list, with more information
about each XFAIL, by going to:

        <https://gdb-buildbot.osci.io/results/Fedora-x86_64-native-extended-gdbserver-m64/f2/f29ec966436f98e761f7a2a7183ad8ebab68c2ea//xfail.table.gz>