Add scalar_storage_order support for floating point

Testing the scalar_storage_order patch pointed out that it does not
handle floating point properly.  This patch fixes this problem.

gdb/ChangeLog
2019-12-04  Tom Tromey  <tromey@adacore.com>

	* dwarf2read.c (dwarf2_init_float_type)
	(dwarf2_init_complex_target_type): Add byte_order parameter.
	(read_base_type): Compute byte order earlier.
	* gdbtypes.c (init_float_type): Add byte_order parameter.
	* gdbtypes.h (init_float_type): Add byte_order parameter.

gdb/testsuite/ChangeLog
2019-12-04  Tom Tromey  <tromey@adacore.com>

	* gdb.base/endianity.c (struct otherendian) <f>: New field.
	(main): Initialize it.
	* gdb.base/endianity.exp: Update.

Change-Id: Ic02eb711d80ce678ef0ecf8c506a626e441b8440
This commit is contained in:
Tom Tromey
2019-11-25 11:13:52 -07:00
parent 7a9e9f9f1e
commit 103a685e7f
7 changed files with 67 additions and 29 deletions

View File

@@ -1821,7 +1821,8 @@ extern struct type *init_character_type (struct objfile *, int, int,
extern struct type *init_boolean_type (struct objfile *, int, int,
const char *);
extern struct type *init_float_type (struct objfile *, int, const char *,
const struct floatformat **);
const struct floatformat **,
enum bfd_endian = BFD_ENDIAN_UNKNOWN);
extern struct type *init_decfloat_type (struct objfile *, int, const char *);
extern struct type *init_complex_type (struct objfile *, const char *,
struct type *);