This is the mail archive of the
gdb-testers@sourceware.org
mailing list for the GDB project.
[binutils-gdb] Generate c for feature instead of tdesc
- From: sergiodj+buildbot at sergiodj dot net
- To: gdb-testers at sourceware dot org
- Date: Wed, 26 Jul 2017 09:53:53 -0400
- Subject: [binutils-gdb] Generate c for feature instead of tdesc
- Authentication-results: sourceware.org; auth=none
*** TEST RESULTS FOR COMMIT 25aa13e522c595cbdbb3868f1daa434a17ba2ab2 ***
Author: Yao Qi <yao.qi@linaro.org>
Branch: master
Commit: 25aa13e522c595cbdbb3868f1daa434a17ba2ab2
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-".