Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Alan Hayward <Alan.Hayward@arm.com>
To: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Cc: nd <nd@arm.com>, Alan Hayward <Alan.Hayward@arm.com>
Subject: [PATCH 5/7] Arm: Add xml unit tests
Date: Fri, 05 Jul 2019 09:46:00 -0000	[thread overview]
Message-ID: <20190705094525.51536-6-alan.hayward@arm.com> (raw)
In-Reply-To: <20190705094525.51536-1-alan.hayward@arm.com>

Use the record_xml_tdesc tests to prove the new target descriptions
are identical to the previous xml file ones.

This is tested as part of gdb.gdb/unittest.exp.

gdb/ChangeLog:

2019-07-05  Alan Hayward  <alan.hayward@arm.com>

	* arm-tdep.c (_initialize_arm_tdep): Add xml regression tests.
---
 gdb/arm-tdep.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c
index 91a4a785ea..ea8b22d652 100644
--- a/gdb/arm-tdep.c
+++ b/gdb/arm-tdep.c
@@ -63,6 +63,7 @@
 
 #if GDB_SELF_TEST
 #include "common/selftest.h"
+#include "aarch32-tdep.h"
 #endif
 
 static int arm_debug;
@@ -9575,6 +9576,23 @@ vfp - VFP co-processor."),
 
 #if GDB_SELF_TEST
   selftests::register_test ("arm-record", selftests::arm_record_test);
+
+  const target_desc *tdesc;
+
+  tdesc = arm_read_description (ARM_FP_TYPE_VFPV2);
+  selftests::record_xml_tdesc ("arm/arm-with-vfpv2.xml", tdesc);
+  tdesc = arm_read_description (ARM_FP_TYPE_VFPV3);
+  selftests::record_xml_tdesc ("arm/arm-with-vfpv3.xml",tdesc);
+  tdesc = arm_read_description (ARM_FP_TYPE_IWMMXT);
+  selftests::record_xml_tdesc ("arm/arm-with-iwmmxt.xml", tdesc);
+  tdesc = arm_create_mprofile_target_description (ARM_M_TYPE_M_PROFILE);
+  selftests::record_xml_tdesc ("arm/arm-with-m.xml", tdesc);
+  tdesc = arm_create_mprofile_target_description (ARM_M_TYPE_VFP_D16);
+  selftests::record_xml_tdesc ("arm/arm-with-m-vfp-d16.xml", tdesc);
+  tdesc = arm_create_mprofile_target_description (ARM_M_TYPE_WITH_FPA);
+  selftests::record_xml_tdesc ("arm/arm-with-m-fpa-layout.xml", tdesc);
+  tdesc = aarch32_read_description ();
+  selftests::record_xml_tdesc ("arm/arm-with-neon.xml", tdesc);
 #endif
 
 }
-- 
2.20.1 (Apple Git-117)


  parent reply	other threads:[~2019-07-05  9:45 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-05  9:46 [PATCH 0/7] Arm: Use feature target descriptions Alan Hayward
2019-07-05  9:45 ` [PATCH 4/7] " Alan Hayward
2019-07-05  9:45 ` [PATCH 3/7] Arm: Add read_description read funcs and use in GDB Alan Hayward
2019-07-10  3:45   ` Simon Marchi
2019-07-10 13:52     ` Alan Hayward
2019-07-10 14:26       ` Alan Hayward
2019-07-10 16:05         ` Simon Marchi
2019-07-10 16:07       ` Simon Marchi
2019-07-10 16:15         ` Alan Hayward
2019-07-05  9:46 ` [PATCH 7/7] Arm: Remove unused feature files and tests Alan Hayward
2019-07-05  9:46 ` [PATCH 2/7] Arm: Create feature files for Arm target descriptions Alan Hayward
2019-07-10  2:56   ` Simon Marchi
2019-07-10 13:22     ` Alan Hayward
2019-07-05  9:46 ` [PATCH 6/7] Arm: Use read_description funcs in gdbserver Alan Hayward
2019-07-10  4:04   ` Simon Marchi
2019-07-10 15:44     ` Alan Hayward
2019-07-05  9:46 ` Alan Hayward [this message]
2019-07-05  9:46 ` [PATCH 1/7] Arm: Minor style cleanups Alan Hayward

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=20190705094525.51536-6-alan.hayward@arm.com \
    --to=alan.hayward@arm.com \
    --cc=gdb-patches@sourceware.org \
    --cc=nd@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