binutils-gdb/gdb/features
Yao Qi 25aa13e522 Generate c for feature instead of tdesc
This patch changes Makefile and command "maint print c-files" so
that GDB can print c files for features instead target description.
Previously, we feed GDB a target description xml file, which generate
c files including multiple features.

With this patch, in Makefile, we wrap each feature xml file, and
create a temp target description which include only one feature.
Then, adjust the target description printer for them, and print
a c function for each given feature, so that we can use these
c functions later to create target description in a flexible way.

gdb:

2017-07-26  Yao Qi  <yao.qi@linaro.org>

	* features/Makefile (CFILES): Rename with TDESC_CFILES.
	(FEATURE_XMLFILES): New.
	(FEATURE_CFILES): New.
	New rules.
	(clean-cfiles): Remove generated c files.
	* features/i386/32bit-avx.c: Generated.
 	* features/i386/32bit-avx512.c: Generated.
 	* features/i386/32bit-core.c: Generated.
 	* features/i386/32bit-linux.c: Generated.
 	* features/i386/32bit-mpx.c: Generated.
 	* features/i386/32bit-pkeys.c: Generated.
 	* features/i386/32bit-sse.c: Generated.
 	* target-descriptions.c: Include algorithm.
	(tdesc_element_visitor): Add method visit_end.
	(print_c_tdesc): Implement visit_end.
	(print_c_tdesc:: m_filename_after_features): Move it to
	protected.
	(print_c_feature): New class.
	(maint_print_c_tdesc_cmd): Use print_c_feature if XML file
	name starts with "i386/32bit-".
2017-07-26 14:24:08 +01:00
..
arm Use visitor pattern for "maint print c-tdesc" 2017-07-26 12:56:54 +01:00
i386 Generate c for feature instead of tdesc 2017-07-26 14:24:08 +01:00
rs6000 Use visitor pattern for "maint print c-tdesc" 2017-07-26 12:56:54 +01:00
sparc
aarch64-core.xml
aarch64-fpu.xml
aarch64.c Use visitor pattern for "maint print c-tdesc" 2017-07-26 12:56:54 +01:00
aarch64.xml
arc-arcompact.c Use visitor pattern for "maint print c-tdesc" 2017-07-26 12:56:54 +01:00
arc-arcompact.xml
arc-v2.c Use visitor pattern for "maint print c-tdesc" 2017-07-26 12:56:54 +01:00
arc-v2.xml
btrace-conf.dtd
btrace.dtd
feature_to_c.sh
gdb-target.dtd
gdbserver-regs.xsl
library-list-aix.dtd
library-list-svr4.dtd
library-list.dtd
m68k-core.xml
Makefile Generate c for feature instead of tdesc 2017-07-26 14:24:08 +01:00
microblaze-core.xml
microblaze-stack-protect.xml
microblaze-with-stack-protect.c
microblaze-with-stack-protect.xml
microblaze.c
microblaze.xml
mips64-cp0.xml
mips64-cpu.xml
mips64-dsp-linux.c Use visitor pattern for "maint print c-tdesc" 2017-07-26 12:56:54 +01:00
mips64-dsp-linux.xml
mips64-dsp.xml
mips64-fpu.xml
mips64-linux.c Use visitor pattern for "maint print c-tdesc" 2017-07-26 12:56:54 +01:00
mips64-linux.xml
mips-cp0.xml
mips-cpu.xml
mips-dsp-linux.c Use visitor pattern for "maint print c-tdesc" 2017-07-26 12:56:54 +01:00
mips-dsp-linux.xml
mips-dsp.xml
mips-fpu.xml
mips-linux.c Use visitor pattern for "maint print c-tdesc" 2017-07-26 12:56:54 +01:00
mips-linux.xml
nds32-core.xml
nds32-fpu.xml
nds32-system.xml
nds32.c Use visitor pattern for "maint print c-tdesc" 2017-07-26 12:56:54 +01:00
nds32.xml
nios2-cpu.xml
nios2-linux.c Use visitor pattern for "maint print c-tdesc" 2017-07-26 12:56:54 +01:00
nios2-linux.xml
nios2.c Use visitor pattern for "maint print c-tdesc" 2017-07-26 12:56:54 +01:00
nios2.xml
number-regs.xsl
osdata.dtd
s390-acr.xml
s390-core32.xml
s390-core64.xml
s390-fpr.xml
s390-linux32.c Use visitor pattern for "maint print c-tdesc" 2017-07-26 12:56:54 +01:00
s390-linux32.xml
s390-linux32v1.c Use visitor pattern for "maint print c-tdesc" 2017-07-26 12:56:54 +01:00
s390-linux32v1.xml
s390-linux32v2.c Use visitor pattern for "maint print c-tdesc" 2017-07-26 12:56:54 +01:00
s390-linux32v2.xml
s390-linux64.c Use visitor pattern for "maint print c-tdesc" 2017-07-26 12:56:54 +01:00
s390-linux64.xml
s390-linux64v1.c Use visitor pattern for "maint print c-tdesc" 2017-07-26 12:56:54 +01:00
s390-linux64v1.xml
s390-linux64v2.c Use visitor pattern for "maint print c-tdesc" 2017-07-26 12:56:54 +01:00
s390-linux64v2.xml
s390-tdb.xml
s390-te-linux64.c Use visitor pattern for "maint print c-tdesc" 2017-07-26 12:56:54 +01:00
s390-te-linux64.xml
s390-tevx-linux64.c Use visitor pattern for "maint print c-tdesc" 2017-07-26 12:56:54 +01:00
s390-tevx-linux64.xml
s390-vx-linux64.c Use visitor pattern for "maint print c-tdesc" 2017-07-26 12:56:54 +01:00
s390-vx-linux64.xml
s390-vx.xml
s390x-core64.xml
s390x-linux64.c Use visitor pattern for "maint print c-tdesc" 2017-07-26 12:56:54 +01:00
s390x-linux64.xml
s390x-linux64v1.c Use visitor pattern for "maint print c-tdesc" 2017-07-26 12:56:54 +01:00
s390x-linux64v1.xml
s390x-linux64v2.c Use visitor pattern for "maint print c-tdesc" 2017-07-26 12:56:54 +01:00
s390x-linux64v2.xml
s390x-te-linux64.c Use visitor pattern for "maint print c-tdesc" 2017-07-26 12:56:54 +01:00
s390x-te-linux64.xml
s390x-tevx-linux64.c Use visitor pattern for "maint print c-tdesc" 2017-07-26 12:56:54 +01:00
s390x-tevx-linux64.xml
s390x-vx-linux64.c Use visitor pattern for "maint print c-tdesc" 2017-07-26 12:56:54 +01:00
s390x-vx-linux64.xml
sort-regs.xsl
threads.dtd
tic6x-c6xp.xml
tic6x-c62x-linux.c Use visitor pattern for "maint print c-tdesc" 2017-07-26 12:56:54 +01:00
tic6x-c62x-linux.xml
tic6x-c62x.c Use visitor pattern for "maint print c-tdesc" 2017-07-26 12:56:54 +01:00
tic6x-c62x.xml
tic6x-c64x-linux.c Use visitor pattern for "maint print c-tdesc" 2017-07-26 12:56:54 +01:00
tic6x-c64x-linux.xml
tic6x-c64x.c Use visitor pattern for "maint print c-tdesc" 2017-07-26 12:56:54 +01:00
tic6x-c64x.xml
tic6x-c64xp-linux.c Use visitor pattern for "maint print c-tdesc" 2017-07-26 12:56:54 +01:00
tic6x-c64xp-linux.xml
tic6x-c64xp.c Use visitor pattern for "maint print c-tdesc" 2017-07-26 12:56:54 +01:00
tic6x-c64xp.xml
tic6x-core.xml
tic6x-gp.xml
traceframe-info.dtd
xinclude.dtd