Remove xml file references from target descriptions
authorAlan Hayward <alan.hayward@arm.com>
Wed, 18 Apr 2018 19:49:37 +0000 (20:49 +0100)
committerAlan Hayward <alan.hayward@arm.com>
Wed, 18 Apr 2018 19:49:37 +0000 (20:49 +0100)
gdb/
* common/tdesc.h (tdesc_create_feature): Remove xml filename
parameter.
* features/aarch64-core.c (create_feature_aarch64_core):
Regenerate.
* features/aarch64-fpu.c (create_feature_aarch64_fpu):
Likewise.
* features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
Likewise.
* features/i386/32bit-avx512.c
(create_feature_i386_32bit_avx512): Likewise.
* features/i386/32bit-core.c (create_feature_i386_32bit_core):
Likewise.
* features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
Likewise.
* features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
Likewise.
* features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
Likewise.
* features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
Likewise.
* features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
Likewise.
* features/i386/64bit-avx512.c
(create_feature_i386_64bit_avx512): Likewise.
* features/i386/64bit-core.c (create_feature_i386_64bit_core):
Likewise.
* features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
Likewise.
* features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
Likewise.
* features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
Likewise.
* features/i386/64bit-segments.c
(create_feature_i386_64bit_segments): Likewise.
* features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
Likewise.
* features/i386/x32-core.c
(create_feature_i386_x32_core): Likewise.
* features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
* features/tic6x-core.c (create_feature_tic6x_core): Likewise.
* features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
* target-descriptions.c: In generated code, don't pass xml
filename.

gdbserver/
* tdesc.c: Remove xml parameter.

26 files changed:
gdb/ChangeLog
gdb/common/tdesc.h
gdb/features/aarch64-core.c
gdb/features/aarch64-fpu.c
gdb/features/i386/32bit-avx.c
gdb/features/i386/32bit-avx512.c
gdb/features/i386/32bit-core.c
gdb/features/i386/32bit-linux.c
gdb/features/i386/32bit-mpx.c
gdb/features/i386/32bit-pkeys.c
gdb/features/i386/32bit-sse.c
gdb/features/i386/64bit-avx.c
gdb/features/i386/64bit-avx512.c
gdb/features/i386/64bit-core.c
gdb/features/i386/64bit-linux.c
gdb/features/i386/64bit-mpx.c
gdb/features/i386/64bit-pkeys.c
gdb/features/i386/64bit-segments.c
gdb/features/i386/64bit-sse.c
gdb/features/i386/x32-core.c
gdb/features/tic6x-c6xp.c
gdb/features/tic6x-core.c
gdb/features/tic6x-gp.c
gdb/gdbserver/ChangeLog
gdb/gdbserver/tdesc.c
gdb/target-descriptions.c

index 361608091f37caac6e8bf9e83681fdfe2ebc3e3d..5c8742450ec6b770f0174cab5a70db98c12a0666 100644 (file)
@@ -1,3 +1,49 @@
+2018-04-10  Alan Hayward  <alan.hayward@arm.com>
+
+       * common/tdesc.h (tdesc_create_feature): Remove xml filename
+       parameter.
+       * features/aarch64-core.c (create_feature_aarch64_core):
+       Regenerate.
+       * features/aarch64-fpu.c (create_feature_aarch64_fpu):
+       Likewise.
+       * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
+       Likewise.
+       * features/i386/32bit-avx512.c
+       (create_feature_i386_32bit_avx512): Likewise.
+       * features/i386/32bit-core.c (create_feature_i386_32bit_core):
+       Likewise.
+       * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
+       Likewise.
+       * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
+       Likewise.
+       * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
+       Likewise.
+       * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
+       Likewise.
+       * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
+       Likewise.
+       * features/i386/64bit-avx512.c
+       (create_feature_i386_64bit_avx512): Likewise.
+       * features/i386/64bit-core.c (create_feature_i386_64bit_core):
+       Likewise.
+       * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
+       Likewise.
+       * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
+       Likewise.
+       * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
+       Likewise.
+       * features/i386/64bit-segments.c
+       (create_feature_i386_64bit_segments): Likewise.
+       * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
+       Likewise.
+       * features/i386/x32-core.c
+       (create_feature_i386_x32_core): Likewise.
+       * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
+       * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
+       * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
+       * target-descriptions.c: In generated code, don't pass xml
+       filename.
+
 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
 
        * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
index 6868bf47d9af60fa44099b08bca994b49bfebb05..d13143ec020ff712f02761f64764a9493539302c 100644 (file)
@@ -315,9 +315,7 @@ struct tdesc_type *tdesc_named_type (const struct tdesc_feature *feature,
 
 /* Return the created feature named NAME in target description TDESC.  */
 struct tdesc_feature *tdesc_create_feature (struct target_desc *tdesc,
-                                           const char *name,
-                                           const char *xml = nullptr);
-
+                                           const char *name);
 
 /* Return the created vector tdesc_type named NAME in FEATURE.  */
 struct tdesc_type *tdesc_create_vector (struct tdesc_feature *feature,
index db10c4aa068d9fa1fb089f15dfc0fc3827a3a286..cd3de02cbc122d0be4a2b30a806b259222b17519 100644 (file)
@@ -8,7 +8,7 @@ create_feature_aarch64_core (struct target_desc *result, long regnum)
 {
   struct tdesc_feature *feature;
 
-  feature = tdesc_create_feature (result, "org.gnu.gdb.aarch64.core", "aarch64-core.xml");
+  feature = tdesc_create_feature (result, "org.gnu.gdb.aarch64.core");
   tdesc_type_with_fields *type_with_fields;
   type_with_fields = tdesc_create_flags (feature, "cpsr_flags", 4);
   tdesc_add_flag (type_with_fields, 0, "SP");
index 0c40c4cef22e42be5ee27bf205ee60f5dbbdbf0f..47962d1f242751f68d1a9a41aedba4ad662a2ecd 100644 (file)
@@ -8,7 +8,7 @@ create_feature_aarch64_fpu (struct target_desc *result, long regnum)
 {
   struct tdesc_feature *feature;
 
-  feature = tdesc_create_feature (result, "org.gnu.gdb.aarch64.fpu", "aarch64-fpu.xml");
+  feature = tdesc_create_feature (result, "org.gnu.gdb.aarch64.fpu");
   tdesc_type *element_type;
   element_type = tdesc_named_type (feature, "ieee_double");
   tdesc_create_vector (feature, "v2d", element_type, 2);
index 6e2cfdbdcbcc024fc81db522842e8377cb2d50c5..b9feac377cf696efbabc417895788081ac3bfb32 100644 (file)
@@ -8,7 +8,7 @@ create_feature_i386_32bit_avx (struct target_desc *result, long regnum)
 {
   struct tdesc_feature *feature;
 
-  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.avx", "32bit-avx.xml");
+  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.avx");
   tdesc_create_reg (feature, "ymm0h", regnum++, 1, NULL, 128, "uint128");
   tdesc_create_reg (feature, "ymm1h", regnum++, 1, NULL, 128, "uint128");
   tdesc_create_reg (feature, "ymm2h", regnum++, 1, NULL, 128, "uint128");
index 863c119ac40d25270729ae849b4bbb53977b4e15..51a403259db2dbae7524df606f6c03bd0f03f5cb 100644 (file)
@@ -8,7 +8,7 @@ create_feature_i386_32bit_avx512 (struct target_desc *result, long regnum)
 {
   struct tdesc_feature *feature;
 
-  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.avx512", "32bit-avx512.xml");
+  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.avx512");
   tdesc_type *element_type;
   element_type = tdesc_named_type (feature, "uint128");
   tdesc_create_vector (feature, "v2ui128", element_type, 2);
index f6de737074202f37e57861ca3f1609d1e9ecc86a..098c2ca31c6bb63d51c77aa75bc46061966403be 100644 (file)
@@ -8,7 +8,7 @@ create_feature_i386_32bit_core (struct target_desc *result, long regnum)
 {
   struct tdesc_feature *feature;
 
-  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.core", "32bit-core.xml");
+  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.core");
   tdesc_type_with_fields *type_with_fields;
   type_with_fields = tdesc_create_flags (feature, "i386_eflags", 4);
   tdesc_add_flag (type_with_fields, 0, "CF");
index af476da194e2cb0c4a88030f6480917130323de0..3bc593739c9bcbda7e7a8b0a9ca830ed2cc51e39 100644 (file)
@@ -8,7 +8,7 @@ create_feature_i386_32bit_linux (struct target_desc *result, long regnum)
 {
   struct tdesc_feature *feature;
 
-  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.linux", "32bit-linux.xml");
+  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.linux");
   regnum = 41;
   tdesc_create_reg (feature, "orig_eax", regnum++, 1, NULL, 32, "int");
   return regnum;
index 84101746b50e3a55ea6e76a9c1b6549a75de402f..8288e9d758f2718465621ed55b3514145cf1dd3b 100644 (file)
@@ -8,7 +8,7 @@ create_feature_i386_32bit_mpx (struct target_desc *result, long regnum)
 {
   struct tdesc_feature *feature;
 
-  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.mpx", "32bit-mpx.xml");
+  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.mpx");
   tdesc_type_with_fields *type_with_fields;
   type_with_fields = tdesc_create_struct (feature, "br128");
   tdesc_type *field_type;
index 272751f5781e81373e090d18e8bd133529d3570e..a2a72f40a31005153b2bd7ba35625ca39fa99b87 100644 (file)
@@ -8,7 +8,7 @@ create_feature_i386_32bit_pkeys (struct target_desc *result, long regnum)
 {
   struct tdesc_feature *feature;
 
-  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.pkeys", "32bit-pkeys.xml");
+  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.pkeys");
   tdesc_create_reg (feature, "pkru", regnum++, 1, NULL, 32, "uint32");
   return regnum;
 }
index 78fc02b863c7d1107d8360c4a4707a8df2ea4642..68fbab06a4003f0df9040a880968350d5b84f1dd 100644 (file)
@@ -8,7 +8,7 @@ create_feature_i386_32bit_sse (struct target_desc *result, long regnum)
 {
   struct tdesc_feature *feature;
 
-  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.sse", "32bit-sse.xml");
+  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.sse");
   tdesc_type *element_type;
   element_type = tdesc_named_type (feature, "ieee_single");
   tdesc_create_vector (feature, "v4f", element_type, 4);
index 5f11035af3f208b0a0bdfee36802e4cc7b29ccf9..7e45c980dbc1ed25e22c116119b0c784b551a962 100644 (file)
@@ -8,7 +8,7 @@ create_feature_i386_64bit_avx (struct target_desc *result, long regnum)
 {
   struct tdesc_feature *feature;
 
-  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.avx", "64bit-avx.xml");
+  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.avx");
   tdesc_create_reg (feature, "ymm0h", regnum++, 1, NULL, 128, "uint128");
   tdesc_create_reg (feature, "ymm1h", regnum++, 1, NULL, 128, "uint128");
   tdesc_create_reg (feature, "ymm2h", regnum++, 1, NULL, 128, "uint128");
index 733910025bab29345124e4c006136ffa19e98339..acc07a3628b2fb7e01b839eb063eabbf99ad42a7 100644 (file)
@@ -8,7 +8,7 @@ create_feature_i386_64bit_avx512 (struct target_desc *result, long regnum)
 {
   struct tdesc_feature *feature;
 
-  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.avx512", "64bit-avx512.xml");
+  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.avx512");
   tdesc_type *element_type;
   element_type = tdesc_named_type (feature, "ieee_single");
   tdesc_create_vector (feature, "v4f", element_type, 4);
index efc7016380851ab21686cd7920b57666313a1bab..617425da217da0823dd1c49440312d86d54a778f 100644 (file)
@@ -8,7 +8,7 @@ create_feature_i386_64bit_core (struct target_desc *result, long regnum)
 {
   struct tdesc_feature *feature;
 
-  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.core", "64bit-core.xml");
+  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.core");
   tdesc_type_with_fields *type_with_fields;
   type_with_fields = tdesc_create_flags (feature, "i386_eflags", 4);
   tdesc_add_flag (type_with_fields, 0, "CF");
index c9c56f193cf7bee14b3c1b2b4733cb037196c5c6..68de9d27e8bb495b5cdb0a9e681171ed0f811284 100644 (file)
@@ -8,7 +8,7 @@ create_feature_i386_64bit_linux (struct target_desc *result, long regnum)
 {
   struct tdesc_feature *feature;
 
-  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.linux", "64bit-linux.xml");
+  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.linux");
   regnum = 57;
   tdesc_create_reg (feature, "orig_rax", regnum++, 1, NULL, 64, "int");
   return regnum;
index d923813d699d331c8669e1f4493706bb0851b4ba..ce4d611d9c11aa5e63a33e304f99b66d9e63fb87 100644 (file)
@@ -8,7 +8,7 @@ create_feature_i386_64bit_mpx (struct target_desc *result, long regnum)
 {
   struct tdesc_feature *feature;
 
-  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.mpx", "64bit-mpx.xml");
+  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.mpx");
   tdesc_type_with_fields *type_with_fields;
   type_with_fields = tdesc_create_struct (feature, "br128");
   tdesc_type *field_type;
index f1cbce0ce7fbf4af2a285dae9cbb1db2c569c3a5..70b88cf74db40f341a9c7195d897604d96b58d8b 100644 (file)
@@ -8,7 +8,7 @@ create_feature_i386_64bit_pkeys (struct target_desc *result, long regnum)
 {
   struct tdesc_feature *feature;
 
-  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.pkeys", "64bit-pkeys.xml");
+  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.pkeys");
   tdesc_create_reg (feature, "pkru", regnum++, 1, NULL, 32, "uint32");
   return regnum;
 }
index 900471fc48c9361d6c453c92c1bc67a93409941d..b06d40fbda3b9a5aa0bcea01831e23399cad27d6 100644 (file)
@@ -8,7 +8,7 @@ create_feature_i386_64bit_segments (struct target_desc *result, long regnum)
 {
   struct tdesc_feature *feature;
 
-  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.segments", "64bit-segments.xml");
+  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.segments");
   tdesc_create_reg (feature, "fs_base", regnum++, 1, NULL, 64, "int");
   tdesc_create_reg (feature, "gs_base", regnum++, 1, NULL, 64, "int");
   return regnum;
index 294360197f588ddfc595e18d6386a53f108b60e6..e08309374115d16ee19c6b5bba63abbbf65ae821 100644 (file)
@@ -8,7 +8,7 @@ create_feature_i386_64bit_sse (struct target_desc *result, long regnum)
 {
   struct tdesc_feature *feature;
 
-  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.sse", "64bit-sse.xml");
+  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.sse");
   tdesc_type *element_type;
   element_type = tdesc_named_type (feature, "ieee_single");
   tdesc_create_vector (feature, "v4f", element_type, 4);
index 9b0bcc5a7ef0df5835a1a95dbd9a50688cf8cd79..dd6e1a2ed6a9234aec1c8472e2f811dfa6efc13b 100644 (file)
@@ -8,7 +8,7 @@ create_feature_i386_x32_core (struct target_desc *result, long regnum)
 {
   struct tdesc_feature *feature;
 
-  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.core", "x32-core.xml");
+  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.core");
   tdesc_type_with_fields *type_with_fields;
   type_with_fields = tdesc_create_flags (feature, "i386_eflags", 4);
   tdesc_add_flag (type_with_fields, 0, "CF");
index 261a562d903b7c1a203cd9a66f2f5fca8ac8bec7..bfd69d7fd52cf028c623bc32b0ea5e7377335411 100644 (file)
@@ -8,7 +8,7 @@ create_feature_tic6x_c6xp (struct target_desc *result, long regnum)
 {
   struct tdesc_feature *feature;
 
-  feature = tdesc_create_feature (result, "org.gnu.gdb.tic6x.c6xp", "tic6x-c6xp.xml");
+  feature = tdesc_create_feature (result, "org.gnu.gdb.tic6x.c6xp");
   tdesc_create_reg (feature, "TSR", regnum++, 1, NULL, 32, "uint32");
   tdesc_create_reg (feature, "ILC", regnum++, 1, NULL, 32, "uint32");
   tdesc_create_reg (feature, "RILC", regnum++, 1, NULL, 32, "uint32");
index 65f73ec97df8fef36a265e0a0c2891dc6aedb2aa..0415209275a792f0ad287e35ab40674b164eb786 100644 (file)
@@ -8,7 +8,7 @@ create_feature_tic6x_core (struct target_desc *result, long regnum)
 {
   struct tdesc_feature *feature;
 
-  feature = tdesc_create_feature (result, "org.gnu.gdb.tic6x.core", "tic6x-core.xml");
+  feature = tdesc_create_feature (result, "org.gnu.gdb.tic6x.core");
   tdesc_create_reg (feature, "A0", regnum++, 1, NULL, 32, "uint32");
   tdesc_create_reg (feature, "A1", regnum++, 1, NULL, 32, "uint32");
   tdesc_create_reg (feature, "A2", regnum++, 1, NULL, 32, "uint32");
index b62458837947247405564d055925acd424c6be03..4a0734c04a477e38b21b4b59a7055eade4db515a 100644 (file)
@@ -8,7 +8,7 @@ create_feature_tic6x_gp (struct target_desc *result, long regnum)
 {
   struct tdesc_feature *feature;
 
-  feature = tdesc_create_feature (result, "org.gnu.gdb.tic6x.gp", "tic6x-gp.xml");
+  feature = tdesc_create_feature (result, "org.gnu.gdb.tic6x.gp");
   tdesc_create_reg (feature, "A16", regnum++, 1, NULL, 32, "uint32");
   tdesc_create_reg (feature, "A17", regnum++, 1, NULL, 32, "uint32");
   tdesc_create_reg (feature, "A18", regnum++, 1, NULL, 32, "uint32");
index 43fa090b1ae9ed7ec22d5cd5497395ed97501a95..b88fc9f7062c1d72a09cc2bdf028065f83148417 100644 (file)
@@ -1,3 +1,7 @@
+2018-04-18  Alan Hayward  <alan.hayward@arm.com>
+
+       * tdesc.c: Remove xml parameter.
+
 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
 
        * server.c (get_features_xml): Remove cast.
index 126589f3e3e92e2500183e6a8988318d7591cfdb..92524b3dec89b29a3a65f34de422faefd09da0b9 100644 (file)
@@ -175,11 +175,9 @@ tdesc_get_features_xml (const target_desc *tdesc)
 /* See common/tdesc.h.  */
 
 struct tdesc_feature *
-tdesc_create_feature (struct target_desc *tdesc, const char *name,
-                     const char *xml)
+tdesc_create_feature (struct target_desc *tdesc, const char *name)
 {
-  struct tdesc_feature *new_feature = new tdesc_feature
-    (xml != nullptr ? xml : name);
+  struct tdesc_feature *new_feature = new tdesc_feature (name);
   tdesc->features.emplace_back (new_feature);
   return new_feature;
 }
index c0f85112b1ab260f67e5329bae22dac2e1304d7f..36ea4b12f5f1ba415ad0bb04151e890f22ae0ab7 100644 (file)
@@ -1131,8 +1131,7 @@ tdesc_use_registers (struct gdbarch *gdbarch,
 /* See common/tdesc.h.  */
 
 struct tdesc_feature *
-tdesc_create_feature (struct target_desc *tdesc, const char *name,
-                     const char *xml)
+tdesc_create_feature (struct target_desc *tdesc, const char *name)
 {
   struct tdesc_feature *new_feature = new tdesc_feature (name);
 
@@ -1600,8 +1599,8 @@ public:
     printf_unfiltered ("  struct tdesc_feature *feature;\n");
 
     printf_unfiltered
-      ("\n  feature = tdesc_create_feature (result, \"%s\", \"%s\");\n",
-       e->name.c_str (), lbasename (m_filename_after_features.c_str ()));
+      ("\n  feature = tdesc_create_feature (result, \"%s\");\n",
+       e->name.c_str ());
   }
 
   void visit_post (const tdesc_feature *e) override