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.
This commit is contained in:
Alan Hayward
2019-07-19 15:01:11 +01:00
parent d105cce5dd
commit f29ec96643
4 changed files with 72 additions and 43 deletions

View File

@@ -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;
}