From: Alan Hayward Date: Mon, 26 Feb 2018 10:51:36 +0000 (+0000) Subject: Move arch/tdesc.h to common/tdesc.h X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f46cd62a69b8050c7c30a53b29a781a9b5e9f062;p=binutils-gdb.git Move arch/tdesc.h to common/tdesc.h gdb/ * arch/amd64.h: Use common/tdesc.h. * arch/i386.c: Likewise. * arch/i386.h: Likewise. * arch/tic6x.c: Likewise. * arch/tdesc.h: Move file from here... * common/tdesc.h: ...to here. * features/aarch64-core.c: Regenerate. * features/aarch64-fpu.c: Regenerate. * features/i386/32bit-avx.c: Regenerate. * features/i386/32bit-avx512.c: Regenerate. * features/i386/32bit-core.c: Regenerate. * features/i386/32bit-linux.c: Regenerate. * features/i386/32bit-mpx.c: Regenerate. * features/i386/32bit-pkeys.c: Regenerate. * features/i386/32bit-sse.c: Regenerate. * features/i386/64bit-avx.c: Regenerate. * features/i386/64bit-avx512.c: Regenerate. * features/i386/64bit-core.c: Regenerate. * features/i386/64bit-linux.c: Regenerate. * features/i386/64bit-mpx.c: Regenerate. * features/i386/64bit-pkeys.c: Regenerate. * features/i386/64bit-segments.c: Regenerate. * features/i386/64bit-sse.c: Regenerate. * features/i386/x32-core.c: Regenerate. * features/tic6x-c6xp.c: Regenerate. * features/tic6x-core.c: Regenerate. * features/tic6x-gp.c: Regenerate. * target-descriptions.c: Use common/tdesc.h. * target-descriptions.h: Likewise. gdbserver/ * tdesc.c: Use common/tdesc.h. * tdesc.h: Likewise. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index f9fc3ad4773..14e79140563 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,35 @@ +2018-02-26 Alan Hayward + + * arch/amd64.h: Use common/tdesc.h. + * arch/i386.c: Likewise. + * arch/i386.h: Likewise. + * arch/tic6x.c: Likewise. + * arch/tdesc.h: Move file from here... + * common/tdesc.h: ...to here. + * features/aarch64-core.c: Regenerate. + * features/aarch64-fpu.c: Regenerate. + * features/i386/32bit-avx.c: Regenerate. + * features/i386/32bit-avx512.c: Regenerate. + * features/i386/32bit-core.c: Regenerate. + * features/i386/32bit-linux.c: Regenerate. + * features/i386/32bit-mpx.c: Regenerate. + * features/i386/32bit-pkeys.c: Regenerate. + * features/i386/32bit-sse.c: Regenerate. + * features/i386/64bit-avx.c: Regenerate. + * features/i386/64bit-avx512.c: Regenerate. + * features/i386/64bit-core.c: Regenerate. + * features/i386/64bit-linux.c: Regenerate. + * features/i386/64bit-mpx.c: Regenerate. + * features/i386/64bit-pkeys.c: Regenerate. + * features/i386/64bit-segments.c: Regenerate. + * features/i386/64bit-sse.c: Regenerate. + * features/i386/x32-core.c: Regenerate. + * features/tic6x-c6xp.c: Regenerate. + * features/tic6x-core.c: Regenerate. + * features/tic6x-gp.c: Regenerate. + * target-descriptions.c: Use common/tdesc.h. + * target-descriptions.h: Likewise. + 2018-02-24 Tom Tromey * linux-thread-db.c (try_thread_db_load_from_pdir_1) diff --git a/gdb/arch/amd64.h b/gdb/arch/amd64.h index b50051f698f..c0c4dc27efe 100644 --- a/gdb/arch/amd64.h +++ b/gdb/arch/amd64.h @@ -15,7 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "tdesc.h" +#include "common/tdesc.h" #include target_desc *amd64_create_target_description (uint64_t xcr0, bool is_x32, diff --git a/gdb/arch/i386.c b/gdb/arch/i386.c index 82e9b118bda..92b6973eb70 100644 --- a/gdb/arch/i386.c +++ b/gdb/arch/i386.c @@ -17,7 +17,7 @@ #include "common-defs.h" #include "i386.h" -#include "tdesc.h" +#include "common/tdesc.h" #include "x86-xstate.h" #include diff --git a/gdb/arch/i386.h b/gdb/arch/i386.h index ffc34e39138..8f3fe3ba420 100644 --- a/gdb/arch/i386.h +++ b/gdb/arch/i386.h @@ -15,7 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "tdesc.h" +#include "common/tdesc.h" #include target_desc *i386_create_target_description (uint64_t xcr0, bool is_linux); diff --git a/gdb/arch/tdesc.h b/gdb/arch/tdesc.h deleted file mode 100644 index cc11651dcaa..00000000000 --- a/gdb/arch/tdesc.h +++ /dev/null @@ -1,95 +0,0 @@ -/* Copyright (C) 2006-2018 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 . */ - -#ifndef ARCH_TDESC_H -#define ARCH_TDESC_H 1 - -struct tdesc_feature; -struct tdesc_type; -struct tdesc_type_builtin; -struct tdesc_type_vector; -struct tdesc_type_with_fields; -struct tdesc_reg; -struct target_desc; - -/* Allocate a new target_desc. */ -target_desc *allocate_target_description (void); - -/* Set TARGET_DESC's architecture by NAME. */ -void set_tdesc_architecture (target_desc *target_desc, - const char *name); - -/* Set TARGET_DESC's osabi by NAME. */ -void set_tdesc_osabi (target_desc *target_desc, const char *name); - -/* Return the type associated with ID in the context of FEATURE, or - NULL if none. */ -struct tdesc_type *tdesc_named_type (const struct tdesc_feature *feature, - const char *id); - -/* Return the created feature named NAME in target description TDESC. */ -struct tdesc_feature *tdesc_create_feature (struct target_desc *tdesc, - const char *name, - const char *xml = nullptr); - - -/* Return the created vector tdesc_type named NAME in FEATURE. */ -struct tdesc_type *tdesc_create_vector (struct tdesc_feature *feature, - const char *name, - struct tdesc_type *field_type, - int count); - -/* Return the created struct tdesc_type named NAME in FEATURE. */ -tdesc_type_with_fields *tdesc_create_struct (struct tdesc_feature *feature, - const char *name); - -/* Return the created union tdesc_type named NAME in FEATURE. */ -tdesc_type_with_fields *tdesc_create_union (struct tdesc_feature *feature, - const char *name); - -/* Return the created flags tdesc_type named NAME in FEATURE. */ -tdesc_type_with_fields *tdesc_create_flags (struct tdesc_feature *feature, - const char *name, - int size); - -/* Add a new field to TYPE. FIELD_NAME is its name, and FIELD_TYPE is - its type. */ -void tdesc_add_field (tdesc_type_with_fields *type, const char *field_name, - struct tdesc_type *field_type); - -/* Set the total length of TYPE. Structs which contain bitfields may - omit the reserved bits, so the end of the last field may not - suffice. */ -void tdesc_set_struct_size (tdesc_type_with_fields *type, int size); - -/* Add a new untyped bitfield to TYPE. - Untyped bitfields become either uint32 or uint64 depending on the size - of the underlying type. */ -void tdesc_add_bitfield (tdesc_type_with_fields *type, const char *field_name, - int start, int end); - -/* A flag is just a typed(bool) single-bit bitfield. - This function is kept to minimize changes in generated files. */ -void tdesc_add_flag (tdesc_type_with_fields *type, int start, - const char *flag_name); - -/* Create a register in feature FEATURE. */ -void tdesc_create_reg (struct tdesc_feature *feature, const char *name, - int regnum, int save_restore, const char *group, - int bitsize, const char *type); - -#endif /* ARCH_TDESC_H */ diff --git a/gdb/arch/tic6x.c b/gdb/arch/tic6x.c index 9fc36cd4ca4..6b57baa3241 100644 --- a/gdb/arch/tic6x.c +++ b/gdb/arch/tic6x.c @@ -15,7 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "tdesc.h" +#include "common/tdesc.h" #include "tic6x.h" #include "common/common-defs.h" diff --git a/gdb/common/tdesc.h b/gdb/common/tdesc.h new file mode 100644 index 00000000000..cc11651dcaa --- /dev/null +++ b/gdb/common/tdesc.h @@ -0,0 +1,95 @@ +/* Copyright (C) 2006-2018 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 . */ + +#ifndef ARCH_TDESC_H +#define ARCH_TDESC_H 1 + +struct tdesc_feature; +struct tdesc_type; +struct tdesc_type_builtin; +struct tdesc_type_vector; +struct tdesc_type_with_fields; +struct tdesc_reg; +struct target_desc; + +/* Allocate a new target_desc. */ +target_desc *allocate_target_description (void); + +/* Set TARGET_DESC's architecture by NAME. */ +void set_tdesc_architecture (target_desc *target_desc, + const char *name); + +/* Set TARGET_DESC's osabi by NAME. */ +void set_tdesc_osabi (target_desc *target_desc, const char *name); + +/* Return the type associated with ID in the context of FEATURE, or + NULL if none. */ +struct tdesc_type *tdesc_named_type (const struct tdesc_feature *feature, + const char *id); + +/* Return the created feature named NAME in target description TDESC. */ +struct tdesc_feature *tdesc_create_feature (struct target_desc *tdesc, + const char *name, + const char *xml = nullptr); + + +/* Return the created vector tdesc_type named NAME in FEATURE. */ +struct tdesc_type *tdesc_create_vector (struct tdesc_feature *feature, + const char *name, + struct tdesc_type *field_type, + int count); + +/* Return the created struct tdesc_type named NAME in FEATURE. */ +tdesc_type_with_fields *tdesc_create_struct (struct tdesc_feature *feature, + const char *name); + +/* Return the created union tdesc_type named NAME in FEATURE. */ +tdesc_type_with_fields *tdesc_create_union (struct tdesc_feature *feature, + const char *name); + +/* Return the created flags tdesc_type named NAME in FEATURE. */ +tdesc_type_with_fields *tdesc_create_flags (struct tdesc_feature *feature, + const char *name, + int size); + +/* Add a new field to TYPE. FIELD_NAME is its name, and FIELD_TYPE is + its type. */ +void tdesc_add_field (tdesc_type_with_fields *type, const char *field_name, + struct tdesc_type *field_type); + +/* Set the total length of TYPE. Structs which contain bitfields may + omit the reserved bits, so the end of the last field may not + suffice. */ +void tdesc_set_struct_size (tdesc_type_with_fields *type, int size); + +/* Add a new untyped bitfield to TYPE. + Untyped bitfields become either uint32 or uint64 depending on the size + of the underlying type. */ +void tdesc_add_bitfield (tdesc_type_with_fields *type, const char *field_name, + int start, int end); + +/* A flag is just a typed(bool) single-bit bitfield. + This function is kept to minimize changes in generated files. */ +void tdesc_add_flag (tdesc_type_with_fields *type, int start, + const char *flag_name); + +/* Create a register in feature FEATURE. */ +void tdesc_create_reg (struct tdesc_feature *feature, const char *name, + int regnum, int save_restore, const char *group, + int bitsize, const char *type); + +#endif /* ARCH_TDESC_H */ diff --git a/gdb/features/aarch64-core.c b/gdb/features/aarch64-core.c index 3707b7e0556..db10c4aa068 100644 --- a/gdb/features/aarch64-core.c +++ b/gdb/features/aarch64-core.c @@ -1,7 +1,7 @@ /* THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi:set ro: Original: aarch64-core.xml */ -#include "arch/tdesc.h" +#include "common/tdesc.h" static int create_feature_aarch64_core (struct target_desc *result, long regnum) diff --git a/gdb/features/aarch64-fpu.c b/gdb/features/aarch64-fpu.c index cac3981f7dd..0c40c4cef22 100644 --- a/gdb/features/aarch64-fpu.c +++ b/gdb/features/aarch64-fpu.c @@ -1,7 +1,7 @@ /* THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi:set ro: Original: aarch64-fpu.xml */ -#include "arch/tdesc.h" +#include "common/tdesc.h" static int create_feature_aarch64_fpu (struct target_desc *result, long regnum) diff --git a/gdb/features/i386/32bit-avx.c b/gdb/features/i386/32bit-avx.c index 8a0c35655d9..6e2cfdbdcbc 100644 --- a/gdb/features/i386/32bit-avx.c +++ b/gdb/features/i386/32bit-avx.c @@ -1,7 +1,7 @@ /* THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi:set ro: Original: 32bit-avx.xml */ -#include "arch/tdesc.h" +#include "common/tdesc.h" static int create_feature_i386_32bit_avx (struct target_desc *result, long regnum) diff --git a/gdb/features/i386/32bit-avx512.c b/gdb/features/i386/32bit-avx512.c index 39c7e9771a9..863c119ac40 100644 --- a/gdb/features/i386/32bit-avx512.c +++ b/gdb/features/i386/32bit-avx512.c @@ -1,7 +1,7 @@ /* THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi:set ro: Original: 32bit-avx512.xml */ -#include "arch/tdesc.h" +#include "common/tdesc.h" static int create_feature_i386_32bit_avx512 (struct target_desc *result, long regnum) diff --git a/gdb/features/i386/32bit-core.c b/gdb/features/i386/32bit-core.c index 294e86d81ee..f6de7370742 100644 --- a/gdb/features/i386/32bit-core.c +++ b/gdb/features/i386/32bit-core.c @@ -1,7 +1,7 @@ /* THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi:set ro: Original: 32bit-core.xml */ -#include "arch/tdesc.h" +#include "common/tdesc.h" static int create_feature_i386_32bit_core (struct target_desc *result, long regnum) diff --git a/gdb/features/i386/32bit-linux.c b/gdb/features/i386/32bit-linux.c index 136e3d71b41..af476da194e 100644 --- a/gdb/features/i386/32bit-linux.c +++ b/gdb/features/i386/32bit-linux.c @@ -1,7 +1,7 @@ /* THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi:set ro: Original: 32bit-linux.xml */ -#include "arch/tdesc.h" +#include "common/tdesc.h" static int create_feature_i386_32bit_linux (struct target_desc *result, long regnum) diff --git a/gdb/features/i386/32bit-mpx.c b/gdb/features/i386/32bit-mpx.c index 8f1be3a60f0..84101746b50 100644 --- a/gdb/features/i386/32bit-mpx.c +++ b/gdb/features/i386/32bit-mpx.c @@ -1,7 +1,7 @@ /* THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi:set ro: Original: 32bit-mpx.xml */ -#include "arch/tdesc.h" +#include "common/tdesc.h" static int create_feature_i386_32bit_mpx (struct target_desc *result, long regnum) diff --git a/gdb/features/i386/32bit-pkeys.c b/gdb/features/i386/32bit-pkeys.c index 4ad7649915f..272751f5781 100644 --- a/gdb/features/i386/32bit-pkeys.c +++ b/gdb/features/i386/32bit-pkeys.c @@ -1,7 +1,7 @@ /* THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi:set ro: Original: 32bit-pkeys.xml */ -#include "arch/tdesc.h" +#include "common/tdesc.h" static int create_feature_i386_32bit_pkeys (struct target_desc *result, long regnum) diff --git a/gdb/features/i386/32bit-sse.c b/gdb/features/i386/32bit-sse.c index cf489603538..78fc02b863c 100644 --- a/gdb/features/i386/32bit-sse.c +++ b/gdb/features/i386/32bit-sse.c @@ -1,7 +1,7 @@ /* THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi:set ro: Original: 32bit-sse.xml */ -#include "arch/tdesc.h" +#include "common/tdesc.h" static int create_feature_i386_32bit_sse (struct target_desc *result, long regnum) diff --git a/gdb/features/i386/64bit-avx.c b/gdb/features/i386/64bit-avx.c index d8e391423bc..5f11035af3f 100644 --- a/gdb/features/i386/64bit-avx.c +++ b/gdb/features/i386/64bit-avx.c @@ -1,7 +1,7 @@ /* THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi:set ro: Original: 64bit-avx.xml */ -#include "arch/tdesc.h" +#include "common/tdesc.h" static int create_feature_i386_64bit_avx (struct target_desc *result, long regnum) diff --git a/gdb/features/i386/64bit-avx512.c b/gdb/features/i386/64bit-avx512.c index e103e43464c..733910025ba 100644 --- a/gdb/features/i386/64bit-avx512.c +++ b/gdb/features/i386/64bit-avx512.c @@ -1,7 +1,7 @@ /* THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi:set ro: Original: 64bit-avx512.xml */ -#include "arch/tdesc.h" +#include "common/tdesc.h" static int create_feature_i386_64bit_avx512 (struct target_desc *result, long regnum) diff --git a/gdb/features/i386/64bit-core.c b/gdb/features/i386/64bit-core.c index 9e39ee42d9a..efc70163808 100644 --- a/gdb/features/i386/64bit-core.c +++ b/gdb/features/i386/64bit-core.c @@ -1,7 +1,7 @@ /* THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi:set ro: Original: 64bit-core.xml */ -#include "arch/tdesc.h" +#include "common/tdesc.h" static int create_feature_i386_64bit_core (struct target_desc *result, long regnum) diff --git a/gdb/features/i386/64bit-linux.c b/gdb/features/i386/64bit-linux.c index 570910b9cc0..c9c56f193cf 100644 --- a/gdb/features/i386/64bit-linux.c +++ b/gdb/features/i386/64bit-linux.c @@ -1,7 +1,7 @@ /* THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi:set ro: Original: 64bit-linux.xml */ -#include "arch/tdesc.h" +#include "common/tdesc.h" static int create_feature_i386_64bit_linux (struct target_desc *result, long regnum) diff --git a/gdb/features/i386/64bit-mpx.c b/gdb/features/i386/64bit-mpx.c index 725e76a0dd9..d923813d699 100644 --- a/gdb/features/i386/64bit-mpx.c +++ b/gdb/features/i386/64bit-mpx.c @@ -1,7 +1,7 @@ /* THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi:set ro: Original: 64bit-mpx.xml */ -#include "arch/tdesc.h" +#include "common/tdesc.h" static int create_feature_i386_64bit_mpx (struct target_desc *result, long regnum) diff --git a/gdb/features/i386/64bit-pkeys.c b/gdb/features/i386/64bit-pkeys.c index 9d974c3772d..f1cbce0ce7f 100644 --- a/gdb/features/i386/64bit-pkeys.c +++ b/gdb/features/i386/64bit-pkeys.c @@ -1,7 +1,7 @@ /* THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi:set ro: Original: 64bit-pkeys.xml */ -#include "arch/tdesc.h" +#include "common/tdesc.h" static int create_feature_i386_64bit_pkeys (struct target_desc *result, long regnum) diff --git a/gdb/features/i386/64bit-segments.c b/gdb/features/i386/64bit-segments.c index 7a1fbf53f35..900471fc48c 100644 --- a/gdb/features/i386/64bit-segments.c +++ b/gdb/features/i386/64bit-segments.c @@ -1,7 +1,7 @@ /* THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi:set ro: Original: 64bit-segments.xml */ -#include "arch/tdesc.h" +#include "common/tdesc.h" static int create_feature_i386_64bit_segments (struct target_desc *result, long regnum) diff --git a/gdb/features/i386/64bit-sse.c b/gdb/features/i386/64bit-sse.c index 2859217f458..294360197f5 100644 --- a/gdb/features/i386/64bit-sse.c +++ b/gdb/features/i386/64bit-sse.c @@ -1,7 +1,7 @@ /* THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi:set ro: Original: 64bit-sse.xml */ -#include "arch/tdesc.h" +#include "common/tdesc.h" static int create_feature_i386_64bit_sse (struct target_desc *result, long regnum) diff --git a/gdb/features/i386/x32-core.c b/gdb/features/i386/x32-core.c index c268e11bea9..9b0bcc5a7ef 100644 --- a/gdb/features/i386/x32-core.c +++ b/gdb/features/i386/x32-core.c @@ -1,7 +1,7 @@ /* THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi:set ro: Original: x32-core.xml */ -#include "arch/tdesc.h" +#include "common/tdesc.h" static int create_feature_i386_x32_core (struct target_desc *result, long regnum) diff --git a/gdb/features/tic6x-c6xp.c b/gdb/features/tic6x-c6xp.c index 5b0f566ee4c..261a562d903 100644 --- a/gdb/features/tic6x-c6xp.c +++ b/gdb/features/tic6x-c6xp.c @@ -1,7 +1,7 @@ /* THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi:set ro: Original: tic6x-c6xp.xml */ -#include "arch/tdesc.h" +#include "common/tdesc.h" static int create_feature_tic6x_c6xp (struct target_desc *result, long regnum) diff --git a/gdb/features/tic6x-core.c b/gdb/features/tic6x-core.c index 823d4c1da10..65f73ec97df 100644 --- a/gdb/features/tic6x-core.c +++ b/gdb/features/tic6x-core.c @@ -1,7 +1,7 @@ /* THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi:set ro: Original: tic6x-core.xml */ -#include "arch/tdesc.h" +#include "common/tdesc.h" static int create_feature_tic6x_core (struct target_desc *result, long regnum) diff --git a/gdb/features/tic6x-gp.c b/gdb/features/tic6x-gp.c index df0d0e37fc2..b6245883794 100644 --- a/gdb/features/tic6x-gp.c +++ b/gdb/features/tic6x-gp.c @@ -1,7 +1,7 @@ /* THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi:set ro: Original: tic6x-gp.xml */ -#include "arch/tdesc.h" +#include "common/tdesc.h" static int create_feature_tic6x_gp (struct target_desc *result, long regnum) diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index f105efa3daa..81e44f60fd3 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,3 +1,8 @@ +2018-02-26 Alan Hayward + + * tdesc.c: Use common/tdesc.h. + * tdesc.h: Likewise. + 2018-02-20 Alan Hayward Simon Marchi diff --git a/gdb/gdbserver/tdesc.c b/gdb/gdbserver/tdesc.c index c39b5e7d27e..00a5e8dc4d6 100644 --- a/gdb/gdbserver/tdesc.c +++ b/gdb/gdbserver/tdesc.c @@ -66,7 +66,7 @@ current_target_desc (void) return current_process ()->tdesc; } -/* See arch/tdesc.h. */ +/* See common/tdesc.h. */ void set_tdesc_architecture (struct target_desc *target_desc, @@ -75,7 +75,7 @@ set_tdesc_architecture (struct target_desc *target_desc, target_desc->arch = xstrdup (name); } -/* See arch/tdesc.h. */ +/* See common/tdesc.h. */ void set_tdesc_osabi (struct target_desc *target_desc, const char *name) @@ -132,7 +132,7 @@ tdesc_get_features_xml (target_desc *tdesc) struct tdesc_type {}; -/* See arch/tdesc.h. */ +/* See common/tdesc.h. */ struct tdesc_feature * tdesc_create_feature (struct target_desc *tdesc, const char *name, @@ -144,7 +144,7 @@ tdesc_create_feature (struct target_desc *tdesc, const char *name, return tdesc; } -/* See arch/tdesc.h. */ +/* See common/tdesc.h. */ tdesc_type_with_fields * tdesc_create_flags (struct tdesc_feature *feature, const char *name, @@ -153,14 +153,14 @@ tdesc_create_flags (struct tdesc_feature *feature, const char *name, return NULL; } -/* See arch/tdesc.h. */ +/* See common/tdesc.h. */ void tdesc_add_flag (tdesc_type_with_fields *type, int start, const char *flag_name) {} -/* See arch/tdesc.h. */ +/* See common/tdesc.h. */ struct tdesc_type * tdesc_named_type (const struct tdesc_feature *feature, const char *id) @@ -168,7 +168,7 @@ tdesc_named_type (const struct tdesc_feature *feature, const char *id) return NULL; } -/* See arch/tdesc.h. */ +/* See common/tdesc.h. */ tdesc_type_with_fields * tdesc_create_union (struct tdesc_feature *feature, const char *id) @@ -176,7 +176,7 @@ tdesc_create_union (struct tdesc_feature *feature, const char *id) return NULL; } -/* See arch/tdesc.h. */ +/* See common/tdesc.h. */ tdesc_type_with_fields * tdesc_create_struct (struct tdesc_feature *feature, const char *id) @@ -184,7 +184,7 @@ tdesc_create_struct (struct tdesc_feature *feature, const char *id) return NULL; } -/* See arch/tdesc.h. */ +/* See common/tdesc.h. */ void tdesc_create_reg (struct tdesc_feature *feature, const char *name, @@ -212,7 +212,7 @@ tdesc_create_reg (struct tdesc_feature *feature, const char *name, tdesc->reg_defs.push_back (reg); } -/* See arch/tdesc.h. */ +/* See common/tdesc.h. */ struct tdesc_type * tdesc_create_vector (struct tdesc_feature *feature, const char *name, @@ -226,14 +226,14 @@ tdesc_add_bitfield (tdesc_type_with_fields *type, const char *field_name, int start, int end) {} -/* See arch/tdesc.h. */ +/* See common/tdesc.h. */ void tdesc_add_field (tdesc_type_with_fields *type, const char *field_name, struct tdesc_type *field_type) {} -/* See arch/tdesc.h. */ +/* See common/tdesc.h. */ void tdesc_set_struct_size (tdesc_type_with_fields *type, int size) diff --git a/gdb/gdbserver/tdesc.h b/gdb/gdbserver/tdesc.h index 783500598b5..d21574ca73e 100644 --- a/gdb/gdbserver/tdesc.h +++ b/gdb/gdbserver/tdesc.h @@ -19,7 +19,7 @@ #ifndef TDESC_H #define TDESC_H -#include "arch/tdesc.h" +#include "common/tdesc.h" #include "regdef.h" #include diff --git a/gdb/target-descriptions.c b/gdb/target-descriptions.c index ce4cf76899c..5d34e29a867 100644 --- a/gdb/target-descriptions.c +++ b/gdb/target-descriptions.c @@ -1025,7 +1025,7 @@ tdesc_predefined_type (enum tdesc_type_kind kind) gdb_assert_not_reached ("bad predefined tdesc type"); } -/* See arch/tdesc.h. */ +/* See common/tdesc.h. */ struct tdesc_type * tdesc_named_type (const struct tdesc_feature *feature, const char *id) @@ -1476,7 +1476,7 @@ tdesc_use_registers (struct gdbarch *gdbarch, } -/* See arch/tdesc.h. */ +/* See common/tdesc.h. */ void tdesc_create_reg (struct tdesc_feature *feature, const char *name, @@ -1489,7 +1489,7 @@ tdesc_create_reg (struct tdesc_feature *feature, const char *name, feature->registers.emplace_back (reg); } -/* See arch/tdesc.h. */ +/* See common/tdesc.h. */ struct tdesc_type * tdesc_create_vector (struct tdesc_feature *feature, const char *name, @@ -1501,7 +1501,7 @@ tdesc_create_vector (struct tdesc_feature *feature, const char *name, return type; } -/* See arch/tdesc.h. */ +/* See common/tdesc.h. */ tdesc_type_with_fields * tdesc_create_struct (struct tdesc_feature *feature, const char *name) @@ -1513,7 +1513,7 @@ tdesc_create_struct (struct tdesc_feature *feature, const char *name) return type; } -/* See arch/tdesc.h. */ +/* See common/tdesc.h. */ void tdesc_set_struct_size (tdesc_type_with_fields *type, int size) @@ -1523,7 +1523,7 @@ tdesc_set_struct_size (tdesc_type_with_fields *type, int size) type->size = size; } -/* See arch/tdesc.h. */ +/* See common/tdesc.h. */ tdesc_type_with_fields * tdesc_create_union (struct tdesc_feature *feature, const char *name) @@ -1535,7 +1535,7 @@ tdesc_create_union (struct tdesc_feature *feature, const char *name) return type; } -/* See arch/tdesc.h. */ +/* See common/tdesc.h. */ tdesc_type_with_fields * tdesc_create_flags (struct tdesc_feature *feature, const char *name, @@ -1563,7 +1563,7 @@ tdesc_create_enum (struct tdesc_feature *feature, const char *name, return type; } -/* See arch/tdesc.h. */ +/* See common/tdesc.h. */ void tdesc_add_field (tdesc_type_with_fields *type, const char *field_name, @@ -1588,7 +1588,7 @@ tdesc_add_typed_bitfield (tdesc_type_with_fields *type, const char *field_name, type->fields.emplace_back (field_name, field_type, start, end); } -/* See arch/tdesc.h. */ +/* See common/tdesc.h. */ void tdesc_add_bitfield (tdesc_type_with_fields *type, const char *field_name, @@ -1606,7 +1606,7 @@ tdesc_add_bitfield (tdesc_type_with_fields *type, const char *field_name, tdesc_add_typed_bitfield (type, field_name, start, end, field_type); } -/* See arch/tdesc.h. */ +/* See common/tdesc.h. */ void tdesc_add_flag (tdesc_type_with_fields *type, int start, @@ -1630,7 +1630,7 @@ tdesc_add_enum_value (tdesc_type_with_fields *type, int value, value, -1); } -/* See arch/tdesc.h. */ +/* See common/tdesc.h. */ struct tdesc_feature * tdesc_create_feature (struct target_desc *tdesc, const char *name, @@ -1696,7 +1696,7 @@ set_tdesc_property (struct target_desc *target_desc, target_desc->properties.emplace_back (key, value); } -/* See arch/tdesc.h. */ +/* See common/tdesc.h. */ void set_tdesc_architecture (struct target_desc *target_desc, @@ -1712,7 +1712,7 @@ set_tdesc_architecture (struct target_desc *target_desc, target_desc->arch = arch; } -/* See arch/tdesc.h. */ +/* See common/tdesc.h. */ void set_tdesc_osabi (struct target_desc *target_desc, const char *name) @@ -2077,7 +2077,7 @@ public: printf_unfiltered (" Original: %s */\n\n", lbasename (m_filename_after_features.c_str ())); - printf_unfiltered ("#include \"arch/tdesc.h\"\n"); + printf_unfiltered ("#include \"common/tdesc.h\"\n"); printf_unfiltered ("\n"); } diff --git a/gdb/target-descriptions.h b/gdb/target-descriptions.h index 759fd34a0fe..fa554fddf62 100644 --- a/gdb/target-descriptions.h +++ b/gdb/target-descriptions.h @@ -21,7 +21,7 @@ #ifndef TARGET_DESCRIPTIONS_H #define TARGET_DESCRIPTIONS_H 1 -#include "arch/tdesc.h" +#include "common/tdesc.h" struct tdesc_arch_data; struct target_ops;