binutils-gdb/gdb/features/i386
Simon Marchi a8d2e5856f 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.
2017-12-21 18:21:45 -05:00
..
32bit-avx512.c Split tdesc_type into multiple classes 2017-12-05 16:30:28 -05:00
32bit-avx512.xml
32bit-avx.c Dynamically composite xml in reply to GDB 2017-09-05 09:54:53 +01:00
32bit-avx.xml
32bit-core.c Do not emit "field_type" var if not needed on "maint print c-tdesc" 2017-12-21 18:21:45 -05:00
32bit-core.xml
32bit-linux.c Dynamically composite xml in reply to GDB 2017-09-05 09:54:53 +01:00
32bit-linux.xml
32bit-mpx.c Do not emit "field_type" var if not needed on "maint print c-tdesc" 2017-12-21 18:21:45 -05:00
32bit-mpx.xml
32bit-pkeys.c Dynamically composite xml in reply to GDB 2017-09-05 09:54:53 +01:00
32bit-pkeys.xml Add support for Intel PKRU register to GDB and GDBserver. 2017-02-17 11:44:48 +01:00
32bit-sse.c Do not emit "field_type" var if not needed on "maint print c-tdesc" 2017-12-21 18:21:45 -05:00
32bit-sse.xml
64bit-avx512.c Do not emit "field_type" var if not needed on "maint print c-tdesc" 2017-12-21 18:21:45 -05:00
64bit-avx512.xml
64bit-avx.c Lazily and dynamically create amd64-linux target descriptions 2017-09-05 09:54:54 +01:00
64bit-avx.xml
64bit-core.c Do not emit "field_type" var if not needed on "maint print c-tdesc" 2017-12-21 18:21:45 -05:00
64bit-core.xml
64bit-linux.c Lazily and dynamically create amd64-linux target descriptions 2017-09-05 09:54:54 +01:00
64bit-linux.xml
64bit-mpx.c Do not emit "field_type" var if not needed on "maint print c-tdesc" 2017-12-21 18:21:45 -05:00
64bit-mpx.xml
64bit-pkeys.c Lazily and dynamically create amd64-linux target descriptions 2017-09-05 09:54:54 +01:00
64bit-pkeys.xml Add support for Intel PKRU register to GDB and GDBserver. 2017-02-17 11:44:48 +01:00
64bit-segments.c Lazily and dynamically create amd64-linux target descriptions 2017-09-05 09:54:54 +01:00
64bit-segments.xml
64bit-sse.c Do not emit "field_type" var if not needed on "maint print c-tdesc" 2017-12-21 18:21:45 -05:00
64bit-sse.xml
amd64-avx-avx512-linux.xml Add target description for avx-avx512. 2017-02-17 11:44:36 +01:00
amd64-avx-avx512.xml Include the fs_base and gs_base registers in amd64 target descriptions. 2017-07-11 09:46:29 -07:00
amd64-avx-linux.xml
amd64-avx-mpx-avx512-pku-linux.xml Add support for Intel PKRU register to GDB and GDBserver. 2017-02-17 11:44:48 +01:00
amd64-avx-mpx-avx512-pku.xml Include the fs_base and gs_base registers in amd64 target descriptions. 2017-07-11 09:46:29 -07:00
amd64-avx-mpx-linux.xml
amd64-avx-mpx.xml Include the fs_base and gs_base registers in amd64 target descriptions. 2017-07-11 09:46:29 -07:00
amd64-avx.xml Include the fs_base and gs_base registers in amd64 target descriptions. 2017-07-11 09:46:29 -07:00
amd64-linux.xml
amd64-mpx-linux.xml
amd64-mpx.xml Include the fs_base and gs_base registers in amd64 target descriptions. 2017-07-11 09:46:29 -07:00
amd64.xml Include the fs_base and gs_base registers in amd64 target descriptions. 2017-07-11 09:46:29 -07:00
i386-avx-avx512-linux.xml Add target description for avx-avx512. 2017-02-17 11:44:36 +01:00
i386-avx-avx512.xml Add target description for avx-avx512. 2017-02-17 11:44:36 +01:00
i386-avx-linux.xml
i386-avx-mpx-avx512-pku-linux.xml Add support for Intel PKRU register to GDB and GDBserver. 2017-02-17 11:44:48 +01:00
i386-avx-mpx-avx512-pku.xml Add support for Intel PKRU register to GDB and GDBserver. 2017-02-17 11:44:48 +01:00
i386-avx-mpx-linux.xml
i386-avx-mpx.xml
i386-avx.xml
i386-linux.xml Adjust the order of 32bit-linux.xml and 32bit-sse.xml in i386/i386-linux.xml 2017-06-20 12:08:33 +01:00
i386-mmx-linux.xml
i386-mmx.xml
i386-mpx-linux.xml
i386-mpx.xml
i386.xml
x32-avx-avx512-linux.xml Add target description for avx-avx512. 2017-02-17 11:44:36 +01:00
x32-avx-linux.xml
x32-core.c Do not emit "field_type" var if not needed on "maint print c-tdesc" 2017-12-21 18:21:45 -05:00
x32-core.xml
x32-linux.xml