binutils-gdb/gdb/arch/aarch32.c
Alan Hayward f29ec96643 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.
2019-07-19 15:01:11 +01:00

44 lines
1.3 KiB
C

/* Copyright (C) 2019 Free Software Foundation, Inc.
This file is part of GDB.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "gdbsupport/common-defs.h"
#include "aarch32.h"
#include "../features/arm/arm-core.c"
#include "../features/arm/arm-vfpv3.c"
/* See aarch32.h. */
target_desc *
aarch32_create_target_description ()
{
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;
}