aboutsummaryrefslogtreecommitdiff
path: root/gdb/target-descriptions.c
diff options
context:
space:
mode:
authorYao Qi <yao.qi@linaro.org>2017-09-05 09:54:54 +0100
committerYao Qi <yao.qi@linaro.org>2017-09-05 09:54:54 +0100
commit6c73f67f9c545425befde590f06d690a068a69e2 (patch)
treec10436be7ae0fceec70e598ae88b4d580885d104 /gdb/target-descriptions.c
parent9d3d478be5e21151d3755d7b2e6f1cd8ff92d726 (diff)
downloadfsf-binutils-gdb-6c73f67f9c545425befde590f06d690a068a69e2.zip
fsf-binutils-gdb-6c73f67f9c545425befde590f06d690a068a69e2.tar.gz
fsf-binutils-gdb-6c73f67f9c545425befde590f06d690a068a69e2.tar.bz2
Lazily and dynamically create amd64-linux target descriptions
This patch starts to use the generate c feature files to dynamically create amd64-linux target descriptions. gdb: 2017-09-05 Yao Qi <yao.qi@linaro.org> * amd64-linux-tdep.c: Don't include amd64-XXX-linux and x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c. (amd64_linux_read_description): Create target descriptions. (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX functions. Add unit tests. * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and x32-core.xml. * features/i386/64bit-avx.c: Generated. * features/i386/64bit-avx512.c: Generated. * features/i386/64bit-core.c: Generated. * features/i386/64bit-linux.c: Generated. * features/i386/64bit-mpx.c: Generated. * features/i386/64bit-pkeys.c: Generated. * features/i386/64bit-segments.c: Generated. * features/i386/64bit-sse.c: Generated. * features/i386/x32-core.c: Generated. * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature c files for amd64-linux and x32-linux.
Diffstat (limited to 'gdb/target-descriptions.c')
-rw-r--r--gdb/target-descriptions.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gdb/target-descriptions.c b/gdb/target-descriptions.c
index 7a8dac0..2b3c146 100644
--- a/gdb/target-descriptions.c
+++ b/gdb/target-descriptions.c
@@ -2329,7 +2329,9 @@ maint_print_c_tdesc_cmd (char *args, int from_tty)
/* Print c files for target features instead of target descriptions,
because c files got from target features are more flexible than the
counterparts. */
- if (startswith (filename_after_features.c_str (), "i386/32bit-"))
+ if (startswith (filename_after_features.c_str (), "i386/32bit-")
+ || startswith (filename_after_features.c_str (), "i386/64bit-")
+ || startswith (filename_after_features.c_str (), "i386/x32-core.xml"))
{
print_c_feature v (filename_after_features);