From: "Tom Tromey (Code Review)" <gerrit@gnutoolchain-gerrit.osci.io>
To: gdb-patches@sourceware.org
Subject: [review] Move type_byte_order earlier
Date: Wed, 27 Nov 2019 18:48:00 -0000 [thread overview]
Message-ID: <gerrit.1574880479000.I4666431ecbb32ec98918f39f72d22c86b2bc8dde@gnutoolchain-gerrit.osci.io> (raw)
In-Reply-To: <gerrit.1574880479000.I4666431ecbb32ec98918f39f72d22c86b2bc8dde@gnutoolchain-gerrit.osci.io>
Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/728
......................................................................
Move type_byte_order earlier
I failed to notice that the scalar_storage_order patch put
type_byte_order at the end of gdbtypes.c. The end of the file is
normally where the file's _initialize function goes. This moves
type_byte_order earlier, into a more relevant section.
gdb/ChangeLog
2019-11-27 Tom Tromey <tromey@adacore.com>
* gdbtypes.c (type_byte_order): Move earlier.
Change-Id: I4666431ecbb32ec98918f39f72d22c86b2bc8dde
---
M gdb/ChangeLog
M gdb/gdbtypes.c
2 files changed, 22 insertions(+), 18 deletions(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 66afaea..876a027 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,9 @@
2019-11-27 Tom Tromey <tromey@adacore.com>
+ * gdbtypes.c (type_byte_order): Move earlier.
+
+2019-11-27 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.
diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
index ff89009..31bfa47 100644
--- a/gdb/gdbtypes.c
+++ b/gdb/gdbtypes.c
@@ -3349,6 +3349,24 @@
value_address (val), val) == 1;
}
+/* See gdbtypes.h. */
+enum bfd_endian
+type_byte_order (const struct type *type)
+{
+ bfd_endian byteorder = gdbarch_byte_order (get_type_arch (type));
+ if (TYPE_ENDIANITY_NOT_DEFAULT (type))
+ {
+ if (byteorder == BFD_ENDIAN_BIG)
+ return BFD_ENDIAN_LITTLE;
+ else if (byteorder == BFD_ENDIAN_LITTLE)
+ return BFD_ENDIAN_BIG;
+ else
+ return BFD_ENDIAN_UNKNOWN;
+ }
+
+ return byteorder;
+}
+
\f
/* Overload resolution. */
@@ -5627,21 +5645,3 @@
show_strict_type_checking,
&setchecklist, &showchecklist);
}
-
-/* See gdbtypes.h. */
-enum bfd_endian
-type_byte_order (const struct type *type)
-{
- bfd_endian byteorder = gdbarch_byte_order (get_type_arch (type));
- if (TYPE_ENDIANITY_NOT_DEFAULT (type))
- {
- if (byteorder == BFD_ENDIAN_BIG)
- return BFD_ENDIAN_LITTLE;
- else if (byteorder == BFD_ENDIAN_LITTLE)
- return BFD_ENDIAN_BIG;
- else
- return BFD_ENDIAN_UNKNOWN;
- }
-
- return byteorder;
-}
--
Gerrit-Project: binutils-gdb
Gerrit-Branch: master
Gerrit-Change-Id: I4666431ecbb32ec98918f39f72d22c86b2bc8dde
Gerrit-Change-Number: 728
Gerrit-PatchSet: 1
Gerrit-Owner: Tom Tromey <tromey@sourceware.org>
Gerrit-MessageType: newchange
next parent reply other threads:[~2019-11-27 18:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-27 18:48 Tom Tromey (Code Review) [this message]
2019-11-27 22:05 ` Simon Marchi (Code Review)
2019-12-04 14:36 ` [review v2] " Tom Tromey (Code Review)
2019-12-04 15:32 ` Simon Marchi (Code Review)
2019-12-04 16:41 ` [pushed] " Sourceware to Gerrit sync (Code Review)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=gerrit.1574880479000.I4666431ecbb32ec98918f39f72d22c86b2bc8dde@gnutoolchain-gerrit.osci.io \
--to=gerrit@gnutoolchain-gerrit.osci.io \
--cc=gdb-patches@sourceware.org \
--cc=tromey@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox