diff options
author | Simon Marchi <simon.marchi@ericsson.com> | 2017-12-21 18:19:17 -0500 |
---|---|---|
committer | Simon Marchi <simon.marchi@ericsson.com> | 2017-12-21 18:21:45 -0500 |
commit | a8d2e5856f87a658d69018fe1ccd56482eebdd59 (patch) | |
tree | c0be42e8971a0df710ad9c19ff59a2fb53fba725 /gdb/features/rs6000 | |
parent | 27e9ff87a627614fda7ddd89ddef745de5e988bb (diff) | |
download | gdb-a8d2e5856f87a658d69018fe1ccd56482eebdd59.zip gdb-a8d2e5856f87a658d69018fe1ccd56482eebdd59.tar.gz gdb-a8d2e5856f87a658d69018fe1ccd56482eebdd59.tar.bz2 |
Do not emit "field_type" var if not needed on "maint print c-tdesc"
While fiddling a bit with -Wunused-variable, Sergio noticed that "maint
print c-tdesc" was always generating code for the "tdesc_type
*field_type" variable, even when it wasn't used. This is caught by GCC
when using -Wunused-variable, of course.
This patch changes the print_c_tdesc class to only output the field
declaration when we actually need it.
It shouldn't be necessary to do the same with the other variable
declarations (type_with_fields and element_type), because they are
always if they are declared.
The C files in features/ are regenerated, some declarations of
field_type are removed, as expected, while some others move to where
they are used for the first time.
gdb/ChangeLog:
* target-descriptions.c (print_c_tdesc) <visit>: Don't output
field_type declaration, use printf_field_type_assignment
instead.
<printf_field_type_assignment>: New method.
* features/aarch64-core.c, features/aarch64-fpu.c
features/arc-arcompact.c, features/arc-v2.c,
features/arm/arm-with-iwmmxt.c, features/i386/32bit-core.c,
features/i386/32bit-mpx.c, features/i386/32bit-sse.c,
features/i386/64bit-avx512.c, features/i386/64bit-core.c,
features/i386/64bit-mpx.c, features/i386/64bit-sse.c,
features/i386/x32-core.c, features/or1k.c,
features/rs6000/powerpc-7400.c,
features/rs6000/powerpc-altivec32.c,
features/rs6000/powerpc-altivec32l.c,
features/rs6000/powerpc-altivec64.c,
features/rs6000/powerpc-altivec64l.c,
features/rs6000/powerpc-cell32l.c,
features/rs6000/powerpc-cell64l.c,
features/rs6000/powerpc-isa205-altivec32l.c,
features/rs6000/powerpc-isa205-altivec64l.c,
features/rs6000/powerpc-isa205-vsx32l.c,
features/rs6000/powerpc-isa205-vsx64l.c,
features/rs6000/powerpc-vsx32.c,
features/rs6000/powerpc-vsx32l.c,
features/rs6000/powerpc-vsx64.c,
features/rs6000/powerpc-vsx64l.c, features/s390-gs-linux64.c,
features/s390-tevx-linux64.c, features/s390-vx-linux64.c,
features/s390x-gs-linux64.c, features/s390x-tevx-linux64.c,
features/s390x-vx-linux64.c: Re-generate.
Diffstat (limited to 'gdb/features/rs6000')
-rw-r--r-- | gdb/features/rs6000/powerpc-7400.c | 2 | ||||
-rw-r--r-- | gdb/features/rs6000/powerpc-altivec32.c | 2 | ||||
-rw-r--r-- | gdb/features/rs6000/powerpc-altivec32l.c | 2 | ||||
-rw-r--r-- | gdb/features/rs6000/powerpc-altivec64.c | 2 | ||||
-rw-r--r-- | gdb/features/rs6000/powerpc-altivec64l.c | 2 | ||||
-rw-r--r-- | gdb/features/rs6000/powerpc-cell32l.c | 2 | ||||
-rw-r--r-- | gdb/features/rs6000/powerpc-cell64l.c | 2 | ||||
-rw-r--r-- | gdb/features/rs6000/powerpc-isa205-altivec32l.c | 2 | ||||
-rw-r--r-- | gdb/features/rs6000/powerpc-isa205-altivec64l.c | 2 | ||||
-rw-r--r-- | gdb/features/rs6000/powerpc-isa205-vsx32l.c | 2 | ||||
-rw-r--r-- | gdb/features/rs6000/powerpc-isa205-vsx64l.c | 2 | ||||
-rw-r--r-- | gdb/features/rs6000/powerpc-vsx32.c | 2 | ||||
-rw-r--r-- | gdb/features/rs6000/powerpc-vsx32l.c | 2 | ||||
-rw-r--r-- | gdb/features/rs6000/powerpc-vsx64.c | 2 | ||||
-rw-r--r-- | gdb/features/rs6000/powerpc-vsx64l.c | 2 |
15 files changed, 15 insertions, 15 deletions
diff --git a/gdb/features/rs6000/powerpc-7400.c b/gdb/features/rs6000/powerpc-7400.c index ba9f12c..58f8a69 100644 --- a/gdb/features/rs6000/powerpc-7400.c +++ b/gdb/features/rs6000/powerpc-7400.c @@ -152,8 +152,8 @@ initialize_tdesc_powerpc_7400 (void) tdesc_create_vector (feature, "v16i8", element_type, 16); tdesc_type_with_fields *type_with_fields; - tdesc_type *field_type; type_with_fields = tdesc_create_union (feature, "vec128"); + tdesc_type *field_type; field_type = tdesc_named_type (feature, "uint128"); tdesc_add_field (type_with_fields, "uint128", field_type); field_type = tdesc_named_type (feature, "v4f"); diff --git a/gdb/features/rs6000/powerpc-altivec32.c b/gdb/features/rs6000/powerpc-altivec32.c index 9cb83ca..bbb36c8 100644 --- a/gdb/features/rs6000/powerpc-altivec32.c +++ b/gdb/features/rs6000/powerpc-altivec32.c @@ -104,8 +104,8 @@ initialize_tdesc_powerpc_altivec32 (void) tdesc_create_vector (feature, "v16i8", element_type, 16); tdesc_type_with_fields *type_with_fields; - tdesc_type *field_type; type_with_fields = tdesc_create_union (feature, "vec128"); + tdesc_type *field_type; field_type = tdesc_named_type (feature, "uint128"); tdesc_add_field (type_with_fields, "uint128", field_type); field_type = tdesc_named_type (feature, "v4f"); diff --git a/gdb/features/rs6000/powerpc-altivec32l.c b/gdb/features/rs6000/powerpc-altivec32l.c index afaf8ed..81862cb 100644 --- a/gdb/features/rs6000/powerpc-altivec32l.c +++ b/gdb/features/rs6000/powerpc-altivec32l.c @@ -108,8 +108,8 @@ initialize_tdesc_powerpc_altivec32l (void) tdesc_create_vector (feature, "v16i8", element_type, 16); tdesc_type_with_fields *type_with_fields; - tdesc_type *field_type; type_with_fields = tdesc_create_union (feature, "vec128"); + tdesc_type *field_type; field_type = tdesc_named_type (feature, "uint128"); tdesc_add_field (type_with_fields, "uint128", field_type); field_type = tdesc_named_type (feature, "v4f"); diff --git a/gdb/features/rs6000/powerpc-altivec64.c b/gdb/features/rs6000/powerpc-altivec64.c index 94041e1..f7a7c72 100644 --- a/gdb/features/rs6000/powerpc-altivec64.c +++ b/gdb/features/rs6000/powerpc-altivec64.c @@ -104,8 +104,8 @@ initialize_tdesc_powerpc_altivec64 (void) tdesc_create_vector (feature, "v16i8", element_type, 16); tdesc_type_with_fields *type_with_fields; - tdesc_type *field_type; type_with_fields = tdesc_create_union (feature, "vec128"); + tdesc_type *field_type; field_type = tdesc_named_type (feature, "uint128"); tdesc_add_field (type_with_fields, "uint128", field_type); field_type = tdesc_named_type (feature, "v4f"); diff --git a/gdb/features/rs6000/powerpc-altivec64l.c b/gdb/features/rs6000/powerpc-altivec64l.c index c7ed171..ce0bc86 100644 --- a/gdb/features/rs6000/powerpc-altivec64l.c +++ b/gdb/features/rs6000/powerpc-altivec64l.c @@ -108,8 +108,8 @@ initialize_tdesc_powerpc_altivec64l (void) tdesc_create_vector (feature, "v16i8", element_type, 16); tdesc_type_with_fields *type_with_fields; - tdesc_type *field_type; type_with_fields = tdesc_create_union (feature, "vec128"); + tdesc_type *field_type; field_type = tdesc_named_type (feature, "uint128"); tdesc_add_field (type_with_fields, "uint128", field_type); field_type = tdesc_named_type (feature, "v4f"); diff --git a/gdb/features/rs6000/powerpc-cell32l.c b/gdb/features/rs6000/powerpc-cell32l.c index 390d7b2..74c42f9 100644 --- a/gdb/features/rs6000/powerpc-cell32l.c +++ b/gdb/features/rs6000/powerpc-cell32l.c @@ -110,8 +110,8 @@ initialize_tdesc_powerpc_cell32l (void) tdesc_create_vector (feature, "v16i8", element_type, 16); tdesc_type_with_fields *type_with_fields; - tdesc_type *field_type; type_with_fields = tdesc_create_union (feature, "vec128"); + tdesc_type *field_type; field_type = tdesc_named_type (feature, "uint128"); tdesc_add_field (type_with_fields, "uint128", field_type); field_type = tdesc_named_type (feature, "v4f"); diff --git a/gdb/features/rs6000/powerpc-cell64l.c b/gdb/features/rs6000/powerpc-cell64l.c index 39890ba..cbfda4c 100644 --- a/gdb/features/rs6000/powerpc-cell64l.c +++ b/gdb/features/rs6000/powerpc-cell64l.c @@ -110,8 +110,8 @@ initialize_tdesc_powerpc_cell64l (void) tdesc_create_vector (feature, "v16i8", element_type, 16); tdesc_type_with_fields *type_with_fields; - tdesc_type *field_type; type_with_fields = tdesc_create_union (feature, "vec128"); + tdesc_type *field_type; field_type = tdesc_named_type (feature, "uint128"); tdesc_add_field (type_with_fields, "uint128", field_type); field_type = tdesc_named_type (feature, "v4f"); diff --git a/gdb/features/rs6000/powerpc-isa205-altivec32l.c b/gdb/features/rs6000/powerpc-isa205-altivec32l.c index 203bb4a..09f5c07 100644 --- a/gdb/features/rs6000/powerpc-isa205-altivec32l.c +++ b/gdb/features/rs6000/powerpc-isa205-altivec32l.c @@ -108,8 +108,8 @@ initialize_tdesc_powerpc_isa205_altivec32l (void) tdesc_create_vector (feature, "v16i8", element_type, 16); tdesc_type_with_fields *type_with_fields; - tdesc_type *field_type; type_with_fields = tdesc_create_union (feature, "vec128"); + tdesc_type *field_type; field_type = tdesc_named_type (feature, "uint128"); tdesc_add_field (type_with_fields, "uint128", field_type); field_type = tdesc_named_type (feature, "v4f"); diff --git a/gdb/features/rs6000/powerpc-isa205-altivec64l.c b/gdb/features/rs6000/powerpc-isa205-altivec64l.c index 8f66a16..246fcef 100644 --- a/gdb/features/rs6000/powerpc-isa205-altivec64l.c +++ b/gdb/features/rs6000/powerpc-isa205-altivec64l.c @@ -108,8 +108,8 @@ initialize_tdesc_powerpc_isa205_altivec64l (void) tdesc_create_vector (feature, "v16i8", element_type, 16); tdesc_type_with_fields *type_with_fields; - tdesc_type *field_type; type_with_fields = tdesc_create_union (feature, "vec128"); + tdesc_type *field_type; field_type = tdesc_named_type (feature, "uint128"); tdesc_add_field (type_with_fields, "uint128", field_type); field_type = tdesc_named_type (feature, "v4f"); diff --git a/gdb/features/rs6000/powerpc-isa205-vsx32l.c b/gdb/features/rs6000/powerpc-isa205-vsx32l.c index fc0f615..2a6e232 100644 --- a/gdb/features/rs6000/powerpc-isa205-vsx32l.c +++ b/gdb/features/rs6000/powerpc-isa205-vsx32l.c @@ -108,8 +108,8 @@ initialize_tdesc_powerpc_isa205_vsx32l (void) tdesc_create_vector (feature, "v16i8", element_type, 16); tdesc_type_with_fields *type_with_fields; - tdesc_type *field_type; type_with_fields = tdesc_create_union (feature, "vec128"); + tdesc_type *field_type; field_type = tdesc_named_type (feature, "uint128"); tdesc_add_field (type_with_fields, "uint128", field_type); field_type = tdesc_named_type (feature, "v4f"); diff --git a/gdb/features/rs6000/powerpc-isa205-vsx64l.c b/gdb/features/rs6000/powerpc-isa205-vsx64l.c index 3313d04..d0e32f2 100644 --- a/gdb/features/rs6000/powerpc-isa205-vsx64l.c +++ b/gdb/features/rs6000/powerpc-isa205-vsx64l.c @@ -108,8 +108,8 @@ initialize_tdesc_powerpc_isa205_vsx64l (void) tdesc_create_vector (feature, "v16i8", element_type, 16); tdesc_type_with_fields *type_with_fields; - tdesc_type *field_type; type_with_fields = tdesc_create_union (feature, "vec128"); + tdesc_type *field_type; field_type = tdesc_named_type (feature, "uint128"); tdesc_add_field (type_with_fields, "uint128", field_type); field_type = tdesc_named_type (feature, "v4f"); diff --git a/gdb/features/rs6000/powerpc-vsx32.c b/gdb/features/rs6000/powerpc-vsx32.c index 1a824a8..9eafb1c 100644 --- a/gdb/features/rs6000/powerpc-vsx32.c +++ b/gdb/features/rs6000/powerpc-vsx32.c @@ -104,8 +104,8 @@ initialize_tdesc_powerpc_vsx32 (void) tdesc_create_vector (feature, "v16i8", element_type, 16); tdesc_type_with_fields *type_with_fields; - tdesc_type *field_type; type_with_fields = tdesc_create_union (feature, "vec128"); + tdesc_type *field_type; field_type = tdesc_named_type (feature, "uint128"); tdesc_add_field (type_with_fields, "uint128", field_type); field_type = tdesc_named_type (feature, "v4f"); diff --git a/gdb/features/rs6000/powerpc-vsx32l.c b/gdb/features/rs6000/powerpc-vsx32l.c index f5bf11e..f08df14 100644 --- a/gdb/features/rs6000/powerpc-vsx32l.c +++ b/gdb/features/rs6000/powerpc-vsx32l.c @@ -108,8 +108,8 @@ initialize_tdesc_powerpc_vsx32l (void) tdesc_create_vector (feature, "v16i8", element_type, 16); tdesc_type_with_fields *type_with_fields; - tdesc_type *field_type; type_with_fields = tdesc_create_union (feature, "vec128"); + tdesc_type *field_type; field_type = tdesc_named_type (feature, "uint128"); tdesc_add_field (type_with_fields, "uint128", field_type); field_type = tdesc_named_type (feature, "v4f"); diff --git a/gdb/features/rs6000/powerpc-vsx64.c b/gdb/features/rs6000/powerpc-vsx64.c index 601df39..7991115 100644 --- a/gdb/features/rs6000/powerpc-vsx64.c +++ b/gdb/features/rs6000/powerpc-vsx64.c @@ -104,8 +104,8 @@ initialize_tdesc_powerpc_vsx64 (void) tdesc_create_vector (feature, "v16i8", element_type, 16); tdesc_type_with_fields *type_with_fields; - tdesc_type *field_type; type_with_fields = tdesc_create_union (feature, "vec128"); + tdesc_type *field_type; field_type = tdesc_named_type (feature, "uint128"); tdesc_add_field (type_with_fields, "uint128", field_type); field_type = tdesc_named_type (feature, "v4f"); diff --git a/gdb/features/rs6000/powerpc-vsx64l.c b/gdb/features/rs6000/powerpc-vsx64l.c index d34bd81..1726e67 100644 --- a/gdb/features/rs6000/powerpc-vsx64l.c +++ b/gdb/features/rs6000/powerpc-vsx64l.c @@ -108,8 +108,8 @@ initialize_tdesc_powerpc_vsx64l (void) tdesc_create_vector (feature, "v16i8", element_type, 16); tdesc_type_with_fields *type_with_fields; - tdesc_type *field_type; type_with_fields = tdesc_create_union (feature, "vec128"); + tdesc_type *field_type; field_type = tdesc_named_type (feature, "uint128"); tdesc_add_field (type_with_fields, "uint128", field_type); field_type = tdesc_named_type (feature, "v4f"); |